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

Unified Diff: webkit/glue/plugins/pepper_image_data.cc

Issue 2080021: Chrome-side of tests for Pepper Device2D. This includes some bugfixes and min... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 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 | « webkit/glue/plugins/pepper_image_data.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/plugins/pepper_image_data.cc
===================================================================
--- webkit/glue/plugins/pepper_image_data.cc (revision 48097)
+++ webkit/glue/plugins/pepper_image_data.cc (working copy)
@@ -136,9 +136,6 @@
}
void* ImageData::Map() {
- if (!is_valid())
- return NULL;
-
if (!mapped_canvas_.get()) {
mapped_canvas_.reset(platform_image_->Map());
if (!mapped_canvas_.get())
@@ -161,9 +158,10 @@
// in the future to save some memory.
}
-const SkBitmap& ImageData::GetMappedBitmap() const {
- DCHECK(is_valid());
- return mapped_canvas_->getTopPlatformDevice().accessBitmap(false);
+const SkBitmap* ImageData::GetMappedBitmap() const {
+ if (!mapped_canvas_.get())
+ return NULL;
+ return &mapped_canvas_->getTopPlatformDevice().accessBitmap(false);
}
void ImageData::Swap(ImageData* other) {
« no previous file with comments | « webkit/glue/plugins/pepper_image_data.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698