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

Unified Diff: content/renderer/webplugin_delegate_proxy.cc

Issue 11138024: Simplify platform_canvas.h by recognizing that PlatformCanvas does not actually extend (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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 | « content/renderer/webplugin_delegate_proxy.h ('k') | content/shell/webkit_test_runner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/webplugin_delegate_proxy.cc
===================================================================
--- content/renderer/webplugin_delegate_proxy.cc (revision 167659)
+++ content/renderer/webplugin_delegate_proxy.cc (working copy)
@@ -629,7 +629,7 @@
static size_t BitmapSizeForPluginRect(const gfx::Rect& plugin_rect) {
const size_t stride =
- skia::PlatformCanvas::StrideForWidth(plugin_rect.width());
+ skia::PlatformCanvasStrideForWidth(plugin_rect.width());
return stride * plugin_rect.height();
}
@@ -641,8 +641,9 @@
memory->resize(size);
if (memory->size() != size)
return false;
- canvas->reset(new skia::PlatformCanvas(
- plugin_rect_.width(), plugin_rect_.height(), true, &((*memory)[0])));
+ canvas->reset(skia::CreatePlatformCanvas(
+ plugin_rect_.width(), plugin_rect_.height(), true, &((*memory)[0]),
+ skia::CRASH_ON_FAILURE));
return true;
}
#endif
@@ -1039,7 +1040,7 @@
// the goal is just to move the raw pixels between two bitmaps with the same
// pixel format (no compositing, color correction, etc.), it's safe.
const size_t stride =
- skia::PlatformCanvas::StrideForWidth(plugin_rect_.width());
+ skia::PlatformCanvasStrideForWidth(plugin_rect_.width());
const size_t chunk_size = 4 * rect.width();
DCHECK(back_buffer_dib() != NULL);
uint8* source_data = static_cast<uint8*>(back_buffer_dib()->memory()) +
« no previous file with comments | « content/renderer/webplugin_delegate_proxy.h ('k') | content/shell/webkit_test_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698