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

Issue 2134253002: Adjust src and dest rects when drawing images instead of using a clip (Closed)

Created:
4 years, 5 months ago by pdr.
Modified:
4 years, 5 months ago
Reviewers:
chrishtr, f(malita)
CC:
blink-reviews, blink-reviews-paint_chromium.org, chromium-reviews, dshwang, slimming-paint-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Adjust src and dest rects when drawing images instead of using a clip This patch removes a clip recorder in ImagePainter and VideoPainter and simply adjusts the rects passed to GraphicsContext::drawImage. This also fixes several tests using spv2 which were not applying the spv1-only clip. There's a minor resampling artifact on three tests which, regrettably, must be turned into pixel tests. BUG=627145 Committed: https://crrev.com/e7678ecd5f7c5bbdbfb78df2d8269a79e06236d4 Cr-Commit-Position: refs/heads/master@{#405033}

Patch Set 1 #

Total comments: 12

Patch Set 2 : Address reviewer comments #

Patch Set 3 : Improve ImagePainter.h comment about coordinate spaces #

Patch Set 4 : Bail if pixelSnappedContentRect.isEmpty(), like fmalita said we should do #

Patch Set 5 : Remove dcheck for containment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+86 lines, -124 lines) Patch
M third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2 View 1 3 chunks +0 lines, -14 lines 0 comments Download
M third_party/WebKit/LayoutTests/TestExpectations View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
D third_party/WebKit/LayoutTests/compositing/img-layer-object-fit-expected.html View 1 1 chunk +0 lines, -11 lines 0 comments Download
A third_party/WebKit/LayoutTests/compositing/img-layer-object-fit-expected.png View 1 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/compositing/img-layer-object-fit-expected.txt View 1 1 chunk +17 lines, -0 lines 0 comments Download
D third_party/WebKit/LayoutTests/fast/css/object-fit-grow-landscape-expected.html View 1 chunk +0 lines, -36 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css/object-fit-grow-landscape-expected.png View 1 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/fast/css/object-fit-grow-landscape-expected.txt View 1 1 chunk +18 lines, -0 lines 0 comments Download
D third_party/WebKit/LayoutTests/fast/css/object-fit-grow-portrait-expected.html View 1 chunk +0 lines, -35 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css/object-fit-grow-portrait-expected.png View 1 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/fast/css/object-fit-grow-portrait-expected.txt View 1 1 chunk +18 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/paint/ImagePainter.h View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/paint/ImagePainter.cpp View 1 2 3 4 2 chunks +21 lines, -17 lines 0 comments Download
M third_party/WebKit/Source/core/paint/VideoPainter.cpp View 3 chunks +4 lines, -10 lines 0 comments Download

Messages

