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

Unified Diff: third_party/WebKit/Source/platform/graphics/StaticBitmapImage.cpp

Issue 2455983005: Refactor AcceleratedStaticBitmapImage (Closed)
Patch Set: deleteTexture in desctructor 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/graphics/StaticBitmapImage.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/StaticBitmapImage.cpp b/third_party/WebKit/Source/platform/graphics/StaticBitmapImage.cpp
index b2b642d21862fee4ab4df96881d19b0daaea1007..f5f3d4683c375bbb6aee466288ec4c25ace85780 100644
--- a/third_party/WebKit/Source/platform/graphics/StaticBitmapImage.cpp
+++ b/third_party/WebKit/Source/platform/graphics/StaticBitmapImage.cpp
@@ -18,9 +18,10 @@ namespace blink {
PassRefPtr<StaticBitmapImage> StaticBitmapImage::create(sk_sp<SkImage> image) {
if (!image)
return nullptr;
- if (image->isTextureBacked())
+ if (image->isTextureBacked()) {
return AcceleratedStaticBitmapImage::createFromSharedContextImage(
std::move(image));
+ }
return adoptRef(new StaticBitmapImage(std::move(image)));
}

Powered by Google App Engine
This is Rietveld 408576698