Chromium Code Reviews| 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); |
|
vangelis
2011/04/01 23:35:54
This seems like a potentially dangerous cast once
alokp
2011/04/04 17:00:13
Ok. Working with reed@ get rid of these static cas
|
| 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 |