diff options
author | vitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-22 00:10:07 +0000 |
---|---|---|
committer | vitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-22 00:10:07 +0000 |
commit | 60d77bde7e6aac08a05b00ce2b82f94144934965 (patch) | |
tree | e259f3205b1017c549b87e08497ad4172f990bdd /skia | |
parent | f26c77082295b9fc277cd7a5eb75cdf0edee1bbb (diff) | |
download | chromium_src-60d77bde7e6aac08a05b00ce2b82f94144934965.zip chromium_src-60d77bde7e6aac08a05b00ce2b82f94144934965.tar.gz chromium_src-60d77bde7e6aac08a05b00ce2b82f94144934965.tar.bz2 |
Some printers has issue with metafiles produces from PDF so added switch and about:flag as workaround for affected users.
Rasterisation is implemented and RasterizeMetafile function.
It replace metafile with new one where content is only bitmap created by playback of original metafile.
FlattenTransparency replaced with full rasterisation.
Fixed rectangle returned by Emf::GetPageBounds.
Removed SkDevice::AlphaBlendUsed().
Removed return value from PrintWebViewHelper::RenderPage on windows.
BUG=133527
Review URL: https://chromiumcodereview.appspot.com/10836330
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152681 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia')
-rw-r--r-- | skia/ext/platform_device.cc | 4 | ||||
-rw-r--r-- | skia/ext/platform_device.h | 5 | ||||
-rw-r--r-- | skia/ext/vector_platform_device_emf_win.cc | 5 | ||||
-rw-r--r-- | skia/ext/vector_platform_device_emf_win.h | 5 |
4 files changed, 1 insertions, 18 deletions
diff --git a/skia/ext/platform_device.cc b/skia/ext/platform_device.cc index 6292273..f280aaf 100644 --- a/skia/ext/platform_device.cc +++ b/skia/ext/platform_device.cc @@ -76,8 +76,4 @@ bool PlatformDevice::IsNativeFontRenderingAllowed() { return true; } -bool PlatformDevice::AlphaBlendUsed() const { - return false; -} - } // namespace skia diff --git a/skia/ext/platform_device.h b/skia/ext/platform_device.h index 627cd32..3263902 100644 --- a/skia/ext/platform_device.h +++ b/skia/ext/platform_device.h @@ -124,11 +124,6 @@ class SK_API PlatformDevice { // Returns if GDI is allowed to render text to this device. virtual bool IsNativeFontRenderingAllowed(); - // True if AlphaBlend() was called during a - // BeginPlatformPaint()/EndPlatformPaint() pair. - // Used by the printing subclasses. See |VectorPlatformDeviceEmf|. - virtual bool AlphaBlendUsed() const; - #if defined(OS_WIN) // Loads a SkPath into the GDI context. The path can there after be used for // clipping or as a stroke. Returns false if the path failed to be loaded. diff --git a/skia/ext/vector_platform_device_emf_win.cc b/skia/ext/vector_platform_device_emf_win.cc index 3c34800..73be491 100644 --- a/skia/ext/vector_platform_device_emf_win.cc +++ b/skia/ext/vector_platform_device_emf_win.cc @@ -100,8 +100,7 @@ VectorPlatformDeviceEmf::VectorPlatformDeviceEmf(HDC dc, const SkBitmap& bitmap) : SkDevice(bitmap), hdc_(dc), previous_brush_(NULL), - previous_pen_(NULL), - alpha_blend_used_(false) { + previous_pen_(NULL) { transform_.reset(); SetPlatformDevice(this, this); } @@ -854,8 +853,6 @@ void VectorPlatformDeviceEmf::InternalDrawBitmap(const SkBitmap& bitmap, result = SetStretchBltMode(dc, previous_mode); SkASSERT(result); - alpha_blend_used_ = true; - ::SelectObject(bitmap_dc, static_cast<HBITMAP>(old_bitmap)); DeleteObject(hbitmap); DeleteDC(bitmap_dc); diff --git a/skia/ext/vector_platform_device_emf_win.h b/skia/ext/vector_platform_device_emf_win.h index fc6c61c..6d84d3a 100644 --- a/skia/ext/vector_platform_device_emf_win.h +++ b/skia/ext/vector_platform_device_emf_win.h @@ -32,8 +32,6 @@ class VectorPlatformDeviceEmf : public SkDevice, public PlatformDevice { virtual PlatformSurface BeginPlatformPaint() OVERRIDE; virtual void DrawToNativeContext(HDC dc, int x, int y, const RECT* src_rect) OVERRIDE; - virtual bool AlphaBlendUsed() const OVERRIDE { return alpha_blend_used_; } - // SkDevice methods. virtual uint32_t getDeviceCapabilities(); virtual void drawPaint(const SkDraw& draw, const SkPaint& paint) OVERRIDE; @@ -126,9 +124,6 @@ class VectorPlatformDeviceEmf : public SkDevice, public PlatformDevice { // Previously selected pen before the current drawing. HGDIOBJ previous_pen_; - // True if AlphaBlend() was called during this print. - bool alpha_blend_used_; - DISALLOW_COPY_AND_ASSIGN(VectorPlatformDeviceEmf); }; |