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

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

Issue 616543004: cc: Use visible_rect_for_tile_priority_ where approriate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Offset Created 6 years, 2 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 | « cc/layers/layer_impl.h ('k') | 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 "cc/layers/append_quads_data.h" 7 #include "cc/layers/append_quads_data.h"
8 #include "cc/quads/draw_quad.h" 8 #include "cc/quads/draw_quad.h"
9 #include "cc/resources/tile_priority.h" 9 #include "cc/resources/tile_priority.h"
10 #include "cc/test/fake_impl_proxy.h" 10 #include "cc/test/fake_impl_proxy.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 float page_scale_factor, 76 float page_scale_factor,
77 float maximum_animation_contents_scale, 77 float maximum_animation_contents_scale,
78 bool animating_transform_to_screen) { 78 bool animating_transform_to_screen) {
79 layer->draw_properties().ideal_contents_scale = ideal_contents_scale; 79 layer->draw_properties().ideal_contents_scale = ideal_contents_scale;
80 layer->draw_properties().device_scale_factor = device_scale_factor; 80 layer->draw_properties().device_scale_factor = device_scale_factor;
81 layer->draw_properties().page_scale_factor = page_scale_factor; 81 layer->draw_properties().page_scale_factor = page_scale_factor;
82 layer->draw_properties().maximum_animation_contents_scale = 82 layer->draw_properties().maximum_animation_contents_scale =
83 maximum_animation_contents_scale; 83 maximum_animation_contents_scale;
84 layer->draw_properties().screen_space_transform_is_animating = 84 layer->draw_properties().screen_space_transform_is_animating =
85 animating_transform_to_screen; 85 animating_transform_to_screen;
86 layer->UpdateTiles(Occlusion()); 86 bool resourceless_software_draw = false;
87 layer->UpdateTiles(Occlusion(), resourceless_software_draw);
87 } 88 }
88 89
89 protected: 90 protected:
90 FakeImplProxy proxy_; 91 FakeImplProxy proxy_;
91 FakeLayerTreeHostImpl host_impl_; 92 FakeLayerTreeHostImpl host_impl_;
92 TestSharedBitmapManager shared_bitmap_manager_; 93 TestSharedBitmapManager shared_bitmap_manager_;
93 FakePictureLayerTilingClient tiling_client_; 94 FakePictureLayerTilingClient tiling_client_;
94 }; 95 };
95 96
96 TEST_F(PictureImageLayerImplTest, CalculateContentsScale) { 97 TEST_F(PictureImageLayerImplTest, CalculateContentsScale) {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 active_layer->DidDraw(NULL); 155 active_layer->DidDraw(NULL);
155 156
156 EXPECT_EQ(DrawQuad::TILED_CONTENT, render_pass->quad_list.front()->material); 157 EXPECT_EQ(DrawQuad::TILED_CONTENT, render_pass->quad_list.front()->material);
157 158
158 // Tiles are ready at correct scale, so should not set had_incomplete_tile. 159 // Tiles are ready at correct scale, so should not set had_incomplete_tile.
159 EXPECT_EQ(0, data.num_incomplete_tiles); 160 EXPECT_EQ(0, data.num_incomplete_tiles);
160 } 161 }
161 162
162 } // namespace 163 } // namespace
163 } // namespace cc 164 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/layers/picture_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698