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

Unified Diff: cc/resources/ui_resource_bitmap.h

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
« no previous file with comments | « cc/output/renderer_pixeltest.cc ('k') | cc/resources/ui_resource_bitmap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/ui_resource_bitmap.h
diff --git a/cc/resources/ui_resource_bitmap.h b/cc/resources/ui_resource_bitmap.h
index 66a8a38d1cf75c871bc0869c751dc7b05ace60af..4acfd2ce7e4dce695193f1a7ca14a28b9ebdaa72 100644
--- a/cc/resources/ui_resource_bitmap.h
+++ b/cc/resources/ui_resource_bitmap.h
@@ -54,6 +54,10 @@ class CC_EXPORT UIResourceBitmap {
return pixel_ref_ ? pixel_ref_->rowBytes() * size_.height() : 0;
}
+ const uint8_t* GetPixels() const {
+ return static_cast<const uint8_t*>(pixel_ref_->pixels());
+ }
+
private:
friend class AutoLockUIResourceBitmap;
@@ -67,16 +71,6 @@ class CC_EXPORT UIResourceBitmap {
bool opaque_;
};
-class CC_EXPORT AutoLockUIResourceBitmap {
- public:
- explicit AutoLockUIResourceBitmap(const UIResourceBitmap& bitmap);
- ~AutoLockUIResourceBitmap();
- const uint8_t* GetPixels() const;
-
- private:
- const UIResourceBitmap& bitmap_;
-};
-
} // namespace cc
#endif // CC_RESOURCES_UI_RESOURCE_BITMAP_H_
« no previous file with comments | « cc/output/renderer_pixeltest.cc ('k') | cc/resources/ui_resource_bitmap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698