summaryrefslogtreecommitdiffstats
path: root/webkit/plugins
diff options
context:
space:
mode:
authoralokp@chromium.org <alokp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-06 22:12:33 +0000
committeralokp@chromium.org <alokp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-06 22:12:33 +0000
commit973b7701f2be80ea89cc0799912b64b76a30de5d (patch)
tree2a6e7f587d9e94e26d8a30d56491f2a9fb4621db /webkit/plugins
parent00174ef7842eef55f7d697fedf947b5ad415368c (diff)
downloadchromium_src-973b7701f2be80ea89cc0799912b64b76a30de5d.zip
chromium_src-973b7701f2be80ea89cc0799912b64b76a30de5d.tar.gz
chromium_src-973b7701f2be80ea89cc0799912b64b76a30de5d.tar.bz2
Fixed a few styles issues in skia::PlatformDevice. Made function names consistent. Added Begin/EndPlatformPaint on Mac.
Review URL: http://codereview.chromium.org/6691067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80707 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/plugins')
-rw-r--r--webkit/plugins/ppapi/ppapi_plugin_instance.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.cc b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
index ab3302a..082d96e 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
@@ -1320,15 +1320,6 @@ bool PluginInstance::DrawJPEGToPlatformDC(
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 @@ bool PluginInstance::DrawJPEGToPlatformDC(
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;