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

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

Issue 1180073015: cc: Remove LayerImpl::SetContentBounds() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rm-setcontentbounds: . Created 5 years, 6 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
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_impl_proxy.h" 10 #include "cc/test/fake_impl_proxy.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 tree = host_impl_.active_tree(); 52 tree = host_impl_.active_tree();
53 break; 53 break;
54 case PENDING_TREE: 54 case PENDING_TREE:
55 tree = host_impl_.pending_tree(); 55 tree = host_impl_.pending_tree();
56 break; 56 break;
57 } 57 }
58 TestablePictureImageLayerImpl* layer = 58 TestablePictureImageLayerImpl* layer =
59 new TestablePictureImageLayerImpl(tree, id); 59 new TestablePictureImageLayerImpl(tree, id);
60 layer->raster_source_ = FakePicturePileImpl::CreateInfiniteFilledPile(); 60 layer->raster_source_ = FakePicturePileImpl::CreateInfiniteFilledPile();
61 layer->SetBounds(layer->raster_source_->GetSize()); 61 layer->SetBounds(layer->raster_source_->GetSize());
62 layer->SetContentBounds(layer->raster_source_->GetSize());
63 return make_scoped_ptr(layer); 62 return make_scoped_ptr(layer);
64 } 63 }
65 64
66 void SetupDrawPropertiesAndUpdateTiles(TestablePictureImageLayerImpl* layer, 65 void SetupDrawPropertiesAndUpdateTiles(TestablePictureImageLayerImpl* layer,
67 float ideal_contents_scale, 66 float ideal_contents_scale,
68 float device_scale_factor, 67 float device_scale_factor,
69 float page_scale_factor, 68 float page_scale_factor,
70 float maximum_animation_contents_scale, 69 float maximum_animation_contents_scale,
71 bool animating_transform_to_screen, 70 bool animating_transform_to_screen,
72 gfx::Rect viewport_rect) { 71 gfx::Rect viewport_rect) {
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 active_layer->DidDraw(nullptr); 152 active_layer->DidDraw(nullptr);
154 153
155 EXPECT_EQ(DrawQuad::TILED_CONTENT, render_pass->quad_list.front()->material); 154 EXPECT_EQ(DrawQuad::TILED_CONTENT, render_pass->quad_list.front()->material);
156 155
157 // Tiles are ready at correct scale, so should not set had_incomplete_tile. 156 // Tiles are ready at correct scale, so should not set had_incomplete_tile.
158 EXPECT_EQ(0, data.num_incomplete_tiles); 157 EXPECT_EQ(0, data.num_incomplete_tiles);
159 } 158 }
160 159
161 } // namespace 160 } // namespace
162 } // namespace cc 161 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/painted_scrollbar_layer_impl_unittest.cc ('k') | cc/layers/picture_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698