Clean up skia::ScopedPlatformPaint and relatives |
||
Issue description
There are six implementations of skia::EndPlatformPaint(), all of which are noops except for one instance of debugging-only code.
There is only one direct (windows-specific) caller of skia::{Begin,End}PlatformPaint() outside of skia::ScopedPlatformPaint.
There ought to be something we could do to simplify the API. Proposal:
* remove all externally visible versions of {Begin,End}PlatformPaint; replace the one caller with a ScopedPlatformPaint object.
* move the implementation of ScopedPlatformPaint out-of-line.
Further planned changes (SkRasterCanvasLayerAllocator) should replace BeginPlatformPaint(); they may also replace ScopedPlatformPaint completely, and if not, having those changes confined inside ScopedPlatformPaint's implementation will make them easier.
,
Mar 29 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7b79fb0215d08827085fa40c6c1fa027628a3c95 commit 7b79fb0215d08827085fa40c6c1fa027628a3c95 Author: tomhudson <tomhudson@google.com> Date: Tue Mar 29 21:03:39 2016 Limit manual control of platform painting Platform painting should be through skia::ScopedPlatformPaint. (Only one compositor callsite was calling Begin/End directly.) Remove skia::EndPlatformPaint() and all device-specific implementations, which were effectively noops. Remove skia::BeginPlatformPaint(), and make all device-specific impls protected. BUG= 598695 R=fmalita@chromium.org TBR=danakj@chromium.org Review URL: https://codereview.chromium.org/1839113002 Cr-Commit-Position: refs/heads/master@{#383820} [modify] https://crrev.com/7b79fb0215d08827085fa40c6c1fa027628a3c95/content/browser/compositor/software_output_device_win.cc [modify] https://crrev.com/7b79fb0215d08827085fa40c6c1fa027628a3c95/skia/ext/bitmap_platform_device_cairo.h [modify] https://crrev.com/7b79fb0215d08827085fa40c6c1fa027628a3c95/skia/ext/bitmap_platform_device_skia.h [modify] https://crrev.com/7b79fb0215d08827085fa40c6c1fa027628a3c95/skia/ext/bitmap_platform_device_win.cc [modify] https://crrev.com/7b79fb0215d08827085fa40c6c1fa027628a3c95/skia/ext/bitmap_platform_device_win.h [modify] https://crrev.com/7b79fb0215d08827085fa40c6c1fa027628a3c95/skia/ext/platform_canvas.cc [modify] https://crrev.com/7b79fb0215d08827085fa40c6c1fa027628a3c95/skia/ext/platform_canvas.h [modify] https://crrev.com/7b79fb0215d08827085fa40c6c1fa027628a3c95/skia/ext/platform_device.h [modify] https://crrev.com/7b79fb0215d08827085fa40c6c1fa027628a3c95/skia/ext/platform_device_linux.cc [modify] https://crrev.com/7b79fb0215d08827085fa40c6c1fa027628a3c95/skia/ext/platform_device_mac.cc [modify] https://crrev.com/7b79fb0215d08827085fa40c6c1fa027628a3c95/skia/ext/platform_device_win.cc
,
Sep 7 2016
|
||
►
Sign in to add a comment |
||
Comment 1 by schenney@chromium.org
, Mar 29 2016