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

Issue 2715793002: Change mock canvases to paint into SkCanvas (Closed)

Created:
3 years, 9 months ago by enne (OOO)
Modified:
3 years, 9 months ago
Reviewers:
tapted, pdr., sadrul
CC:
blink-reviews, chromium-reviews, kinuko+watch, tfarina
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Change mock canvases to paint into SkCanvas To simplify interfaces, cc::PaintCanvas doesn't want to support onDrawX style overrides while painting. To avoid this, change test code that paints into mock canvases and tries to detect what has been drawn to paint into a PaintCanvas originally and play that recorded result back into an SkCanvas afterwards. In the future, when PaintRecord is more introspectable by test code and isn't just providing an SkPicture, then test code could just look at the PaintRecord directly. This code all works right now because cc::PaintCanvas is a typedef to SkCanvas, but as soon as they become separate types then this code will no longer work. BUG=671433 Review-Url: https://codereview.chromium.org/2715793002 Cr-Commit-Position: refs/heads/master@{#453060} Committed: https://chromium.googlesource.com/chromium/src/+/26abaa05f21dc00bd9f089e3aea037891c6d903a

Patch Set 1 #

Patch Set 2 : Fix deps #

Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -22 lines) Patch
M third_party/WebKit/Source/core/page/PrintContextTest.cpp View 3 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/web/PageOverlayTest.cpp View 2 chunks +4 lines, -4 lines 0 comments Download
M ui/views/BUILD.gn View 1 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/border_unittest.cc View 5 chunks +38 lines, -15 lines 0 comments Download

Messages

Total messages: 20 (14 generated)
enne (OOO)
3 years, 9 months ago (2017-02-23 19:06:13 UTC) #3
pdr.
On 2017/02/23 at 19:06:13, enne wrote: > LGTM
3 years, 9 months ago (2017-02-23 19:20:40 UTC) #9
enne (OOO)
+tapted as alternate sadrul
3 years, 9 months ago (2017-02-24 19:51:15 UTC) #14
sadrul
lgtm
3 years, 9 months ago (2017-02-25 01:46:27 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2715793002/20001
3 years, 9 months ago (2017-02-25 01:53:47 UTC) #17
commit-bot: I haz the power
3 years, 9 months ago (2017-02-25 03:50:57 UTC) #20
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/26abaa05f21dc00bd9f089e3aea0...

Powered by Google App Engine
This is Rietveld 408576698