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..008e98f40bc246175ead9f00f8cdd73b72697648 100644 |
--- a/cc/resources/ui_resource_bitmap.h |
+++ b/cc/resources/ui_resource_bitmap.h |
@@ -54,6 +54,11 @@ class CC_EXPORT UIResourceBitmap { |
return pixel_ref_ ? pixel_ref_->rowBytes() * size_.height() : 0; |
} |
+ const uint8_t* GetPixels() const { |
+ return pixel_ref_ ? static_cast<const uint8_t*>(pixel_ref_->pixels()) |
f(malita)
2017/04/17 19:31:36
nit: prev version assumes pixel_ref_ is non-null;
reed1
2017/04/17 20:18:40
removed check.
|
+ : nullptr; |
+ } |
+ |
private: |
friend class AutoLockUIResourceBitmap; |
@@ -67,16 +72,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_ |