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

Issue 317663005: Scale the ALPHA_THRESHOLD filter's region based on the device scale factor. (Closed)

Created:
6 years, 6 months ago by garykac
Modified:
6 years, 4 months ago
Reviewers:
danakj, jamesr, ajuma, Wez
CC:
chromium-reviews, tfarina, cc-bugs_chromium.org, danakj, Zachary Kuznia, Wez
Visibility:
Public.

Description

Scale the ALPHA_THRESHOLD filter's region based on the device scale factor. This cl passes the current DSF (device scale factor) into BuildImageFilter so that it can be used by the AlphaThreshold filter to scale the region based on the current pixel density. This requires https://codereview.chromium.org/340613005/ to land first. BUG=376532

Patch Set 1 #

Patch Set 2 : Remove code to enable AlphaShape. #

Patch Set 3 : Scale SkPath instead of SkRegion #

Patch Set 4 : Scale by DSF in layer #

Patch Set 5 : Revert surface filter changes #

Total comments: 8

Patch Set 6 : Review comments #

Total comments: 2

Patch Set 7 : Pass DSF to filter and add unit tests #

Patch Set 8 : Remove call to SetAlphaShape from this cl #

Total comments: 10

Patch Set 9 : Use separate x,y scales #

Patch Set 10 : Update cc_unittests #

Patch Set 11 : Remove call to SetAlphaShape #

Patch Set 12 : Use SkMatrix when creating AlphaFilter #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+192 lines, -60 lines) Patch
M cc/base/math_util.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M cc/base/math_util.cc View 1 2 3 4 5 6 7 8 1 chunk +7 lines, -0 lines 0 comments Download
M cc/layers/delegated_renderer_layer_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +20 lines, -18 lines 0 comments Download
M cc/layers/render_surface_impl.cc View 1 2 3 4 5 6 7 8 3 chunks +11 lines, -4 lines 2 comments Download
M cc/output/filter_operation.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 1 comment Download
M cc/output/filter_operations_unittest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +58 lines, -0 lines 0 comments Download
M cc/output/gl_renderer.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M cc/output/render_surface_filters.h View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -0 lines 0 comments Download
M cc/output/render_surface_filters.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +6 lines, -3 lines 0 comments Download
M cc/output/renderer_pixeltest.cc View 1 2 3 4 5 6 7 8 9 7 chunks +21 lines, -12 lines 0 comments Download
M cc/output/software_renderer.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M cc/quads/draw_quad_unittest.cc View 1 2 3 4 5 6 7 8 9 7 chunks +16 lines, -3 lines 0 comments Download
M cc/quads/render_pass_draw_quad.h View 1 2 3 4 5 6 7 8 3 chunks +9 lines, -2 lines 2 comments Download
M cc/quads/render_pass_draw_quad.cc View 1 2 3 4 5 6 7 8 4 chunks +19 lines, -6 lines 0 comments Download
M cc/quads/render_pass_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
M cc/surfaces/surface_aggregator_test_helpers.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
M cc/test/render_pass_test_common.cc View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -2 lines 0 comments Download
M cc/test/render_pass_test_utils.cc View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_host_unittest_delegated.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
M ui/compositor/layer.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -1 line 1 comment Download

Messages

