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

Unified Diff: chrome/renderer/print_web_view_helper_win.cc

Issue 7465104: Remove dependency on VectorPlatformDeviceEmf. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Address style nits. Created 9 years, 4 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 | « no previous file | skia/ext/platform_device_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/print_web_view_helper_win.cc
===================================================================
--- chrome/renderer/print_web_view_helper_win.cc (revision 95234)
+++ chrome/renderer/print_web_view_helper_win.cc (working copy)
@@ -14,7 +14,7 @@
#include "printing/metafile_skia_wrapper.h"
#include "printing/units.h"
#include "skia/ext/vector_canvas.h"
-#include "skia/ext/vector_platform_device_emf_win.h"
+#include "skia/ext/platform_device.h"
#include "third_party/skia/include/core/SkRefCnt.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "ui/gfx/gdi_util.h"
@@ -206,9 +206,8 @@
// PreviewMetafile (PDF) supports alpha blend, so we only hit this case
// for NativeMetafile.
DCHECK(!is_preview);
- skia::VectorPlatformDeviceEmf* platform_device =
- static_cast<skia::VectorPlatformDeviceEmf*>(device);
- if (platform_device->alpha_blend_used()) {
+ skia::PlatformDevice* platform_device = skia::GetPlatformDevice(device);
+ if (platform_device && platform_device->AlphaBlendUsed()) {
// Currently, we handle alpha blend transparency for a single page.
// Therefore, expecting a metafile with page count 1.
DCHECK_EQ(1U, (*metafile)->GetPageCount());
« no previous file with comments | « no previous file | skia/ext/platform_device_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698