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

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

Issue 2823003002: SkBitmap and SkPixelRef no longer need lock/unlock (Closed)
Patch Set: win fix after rebase Created 3 years, 8 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/ImageFrameGenerator.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp b/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp
index 933023eeb1171a19c7a7b7e4938d58f9a630b070..2382ab7ae8b3ebd5c31b7d484eba88d6e14b1597 100644
--- a/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp
+++ b/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp
@@ -86,10 +86,7 @@ class ExternalMemoryAllocator final : public SkBitmap::Allocator {
if (!CompatibleInfo(info_, info) || row_bytes_ != dst->rowBytes())
return false;
- if (!dst->installPixels(info, pixels_, row_bytes_))
- return false;
- dst->lockPixels();
- return true;
+ return dst->installPixels(info, pixels_, row_bytes_);
}
private:
@@ -165,7 +162,6 @@ bool ImageFrameGenerator::DecodeAndScale(
// provided. If not, make a copy.
DCHECK_EQ(bitmap.width(), scaled_size.width());
DCHECK_EQ(bitmap.height(), scaled_size.height());
- SkAutoLockPixels bitmap_lock(bitmap);
if (bitmap.getPixels() != pixels)
CopyPixels(pixels, row_bytes, bitmap.getPixels(), bitmap.rowBytes(), info);
return true;

Powered by Google App Engine
This is Rietveld 408576698