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

Side by Side Diff: cc/layers/picture_image_layer_impl_unittest.cc

Issue 1591513002: cc: Early out of UpdateTiles for resoureceless draw (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix perftests Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | cc/layers/picture_layer_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/layers/picture_image_layer_impl.h" 5 #include "cc/layers/picture_image_layer_impl.h"
6 6
7 #include "base/thread_task_runner_handle.h" 7 #include "base/thread_task_runner_handle.h"
8 #include "cc/layers/append_quads_data.h" 8 #include "cc/layers/append_quads_data.h"
9 #include "cc/quads/draw_quad.h" 9 #include "cc/quads/draw_quad.h"
10 #include "cc/test/fake_display_list_raster_source.h" 10 #include "cc/test/fake_display_list_raster_source.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 gfx::Rect viewport_rect) { 85 gfx::Rect viewport_rect) {
86 gfx::Transform scale_transform; 86 gfx::Transform scale_transform;
87 scale_transform.Scale(ideal_contents_scale, ideal_contents_scale); 87 scale_transform.Scale(ideal_contents_scale, ideal_contents_scale);
88 layer->draw_properties().target_space_transform = scale_transform; 88 layer->draw_properties().target_space_transform = scale_transform;
89 DCHECK_EQ(layer->GetIdealContentsScale(), ideal_contents_scale); 89 DCHECK_EQ(layer->GetIdealContentsScale(), ideal_contents_scale);
90 layer->draw_properties().maximum_animation_contents_scale = 90 layer->draw_properties().maximum_animation_contents_scale =
91 maximum_animation_contents_scale; 91 maximum_animation_contents_scale;
92 layer->draw_properties().screen_space_transform_is_animating = 92 layer->draw_properties().screen_space_transform_is_animating =
93 animating_transform_to_screen; 93 animating_transform_to_screen;
94 layer->draw_properties().visible_layer_rect = viewport_rect; 94 layer->draw_properties().visible_layer_rect = viewport_rect;
95 bool resourceless_software_draw = false; 95 layer->UpdateTiles();
96 layer->UpdateTiles(resourceless_software_draw);
97 } 96 }
98 97
99 protected: 98 protected:
100 FakeImplTaskRunnerProvider task_runner_provider_; 99 FakeImplTaskRunnerProvider task_runner_provider_;
101 TestSharedBitmapManager shared_bitmap_manager_; 100 TestSharedBitmapManager shared_bitmap_manager_;
102 TestTaskGraphRunner task_graph_runner_; 101 TestTaskGraphRunner task_graph_runner_;
103 scoped_ptr<OutputSurface> output_surface_; 102 scoped_ptr<OutputSurface> output_surface_;
104 FakeLayerTreeHostImpl host_impl_; 103 FakeLayerTreeHostImpl host_impl_;
105 }; 104 };
106 105
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 active_layer->DidDraw(nullptr); 168 active_layer->DidDraw(nullptr);
170 169
171 EXPECT_EQ(DrawQuad::TILED_CONTENT, render_pass->quad_list.front()->material); 170 EXPECT_EQ(DrawQuad::TILED_CONTENT, render_pass->quad_list.front()->material);
172 171
173 // Tiles are ready at correct scale, so should not set had_incomplete_tile. 172 // Tiles are ready at correct scale, so should not set had_incomplete_tile.
174 EXPECT_EQ(0, data.num_incomplete_tiles); 173 EXPECT_EQ(0, data.num_incomplete_tiles);
175 } 174 }
176 175
177 } // namespace 176 } // namespace
178 } // namespace cc 177 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/layers/picture_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698