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

Issue 1674123003: Remove unnecessary style calculations in HTMLCanvasElement (Closed)

Created:
4 years, 10 months ago by Justin Novosad
Modified:
4 years, 10 months ago
Reviewers:
chrishtr
CC:
ajuma+watch-canvas_chromium.org, blink-reviews, blink-reviews-html_chromium.org, Rik, chromium-reviews, dglazkov+blink, dshwang
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove unnecessary style calculations in HTMLCanvasElement When creating a WebGL canvas, and when allocating a 2D canvas backing, the implementation was triggering an immediate style calculation to evaluate the image-redering CSS property. This CL gets rid of of these calculations by relying on the fact that if the style is dirty, it will be updated before the next paint, which will allow for the state to be corrected after the fact, if necessary. BUG=585135 Committed: https://crrev.com/4f3d842e26a4e568985fcbf98f24be49c324898e Cr-Commit-Position: refs/heads/master@{#374753}

Patch Set 1 #

Total comments: 1

Patch Set 2 : v2 #

Patch Set 3 : simplifications #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -28 lines) Patch
M third_party/WebKit/Source/core/html/HTMLCanvasElement.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp View 1 2 5 chunks +10 lines, -27 lines 1 comment Download

Messages

Total messages: 17 (6 generated)
Justin Novosad
PTAL
4 years, 10 months ago (2016-02-08 21:58:19 UTC) #2
chrishtr
https://codereview.chromium.org/1674123003/diff/1/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp File third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp (right): https://codereview.chromium.org/1674123003/diff/1/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp#newcode270 third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp:270: updateContextFilterQuality(); Why do you still need to update the ...
4 years, 10 months ago (2016-02-09 18:11:20 UTC) #4
Justin Novosad
On 2016/02/09 18:11:20, chrishtr wrote: > https://codereview.chromium.org/1674123003/diff/1/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp > File third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp (right): > > https://codereview.chromium.org/1674123003/diff/1/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp#newcode270 > ...
4 years, 10 months ago (2016-02-09 19:55:23 UTC) #5
Justin Novosad
New patch. This works: I just handle the style during paint. Even though HTMLCanvasElement::paint is ...
4 years, 10 months ago (2016-02-09 20:20:26 UTC) #6
chrishtr
https://codereview.chromium.org/1674123003/diff/40001/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp File third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp (right): https://codereview.chromium.org/1674123003/diff/40001/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp#newcode439 third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp:439: const ComputedStyle* style = ensureComputedStyle(); The change looks good, ...
4 years, 10 months ago (2016-02-10 17:53:41 UTC) #7
Justin Novosad
On 2016/02/10 17:53:41, chrishtr wrote: > https://codereview.chromium.org/1674123003/diff/40001/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp > File third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp (right): > > https://codereview.chromium.org/1674123003/diff/40001/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp#newcode439 > ...
4 years, 10 months ago (2016-02-10 18:05:19 UTC) #8
chrishtr
On 2016/02/10 at 18:05:19, junov wrote: > On 2016/02/10 17:53:41, chrishtr wrote: > > https://codereview.chromium.org/1674123003/diff/40001/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp ...
4 years, 10 months ago (2016-02-10 18:36:32 UTC) #9
chrishtr
lgtm
4 years, 10 months ago (2016-02-10 18:36:35 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1674123003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1674123003/40001
4 years, 10 months ago (2016-02-10 19:11:39 UTC) #13
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 10 months ago (2016-02-10 22:39:14 UTC) #15
commit-bot: I haz the power
4 years, 10 months ago (2016-02-16 22:31:50 UTC) #17
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/4f3d842e26a4e568985fcbf98f24be49c324898e
Cr-Commit-Position: refs/heads/master@{#374753}

Powered by Google App Engine
This is Rietveld 408576698