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

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

Issue 723343002: Update from https://crrev.com/304121 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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_unittest.cc ('k') | cc/layers/picture_layer.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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 case NUM_TREES: 57 case NUM_TREES:
58 NOTREACHED(); 58 NOTREACHED();
59 break; 59 break;
60 } 60 }
61 TestablePictureImageLayerImpl* layer = 61 TestablePictureImageLayerImpl* layer =
62 new TestablePictureImageLayerImpl(tree, id); 62 new TestablePictureImageLayerImpl(tree, id);
63 layer->pile_ = FakePicturePileImpl::CreateInfiniteFilledPile(); 63 layer->raster_source_ = FakePicturePileImpl::CreateInfiniteFilledPile();
64 layer->SetBounds(layer->pile_->tiling_size()); 64 layer->SetBounds(layer->raster_source_->GetSize());
65 layer->SetContentBounds(layer->pile_->tiling_size()); 65 layer->SetContentBounds(layer->raster_source_->GetSize());
66 return make_scoped_ptr(layer); 66 return make_scoped_ptr(layer);
67 } 67 }
68 68
69 void SetupDrawPropertiesAndUpdateTiles(TestablePictureImageLayerImpl* layer, 69 void SetupDrawPropertiesAndUpdateTiles(TestablePictureImageLayerImpl* layer,
70 float ideal_contents_scale, 70 float ideal_contents_scale,
71 float device_scale_factor, 71 float device_scale_factor,
72 float page_scale_factor, 72 float page_scale_factor,
73 float maximum_animation_contents_scale, 73 float maximum_animation_contents_scale,
74 bool animating_transform_to_screen, 74 bool animating_transform_to_screen,
75 gfx::Rect viewport_rect) { 75 gfx::Rect viewport_rect) {
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 active_layer->DidDraw(nullptr); 156 active_layer->DidDraw(nullptr);
157 157
158 EXPECT_EQ(DrawQuad::TILED_CONTENT, render_pass->quad_list.front()->material); 158 EXPECT_EQ(DrawQuad::TILED_CONTENT, render_pass->quad_list.front()->material);
159 159
160 // Tiles are ready at correct scale, so should not set had_incomplete_tile. 160 // Tiles are ready at correct scale, so should not set had_incomplete_tile.
161 EXPECT_EQ(0, data.num_incomplete_tiles); 161 EXPECT_EQ(0, data.num_incomplete_tiles);
162 } 162 }
163 163
164 } // namespace 164 } // namespace
165 } // namespace cc 165 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_unittest.cc ('k') | cc/layers/picture_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698