diff options
author | tomhudson <tomhudson@google.com> | 2016-02-02 15:47:41 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-02 23:50:14 +0000 |
commit | 31a496596e3d84a30bea92350f3ad3691f24904f (patch) | |
tree | 9b0f5775cb0d8df5b25f67d6d7686c69980e7905 /skia | |
parent | 7ab76ad1fbc24cd8486e0485e617c1a338c747ea (diff) | |
download | chromium_src-31a496596e3d84a30bea92350f3ad3691f24904f.zip chromium_src-31a496596e3d84a30bea92350f3ad3691f24904f.tar.gz chromium_src-31a496596e3d84a30bea92350f3ad3691f24904f.tar.bz2 |
Remove PlatformDevice::SupportsPlatformPaint()
Removes a virtual function that always returns true and has no
overrides, trying to simplify the API.
Also trims a few unnecessary #includes.
Review URL: https://codereview.chromium.org/1653383002
Cr-Commit-Position: refs/heads/master@{#373076}
Diffstat (limited to 'skia')
-rw-r--r-- | skia/ext/platform_canvas.cc | 4 | ||||
-rw-r--r-- | skia/ext/platform_device.cc | 4 | ||||
-rw-r--r-- | skia/ext/platform_device.h | 3 | ||||
-rw-r--r-- | skia/ext/platform_device_mac.cc | 4 |
4 files changed, 1 insertions, 14 deletions
diff --git a/skia/ext/platform_canvas.cc b/skia/ext/platform_canvas.cc index 6189f0e..f06d30c 100644 --- a/skia/ext/platform_canvas.cc +++ b/skia/ext/platform_canvas.cc @@ -6,7 +6,6 @@ #include "base/logging.h" #include "build/build_config.h" -#include "skia/ext/bitmap_platform_device.h" #include "skia/ext/platform_device.h" #include "third_party/skia/include/core/SkMetaData.h" #include "third_party/skia/include/core/SkTypes.h" @@ -63,8 +62,7 @@ bool GetWritablePixels(SkCanvas* canvas, SkPixmap* result) { } bool SupportsPlatformPaint(const SkCanvas* canvas) { - PlatformDevice* platform_device = GetPlatformDevice(GetTopDevice(*canvas)); - return platform_device && platform_device->SupportsPlatformPaint(); + return GetPlatformDevice(GetTopDevice(*canvas)) != nullptr; } PlatformSurface BeginPlatformPaint(SkCanvas* canvas) { diff --git a/skia/ext/platform_device.cc b/skia/ext/platform_device.cc index cd4aa09..b6748fc 100644 --- a/skia/ext/platform_device.cc +++ b/skia/ext/platform_device.cc @@ -31,8 +31,4 @@ PlatformDevice* GetPlatformDevice(SkBaseDevice* device) { return NULL; } -bool PlatformDevice::SupportsPlatformPaint() { - return true; -} - } // namespace skia diff --git a/skia/ext/platform_device.h b/skia/ext/platform_device.h index 628732b..bef2714 100644 --- a/skia/ext/platform_device.h +++ b/skia/ext/platform_device.h @@ -69,9 +69,6 @@ class SK_API PlatformDevice { // Finish a previous call to beginPlatformPaint. virtual void EndPlatformPaint(); - // Returns true if GDI operations can be used for drawing into the bitmap. - virtual bool SupportsPlatformPaint(); - #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/platform_device_mac.cc b/skia/ext/platform_device_mac.cc index 5dfa211..5e78ad5 100644 --- a/skia/ext/platform_device_mac.cc +++ b/skia/ext/platform_device_mac.cc @@ -3,10 +3,6 @@ // found in the LICENSE file. #include "skia/ext/platform_device.h" -#include "skia/ext/bitmap_platform_device.h" - -#import <ApplicationServices/ApplicationServices.h> -#include "skia/ext/skia_utils_mac.h" namespace skia { |