New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 598695 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Sep 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Clean up skia::ScopedPlatformPaint and relatives

Project Member Reported by tomhud...@chromium.org, Mar 29 2016

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.
 
Status: Assigned (was: Untriaged)
Assigning it so it won't show up on your "untriaged in 1 week" list.
Project Member

Comment 2 by bugdroid1@chromium.org, 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

Status: Fixed (was: Assigned)

Sign in to add a comment