Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: third_party/WebKit/Source/platform/graphics/StaticBitmapImage.cpp

Issue 2328463004: Implement WebGL's commit on the main thread (Closed)
Patch Set: fix compile error on win_dbg Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/graphics/StaticBitmapImage.h" 5 #include "platform/graphics/StaticBitmapImage.h"
6 6
7 #include "platform/graphics/AcceleratedStaticBitmapImage.h" 7 #include "platform/graphics/AcceleratedStaticBitmapImage.h"
8 #include "platform/graphics/GraphicsContext.h" 8 #include "platform/graphics/GraphicsContext.h"
9 #include "platform/graphics/ImageObserver.h" 9 #include "platform/graphics/ImageObserver.h"
10 #include "third_party/skia/include/core/SkCanvas.h" 10 #include "third_party/skia/include/core/SkCanvas.h"
(...skipping 11 matching lines...) Expand all
22 if (image->isTextureBacked()) 22 if (image->isTextureBacked())
23 return AcceleratedStaticBitmapImage::createFromSharedContextImage(std::m ove(image)); 23 return AcceleratedStaticBitmapImage::createFromSharedContextImage(std::m ove(image));
24 return adoptRef(new StaticBitmapImage(std::move(image))); 24 return adoptRef(new StaticBitmapImage(std::move(image)));
25 } 25 }
26 26
27 StaticBitmapImage::StaticBitmapImage(sk_sp<SkImage> image) : m_image(std::move(i mage)) 27 StaticBitmapImage::StaticBitmapImage(sk_sp<SkImage> image) : m_image(std::move(i mage))
28 { 28 {
29 ASSERT(m_image); 29 ASSERT(m_image);
30 } 30 }
31 31
32 StaticBitmapImage::StaticBitmapImage()
33 {
34 }
35
36 StaticBitmapImage::~StaticBitmapImage()
37 {
38 }
39
32 IntSize StaticBitmapImage::size() const 40 IntSize StaticBitmapImage::size() const
33 { 41 {
34 return IntSize(m_image->width(), m_image->height()); 42 return IntSize(m_image->width(), m_image->height());
35 } 43 }
36 44
37 bool StaticBitmapImage::isTextureBacked() 45 bool StaticBitmapImage::isTextureBacked()
38 { 46 {
39 return m_image && m_image->isTextureBacked(); 47 return m_image && m_image->isTextureBacked();
40 } 48 }
41 49
(...skipping 17 matching lines...) Expand all
59 if (ImageObserver* observer = getImageObserver()) 67 if (ImageObserver* observer = getImageObserver())
60 observer->didDraw(this); 68 observer->didDraw(this);
61 } 69 }
62 70
63 sk_sp<SkImage> StaticBitmapImage::imageForCurrentFrame() 71 sk_sp<SkImage> StaticBitmapImage::imageForCurrentFrame()
64 { 72 {
65 return m_image; 73 return m_image;
66 } 74 }
67 75
68 } // namespace blink 76 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698