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

Unified Diff: webkit/plugins/ppapi/ppapi_plugin_instance.cc

Issue 6783023: Eliminate skia::PlatformCanvas - Step 1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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: webkit/plugins/ppapi/ppapi_plugin_instance.cc
===================================================================
--- webkit/plugins/ppapi/ppapi_plugin_instance.cc (revision 80026)
+++ webkit/plugins/ppapi/ppapi_plugin_instance.cc (working copy)
@@ -1229,9 +1229,11 @@
#elif defined(OS_WIN)
// On Windows, we now need to render the PDF to the DC that backs the
// supplied canvas.
+ skia::PlatformCanvas* platform_canvas =
+ static_cast<skia::PlatformCanvas*>(canvas);
skia::VectorPlatformDevice& device =
static_cast<skia::VectorPlatformDevice&>(
- canvas->getTopPlatformDevice());
+ platform_canvas->getTopPlatformDevice());
HDC dc = device.getBitmapDC();
gfx::Size size_in_pixels;
size_in_pixels.set_width(
@@ -1320,9 +1322,11 @@
const SkBitmap& bitmap,
const gfx::Rect& printable_area,
WebKit::WebCanvas* canvas) {
+ skia::PlatformCanvas* platform_canvas =
+ static_cast<skia::PlatformCanvas*>(canvas);
skia::VectorPlatformDevice& device =
static_cast<skia::VectorPlatformDevice&>(
- canvas->getTopPlatformDevice());
+ platform_canvas->getTopPlatformDevice());
HDC dc = device.getBitmapDC();
// TODO(sanjeevr): This is a temporary hack. If we output a JPEG
// to the EMF, the EnumEnhMetaFile call fails in the browser

Powered by Google App Engine
This is Rietveld 408576698