diff options
author | enne <enne@chromium.org> | 2015-02-18 17:27:36 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-19 01:28:29 +0000 |
commit | af5bda38151cf75f19bb8434b4aa0653bdfccc7e (patch) | |
tree | c827fb99e1cefbd5cbb1436b100dfbb00f2b0375 /cc/layers/picture_layer_impl_perftest.cc | |
parent | 41d94b4931866d75bdbe9b75377b7608bba63d3a (diff) | |
download | chromium_src-af5bda38151cf75f19bb8434b4aa0653bdfccc7e.zip chromium_src-af5bda38151cf75f19bb8434b4aa0653bdfccc7e.tar.gz chromium_src-af5bda38151cf75f19bb8434b4aa0653bdfccc7e.tar.bz2 |
cc: Calculate "can use lcd text" on the compositor thread
Property trees don't calculate lcd text settings on the main thread, so
to move to them, these calculations need to move to the compositor
thread.
There's nothing tied to the main thread, other than only changing lcd
text during a commit. This restriction avoids the pitfall of tile
versions (i.e. changing out content in place with different settings) by
only changing content and invalidating during a commit, which already
waits for rasterization to occur before displaying that content.
That restriction is satisfied by only updating lcd text on picture
layers during an update on the sync tree on new frame numbers.
Review URL: https://codereview.chromium.org/913203006
Cr-Commit-Position: refs/heads/master@{#316955}
Diffstat (limited to 'cc/layers/picture_layer_impl_perftest.cc')
-rw-r--r-- | cc/layers/picture_layer_impl_perftest.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/cc/layers/picture_layer_impl_perftest.cc b/cc/layers/picture_layer_impl_perftest.cc index 62f4129..ea73cb2 100644 --- a/cc/layers/picture_layer_impl_perftest.cc +++ b/cc/layers/picture_layer_impl_perftest.cc @@ -72,7 +72,8 @@ class PictureLayerImplPerfTest : public testing::Test { int num_tiles, const gfx::Size& viewport_size) { host_impl_.SetViewportSize(viewport_size); - host_impl_.pending_tree()->UpdateDrawProperties(); + bool update_lcd_text = false; + host_impl_.pending_tree()->UpdateDrawProperties(update_lcd_text); timer_.Reset(); do { @@ -96,7 +97,8 @@ class PictureLayerImplPerfTest : public testing::Test { host_impl_.SetViewportSize(viewport.size()); pending_layer_->PushScrollOffsetFromMainThread( gfx::ScrollOffset(viewport.x(), viewport.y())); - host_impl_.pending_tree()->UpdateDrawProperties(); + bool update_lcd_text = false; + host_impl_.pending_tree()->UpdateDrawProperties(update_lcd_text); timer_.Reset(); do { @@ -114,7 +116,8 @@ class PictureLayerImplPerfTest : public testing::Test { int num_tiles, const gfx::Size& viewport_size) { host_impl_.SetViewportSize(viewport_size); - host_impl_.pending_tree()->UpdateDrawProperties(); + bool update_lcd_text = false; + host_impl_.pending_tree()->UpdateDrawProperties(update_lcd_text); TreePriority priorities[] = {SAME_PRIORITY_FOR_BOTH_TREES, SMOOTHNESS_TAKES_PRIORITY, @@ -145,7 +148,8 @@ class PictureLayerImplPerfTest : public testing::Test { host_impl_.SetViewportSize(viewport.size()); pending_layer_->PushScrollOffsetFromMainThread( gfx::ScrollOffset(viewport.x(), viewport.y())); - host_impl_.pending_tree()->UpdateDrawProperties(); + bool update_lcd_text = false; + host_impl_.pending_tree()->UpdateDrawProperties(update_lcd_text); TreePriority priorities[] = {SAME_PRIORITY_FOR_BOTH_TREES, SMOOTHNESS_TAKES_PRIORITY, |