Total messages: 60 (31 generated)
pdr.
4 years, 5 months ago (2016-07-11 18:02:49 UTC) #3
chrishtr
https://codereview.chromium.org/2134253002/diff/1/third_party/WebKit/LayoutTests/TestExpectations File third_party/WebKit/LayoutTests/TestExpectations (right): https://codereview.chromium.org/2134253002/diff/1/third_party/WebKit/LayoutTests/TestExpectations#newcode1381 third_party/WebKit/LayoutTests/TestExpectations:1381: crbug.com/627145 fast/css/object-fit-grow-landscape.html [ NeedsRebaseline ] Please upload rebaselines on ...
4 years, 5 months ago (2016-07-11 18:11:24 UTC) #5
f(malita)
https://codereview.chromium.org/2134253002/diff/1/third_party/WebKit/Source/core/paint/ImagePainter.cpp File third_party/WebKit/Source/core/paint/ImagePainter.cpp (right): https://codereview.chromium.org/2134253002/diff/1/third_party/WebKit/Source/core/paint/ImagePainter.cpp#newcode147 third_party/WebKit/Source/core/paint/ImagePainter.cpp:147: context.drawImage(image.get(), snappedDest, &srcRect, SkXfermode::kSrcOver_Mode, So previously we were always ...
4 years, 5 months ago (2016-07-11 18:57:09 UTC) #6
pdr.
On 2016/07/11 at 18:57:09, fmalita wrote: > https://codereview.chromium.org/2134253002/diff/1/third_party/WebKit/Source/core/paint/ImagePainter.cpp > File third_party/WebKit/Source/core/paint/ImagePainter.cpp (right): > > https://codereview.chromium.org/2134253002/diff/1/third_party/WebKit/Source/core/paint/ImagePainter.cpp#newcode147 ...
4 years, 5 months ago (2016-07-11 19:02:24 UTC) #7
f(malita)
On 2016/07/11 19:02:24, pdr. wrote: > On 2016/07/11 at 18:57:09, fmalita wrote: > > > ...
4 years, 5 months ago (2016-07-11 19:18:57 UTC) #8
f(malita)
On 2016/07/11 19:18:57, f(malita) wrote: > On 2016/07/11 19:02:24, pdr. wrote: > > On 2016/07/11 ...
4 years, 5 months ago (2016-07-11 19:34:34 UTC) #9
pdr.
> > > > I do have a related question though--the new code goes down ...
4 years, 5 months ago (2016-07-11 19:41:55 UTC) #12
f(malita)
lgtm https://codereview.chromium.org/2134253002/diff/1/third_party/WebKit/Source/core/paint/ImagePainter.cpp File third_party/WebKit/Source/core/paint/ImagePainter.cpp (right): https://codereview.chromium.org/2134253002/diff/1/third_party/WebKit/Source/core/paint/ImagePainter.cpp#newcode137 third_party/WebKit/Source/core/paint/ImagePainter.cpp:137: snappedContentRect.intersect(snappedDest); Can the intersection be empty? Should we ...
4 years, 5 months ago (2016-07-11 19:43:01 UTC) #13
pdr.
On 2016/07/11 at 19:41:55, pdr. wrote: > > > > > > I do have ...
4 years, 5 months ago (2016-07-11 19:43:11 UTC) #14
f(malita)
On 2016/07/11 19:43:11, pdr. wrote: > On 2016/07/11 at 19:41:55, pdr. wrote: > > > ...
4 years, 5 months ago (2016-07-11 19:45:54 UTC) #15
pdr.
PTAL https://codereview.chromium.org/2134253002/diff/1/third_party/WebKit/LayoutTests/TestExpectations File third_party/WebKit/LayoutTests/TestExpectations (right): https://codereview.chromium.org/2134253002/diff/1/third_party/WebKit/LayoutTests/TestExpectations#newcode1381 third_party/WebKit/LayoutTests/TestExpectations:1381: crbug.com/627145 fast/css/object-fit-grow-landscape.html [ NeedsRebaseline ] On 2016/07/11 at ...
4 years, 5 months ago (2016-07-11 19:58:17 UTC) #16
pdr.
> > Also, it's unclear from context here what you mean by "paint into destRect", ...
4 years, 5 months ago (2016-07-11 21:09:20 UTC) #20
chrishtr
lgtm
4 years, 5 months ago (2016-07-11 22:14:44 UTC) #23
pdr.
On 2016/07/11 at 19:43:01, fmalita wrote: > lgtm > > https://codereview.chromium.org/2134253002/diff/1/third_party/WebKit/Source/core/paint/ImagePainter.cpp > File third_party/WebKit/Source/core/paint/ImagePainter.cpp (right): ...
4 years, 5 months ago (2016-07-12 00:29:11 UTC) #28
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/2134253002/60001
4 years, 5 months ago (2016-07-12 00:31:03 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/258060) win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, ...
4 years, 5 months ago (2016-07-12 01:05:22 UTC) #34
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/2134253002/60001
4 years, 5 months ago (2016-07-12 02:43:35 UTC) #36
pdr.
On 2016/07/12 at 02:43:35, commit-bot wrote: > CQ is trying da patch. Follow status at ...
4 years, 5 months ago (2016-07-12 02:47:20 UTC) #38
pdr.
This is another floating point issue. benchmarks.benchmark_smoke_unittest.BenchmarkSmokeTest.service_worker.service_worker has the following: srcRect: 0.000000, 0.000000, 800.000000, 600.000000 ...
4 years, 5 months ago (2016-07-12 02:58:35 UTC) #41
f(malita)
On 2016/07/12 02:58:35, pdr. wrote: > This is another floating point issue. > benchmarks.benchmark_smoke_unittest.BenchmarkSmokeTest.service_worker.service_worker > ...
4 years, 5 months ago (2016-07-12 16:48:48 UTC) #44
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/2134253002/80001
4 years, 5 months ago (2016-07-12 19:33:25 UTC) #47
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/191693)
4 years, 5 months ago (2016-07-12 22:38:39 UTC) #49
pdr.
On 2016/07/12 at 22:38:39, commit-bot wrote: > Try jobs failed on following builders: > linux_chromium_asan_rel_ng ...
4 years, 5 months ago (2016-07-12 22:53:14 UTC) #50
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/2134253002/80001
4 years, 5 months ago (2016-07-12 22:55:02 UTC) #52
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/243020)
4 years, 5 months ago (2016-07-13 01:00:01 UTC) #54
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/2134253002/80001
4 years, 5 months ago (2016-07-13 02:45:10 UTC) #56
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 5 months ago (2016-07-13 05:00:47 UTC) #57
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-13 05:00:58 UTC) #58
commit-bot: I haz the power
4 years, 5 months ago (2016-07-13 05:03:27 UTC) #60
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/e7678ecd5f7c5bbdbfb78df2d8269a79e06236d4
Cr-Commit-Position: refs/heads/master@{#405033}

Powered by Google App Engine
This is Rietveld 408576698