Total messages: 21 (0 generated)
garykac
6 years, 6 months ago (2014-06-05 20:04:59 UTC) #1
jamesr
shouldn't this be using the scale into the surface being filtered, not the device scale ...
6 years, 6 months ago (2014-06-05 20:06:26 UTC) #2
danakj
Yes. Please do this the way the zoom filter does, using the surface size. On ...
6 years, 6 months ago (2014-06-05 21:56:23 UTC) #3
chromium-reviews
The surface size doesn't communicate any useful information about what DSF the content was produced ...
6 years, 6 months ago (2014-06-05 21:57:11 UTC) #4
garykac
On 2014/06/05 21:57:11, chromium-reviews_chromium.org wrote: > The surface size doesn't communicate any useful information about ...
6 years, 6 months ago (2014-06-05 23:04:39 UTC) #5
danakj
On Fri, Jun 6, 2014 at 1:04 AM, <garykac@chromium.org> wrote: > On 2014/06/05 21:57:11, chromium-reviews_chromium.org ...
6 years, 6 months ago (2014-06-06 15:31:47 UTC) #6
garykac
PTAL. I still need to add unittests, but wanted to run this past you to ...
6 years, 6 months ago (2014-06-06 22:50:37 UTC) #7
Wez
https://codereview.chromium.org/317663005/diff/80001/ui/compositor/layer.cc File ui/compositor/layer.cc (right): https://codereview.chromium.org/317663005/diff/80001/ui/compositor/layer.cc#newcode939 ui/compositor/layer.cc:939: // a path, scale the path and then convert ...
6 years, 6 months ago (2014-06-08 00:55:54 UTC) #8
garykac
https://codereview.chromium.org/317663005/diff/80001/ui/compositor/layer.cc File ui/compositor/layer.cc (right): https://codereview.chromium.org/317663005/diff/80001/ui/compositor/layer.cc#newcode939 ui/compositor/layer.cc:939: // a path, scale the path and then convert ...
6 years, 6 months ago (2014-06-09 21:30:00 UTC) #9
danakj
https://codereview.chromium.org/317663005/diff/100001/ui/compositor/layer.cc File ui/compositor/layer.cc (right): https://codereview.chromium.org/317663005/diff/100001/ui/compositor/layer.cc#newcode939 ui/compositor/layer.cc:939: // a path, scale the path and then convert ...
6 years, 6 months ago (2014-06-09 22:21:40 UTC) #10
garykac
Sorry for the delay responding - I was blocked on testing this for part of ...
6 years, 6 months ago (2014-06-16 23:31:28 UTC) #11
Wez
https://codereview.chromium.org/317663005/diff/130008/ui/compositor/layer.h File ui/compositor/layer.h (right): https://codereview.chromium.org/317663005/diff/130008/ui/compositor/layer.h#newcode456 ui/compositor/layer.h:456: // in device independent units, so it must be ...
6 years, 6 months ago (2014-06-17 01:57:48 UTC) #12
danakj
The layer's DSF is the device scale which the layer will be drawing with. The ...
6 years, 6 months ago (2014-06-17 21:35:28 UTC) #13
danakj
https://codereview.chromium.org/317663005/diff/130008/cc/output/render_surface_filters.cc File cc/output/render_surface_filters.cc (right): https://codereview.chromium.org/317663005/diff/130008/cc/output/render_surface_filters.cc#newcode281 cc/output/render_surface_filters.cc:281: scaled_shape, op.amount(), op.outer_threshold())); If you put a transform on ...
6 years, 6 months ago (2014-06-17 21:42:02 UTC) #14
garykac
https://codereview.chromium.org/317663005/diff/100001/ui/compositor/layer.cc File ui/compositor/layer.cc (right): https://codereview.chromium.org/317663005/diff/100001/ui/compositor/layer.cc#newcode939 ui/compositor/layer.cc:939: // a path, scale the path and then convert ...
6 years, 5 months ago (2014-07-10 23:02:24 UTC) #15
danakj
Thanks! This looks good. Can you add a test to https://code.google.com/p/chromium/codesearch#chromium/src/cc/trees/layer_tree_host_pixeltest_filters.cc&l=17 that demonstrates this scale ...
6 years, 5 months ago (2014-07-11 16:08:22 UTC) #16
danakj
Stephen just pointed out to me https://codereview.chromium.org/191123002/ which I had completely forgotten about. Does this ...
6 years, 5 months ago (2014-07-11 20:10:09 UTC) #17
Stephen White
If SkAlphaTresholdFilter applies its CTM to the region, it shouldn't be necessary to modify SkAlphaThresholFilter. ...
6 years, 5 months ago (2014-07-11 20:16:43 UTC) #18
garykac
On 2014/07/11 20:10:09, danakj wrote: > Stephen just pointed out to me https://codereview.chromium.org/191123002/ which > ...
6 years, 5 months ago (2014-07-11 20:17:56 UTC) #19
garykac
On 2014/07/11 20:16:43, Stephen White wrote: > If SkAlphaTresholdFilter applies its CTM to the region, ...
6 years, 5 months ago (2014-07-12 01:36:19 UTC) #20
garykac
6 years, 5 months ago (2014-07-25 18:18:59 UTC) #21
These issues have been addressed in crrev.com/394193003, which is replacing this
cl.

https://codereview.chromium.org/317663005/diff/210001/cc/layers/render_surfac...
File cc/layers/render_surface_impl.cc (right):

https://codereview.chromium.org/317663005/diff/210001/cc/layers/render_surfac...
cc/layers/render_surface_impl.cc:245: owning_layer_scale);
On 2014/07/11 16:08:22, danakj wrote:
> let's call this "owning_layer_to_target_scale" here and everywhere else
> (including comments, excluding render_surface_filters.cc and below)

Done.

https://codereview.chromium.org/317663005/diff/210001/cc/quads/render_pass_dr...
File cc/quads/render_pass_draw_quad.h (right):

https://codereview.chromium.org/317663005/diff/210001/cc/quads/render_pass_dr...
cc/quads/render_pass_draw_quad.h:66: // Layer scale. This scale has already been
applied to the pixels. It is
On 2014/07/11 16:08:22, danakj wrote:
> "The scale from layer space of root layer of the render pass to the render
pass
> physical pixels."

Done.

Powered by Google App Engine
This is Rietveld 408576698