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

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

Issue 6691067: Fixed a few styles issues in skia::PlatformDevice. Made function names consistent. Added Begin/En... (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
« no previous file with comments | « skia/ext/vector_platform_device_emf_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppapi_plugin_instance.cc
===================================================================
--- webkit/plugins/ppapi/ppapi_plugin_instance.cc (revision 80484)
+++ webkit/plugins/ppapi/ppapi_plugin_instance.cc (working copy)
@@ -1320,15 +1320,6 @@
const SkBitmap& bitmap,
const gfx::Rect& printable_area,
WebKit::WebCanvas* canvas) {
- HDC dc = canvas->beginPlatformPaint();
- // TODO(sanjeevr): This is a temporary hack. If we output a JPEG
- // to the EMF, the EnumEnhMetaFile call fails in the browser
- // process. The failure also happens if we output nothing here.
- // We need to investigate the reason for this failure and fix it.
- // In the meantime this temporary hack of drawing an empty
- // rectangle in the DC gets us by.
- Rectangle(dc, 0, 0, 0, 0);
-
// Ideally we should add JPEG compression to the VectorPlatformDevice class
// However, Skia currently has no JPEG compression code and we cannot
// depend on gfx/jpeg_codec.h in Skia. So we do the compression here.
@@ -1348,6 +1339,15 @@
NOTREACHED();
return false;
}
+
+ HDC dc = canvas->beginPlatformPaint();
+ // TODO(sanjeevr): This is a temporary hack. If we output a JPEG
+ // to the EMF, the EnumEnhMetaFile call fails in the browser
+ // process. The failure also happens if we output nothing here.
+ // We need to investigate the reason for this failure and fix it.
+ // In the meantime this temporary hack of drawing an empty
+ // rectangle in the DC gets us by.
+ Rectangle(dc, 0, 0, 0, 0);
BITMAPINFOHEADER bmi = {0};
gfx::CreateBitmapHeader(bitmap.width(), bitmap.height(), &bmi);
bmi.biCompression = BI_JPEG;
« no previous file with comments | « skia/ext/vector_platform_device_emf_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698