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

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: address junov@'s comments Created 4 years, 3 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"
11 #include "third_party/skia/include/core/SkImage.h"
12 #include "third_party/skia/include/core/SkPaint.h" 11 #include "third_party/skia/include/core/SkPaint.h"
13 #include "wtf/PtrUtil.h" 12 #include "wtf/PtrUtil.h"
14 #include <memory> 13 #include <memory>
15 14
16 namespace blink { 15 namespace blink {
17 16
18 PassRefPtr<StaticBitmapImage> StaticBitmapImage::create(sk_sp<SkImage> image) 17 PassRefPtr<StaticBitmapImage> StaticBitmapImage::create(sk_sp<SkImage> image)
19 { 18 {
20 if (!image) 19 if (!image)
21 return nullptr; 20 return nullptr;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 if (ImageObserver* observer = getImageObserver()) 58 if (ImageObserver* observer = getImageObserver())
60 observer->didDraw(this); 59 observer->didDraw(this);
61 } 60 }
62 61
63 sk_sp<SkImage> StaticBitmapImage::imageForCurrentFrame() 62 sk_sp<SkImage> StaticBitmapImage::imageForCurrentFrame()
64 { 63 {
65 return m_image; 64 return m_image;
66 } 65 }
67 66
68 } // namespace blink 67 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698