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

Issue 12326022: Efficiently handle image layer scaling (Closed)

Created:
7 years, 10 months ago by Xianzhu
Modified:
7 years, 9 months ago
CC:
chromium-reviews, cc-bugs_chromium.org, darin-cc_chromium.org, klobag.chromium, epenner
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Efficiently handle image layer scaling 1. Convert image scale caused by change of width/height to transformation scale in WebImageLayerImpl. 2. Don't scale up/down images when rastering image layers except for minimum contents scale. BUG=172563 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=184464

Patch Set 1 #

Total comments: 15

Patch Set 2 : Added missing files. Separate WebLayerImplFixedBounds. Still missing tests. #

Patch Set 3 : Handle sublayerTransform and anchor point #

Total comments: 6

Patch Set 4 : Export a symbol #

Patch Set 5 : Add black-box tests #

Total comments: 20

Patch Set 6 : Style change etc. #

Patch Set 7 : Converted style of web_layer_impl_fixed_bounds.h and cc #

Patch Set 8 : Removed else part in picture_image_layer_impl.cc #

Patch Set 9 : Fix some missed style conversions #

Patch Set 10 : Fix win warnings #

Unified diffs Side-by-side diffs Delta from patch set Stats (+539 lines, -37 lines) Patch
M cc/cc.gyp View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M cc/debug_colors.h View 1 chunk +3 lines, -0 lines 0 comments Download
M cc/debug_colors.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download
M cc/picture_image_layer.h View 2 chunks +3 lines, -5 lines 0 comments Download
M cc/picture_image_layer.cc View 1 2 3 4 3 chunks +10 lines, -15 lines 0 comments Download
A cc/picture_image_layer_impl.h View 1 1 chunk +39 lines, -0 lines 0 comments Download
A cc/picture_image_layer_impl.cc View 1 2 3 4 5 6 7 1 chunk +46 lines, -0 lines 0 comments Download
M cc/picture_layer_impl.h View 1 chunk +4 lines, -0 lines 0 comments Download
M cc/picture_layer_impl.cc View 1 4 chunks +27 lines, -14 lines 0 comments Download
M cc/test/geometry_test_utils.h View 1 2 3 4 5 1 chunk +7 lines, -0 lines 0 comments Download
M webkit/compositor_bindings/compositor_bindings.gyp View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M webkit/compositor_bindings/compositor_bindings_tests.gyp View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M webkit/compositor_bindings/web_image_layer_impl.cc View 1 2 3 4 5 6 3 chunks +5 lines, -3 lines 0 comments Download
A webkit/compositor_bindings/web_layer_impl_fixed_bounds.h View 1 2 3 4 5 6 1 chunk +53 lines, -0 lines 0 comments Download
A webkit/compositor_bindings/web_layer_impl_fixed_bounds.cc View 1 2 3 4 5 6 1 chunk +143 lines, -0 lines 0 comments Download
A webkit/compositor_bindings/web_layer_impl_fixed_bounds_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +190 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (0 generated)
Xianzhu
To fix maps pinch-zoom regression. The first version of patch is for preview. TODOs: 1. ...
7 years, 10 months ago (2013-02-20 23:18:41 UTC) #1
Xianzhu
https://codereview.chromium.org/12326022/diff/1/cc/picture_image_layer.cc File cc/picture_image_layer.cc (right): https://codereview.chromium.org/12326022/diff/1/cc/picture_image_layer.cc#newcode7 cc/picture_image_layer.cc:7: #include "cc/math_util.h" Will remove this line. https://codereview.chromium.org/12326022/diff/1/cc/picture_layer_impl.cc File cc/picture_layer_impl.cc ...
7 years, 10 months ago (2013-02-20 23:27:25 UTC) #2
Xianzhu
Does the added logic in compositor_bindings layer look good? I'm also preparing another change that ...
7 years, 10 months ago (2013-02-21 01:30:27 UTC) #3
enne (OOO)
+shawnsingh https://codereview.chromium.org/12326022/diff/1/cc/picture_layer_impl.cc File cc/picture_layer_impl.cc (right): https://codereview.chromium.org/12326022/diff/1/cc/picture_layer_impl.cc#newcode658 cc/picture_layer_impl.cc:658: void PictureLayerImpl::CalculateRasterContentsScale( Is this supposed to be overridden ...
7 years, 10 months ago (2013-02-21 02:15:30 UTC) #4
enne (OOO)
I also wanted to add that I like the idea of fixing an image layer's ...
7 years, 10 months ago (2013-02-21 02:18:36 UTC) #5
Xianzhu
https://codereview.chromium.org/12326022/diff/1/cc/picture_layer_impl.cc File cc/picture_layer_impl.cc (right): https://codereview.chromium.org/12326022/diff/1/cc/picture_layer_impl.cc#newcode658 cc/picture_layer_impl.cc:658: void PictureLayerImpl::CalculateRasterContentsScale( On 2013/02/21 02:15:30, enne wrote: > Is ...
7 years, 10 months ago (2013-02-21 02:47:46 UTC) #6
shawnsingh
https://codereview.chromium.org/12326022/diff/1/webkit/compositor_bindings/web_image_layer_impl.cc File webkit/compositor_bindings/web_image_layer_impl.cc (right): https://codereview.chromium.org/12326022/diff/1/webkit/compositor_bindings/web_image_layer_impl.cc#newcode46 webkit/compositor_bindings/web_image_layer_impl.cc:46: // TODO(wangxianzhu): Transform anchorPoint. I can confirm Enne's expectation ...
7 years, 10 months ago (2013-02-21 04:16:42 UTC) #7
Xianzhu
https://codereview.chromium.org/12326022/diff/1/webkit/compositor_bindings/web_image_layer_impl.cc File webkit/compositor_bindings/web_image_layer_impl.cc (right): https://codereview.chromium.org/12326022/diff/1/webkit/compositor_bindings/web_image_layer_impl.cc#newcode46 webkit/compositor_bindings/web_image_layer_impl.cc:46: // TODO(wangxianzhu): Transform anchorPoint. On 2013/02/21 04:16:42, shawnsingh wrote: ...
7 years, 10 months ago (2013-02-21 17:44:38 UTC) #8
enne (OOO)
https://codereview.chromium.org/12326022/diff/1/webkit/compositor_bindings/web_image_layer_impl.cc File webkit/compositor_bindings/web_image_layer_impl.cc (right): https://codereview.chromium.org/12326022/diff/1/webkit/compositor_bindings/web_image_layer_impl.cc#newcode31 webkit/compositor_bindings/web_image_layer_impl.cc:31: class WebLayerImplForPictureImageLayer : public WebLayerImpl { On 2013/02/21 02:47:47, ...
7 years, 10 months ago (2013-02-21 18:35:55 UTC) #9
shawnsingh
> > 2. Do we need to care about mask and replica layers when converting ...
7 years, 10 months ago (2013-02-21 19:17:06 UTC) #10
Xianzhu
PTAL 1. Added unit test 2. Undoes bounds scale for sublayerTransform 3. Handles non-zero anchor ...
7 years, 10 months ago (2013-02-21 23:03:15 UTC) #11
enne (OOO)
https://codereview.chromium.org/12326022/diff/11001/cc/picture_image_layer_impl.cc File cc/picture_image_layer_impl.cc (right): https://codereview.chromium.org/12326022/diff/11001/cc/picture_image_layer_impl.cc#newcode40 cc/picture_image_layer_impl.cc:40: if (ideal_contents_scale_ > I don't understand this math. If ...
7 years, 10 months ago (2013-02-22 00:10:49 UTC) #12
Xianzhu
https://codereview.chromium.org/12326022/diff/11001/cc/picture_image_layer_impl.cc File cc/picture_image_layer_impl.cc (right): https://codereview.chromium.org/12326022/diff/11001/cc/picture_image_layer_impl.cc#newcode40 cc/picture_image_layer_impl.cc:40: if (ideal_contents_scale_ > On 2013/02/22 00:10:49, enne wrote: > ...
7 years, 10 months ago (2013-02-22 00:53:30 UTC) #13
enne (OOO)
https://codereview.chromium.org/12326022/diff/11001/cc/picture_image_layer_impl.cc File cc/picture_image_layer_impl.cc (right): https://codereview.chromium.org/12326022/diff/11001/cc/picture_image_layer_impl.cc#newcode40 cc/picture_image_layer_impl.cc:40: if (ideal_contents_scale_ > Ok. Maybe there's more work to ...
7 years, 10 months ago (2013-02-22 01:18:17 UTC) #14
Xianzhu
PTAL. 1. Added black box tests to ensure WebLayerImplFixedBounds doesn't change the final geometries. 2. ...
7 years, 10 months ago (2013-02-22 23:24:38 UTC) #15
enne (OOO)
https://codereview.chromium.org/12326022/diff/10002/cc/layer.h File cc/layer.h (right): https://codereview.chromium.org/12326022/diff/10002/cc/layer.h#newcode217 cc/layer.h:217: std::string debugName() const { return m_debugName; } Not needed. ...
7 years, 10 months ago (2013-02-22 23:53:32 UTC) #16
enne (OOO)
https://codereview.chromium.org/12326022/diff/10002/webkit/compositor_bindings/web_layer_impl_fixed_bounds_unittest.cc File webkit/compositor_bindings/web_layer_impl_fixed_bounds_unittest.cc (right): https://codereview.chromium.org/12326022/diff/10002/webkit/compositor_bindings/web_layer_impl_fixed_bounds_unittest.cc#newcode132 webkit/compositor_bindings/web_layer_impl_fixed_bounds_unittest.cc:132: normalLayer->layer()->drawTransform().TransformRect(&normalLayerContentRect); Oh, scratch my previous comment. Can you not ...
7 years, 10 months ago (2013-02-22 23:55:44 UTC) #17
Xianzhu
https://codereview.chromium.org/12326022/diff/10002/cc/picture_image_layer_impl.cc File cc/picture_image_layer_impl.cc (right): https://codereview.chromium.org/12326022/diff/10002/cc/picture_image_layer_impl.cc#newcode41 cc/picture_image_layer_impl.cc:41: if (ideal_contents_scale_ != min_contents_scale) { On 2013/02/22 23:53:32, enne ...
7 years, 10 months ago (2013-02-23 00:05:20 UTC) #18
jamesr
On 2013/02/23 00:05:20, Xianzhu wrote: > webkit/compositor_bindings/web_layer_impl_fixed_bounds_unittest.cc:39: > gfx::Point3F transformPoint(const gfx::Transform& transform, const gfx::Point3F& > ...
7 years, 10 months ago (2013-02-23 00:54:32 UTC) #19
Xianzhu
https://codereview.chromium.org/12326022/diff/10002/cc/layer.h File cc/layer.h (right): https://codereview.chromium.org/12326022/diff/10002/cc/layer.h#newcode217 cc/layer.h:217: std::string debugName() const { return m_debugName; } On 2013/02/22 ...
7 years, 10 months ago (2013-02-23 00:56:19 UTC) #20
enne (OOO)
https://codereview.chromium.org/12326022/diff/10002/cc/picture_image_layer_impl.cc File cc/picture_image_layer_impl.cc (right): https://codereview.chromium.org/12326022/diff/10002/cc/picture_image_layer_impl.cc#newcode41 cc/picture_image_layer_impl.cc:41: if (ideal_contents_scale_ != min_contents_scale) { On 2013/02/23 00:05:20, Xianzhu ...
7 years, 10 months ago (2013-02-23 01:10:55 UTC) #21
Xianzhu
PTAL. All new files have been converted into Chromium style.
7 years, 10 months ago (2013-02-23 01:11:12 UTC) #22
Xianzhu
https://codereview.chromium.org/12326022/diff/10002/cc/picture_image_layer_impl.cc File cc/picture_image_layer_impl.cc (right): https://codereview.chromium.org/12326022/diff/10002/cc/picture_image_layer_impl.cc#newcode41 cc/picture_image_layer_impl.cc:41: if (ideal_contents_scale_ != min_contents_scale) { Done :)
7 years, 10 months ago (2013-02-23 01:17:19 UTC) #23
enne (OOO)
lgtm Thanks again for taking the time to write those tests. This makes me feel ...
7 years, 10 months ago (2013-02-23 04:24:18 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/12326022/17019
7 years, 10 months ago (2013-02-23 05:48:16 UTC) #25
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 10 months ago (2013-02-23 06:34:14 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/12326022/17019
7 years, 10 months ago (2013-02-23 06:57:32 UTC) #27
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 10 months ago (2013-02-23 07:01:35 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/12326022/4008
7 years, 9 months ago (2013-02-25 16:48:05 UTC) #29
commit-bot: I haz the power
7 years, 9 months ago (2013-02-25 19:59:22 UTC) #30
Message was sent while issue was closed.
Change committed as 184464

Powered by Google App Engine
This is Rietveld 408576698