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

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

Issue 951673002: Revert "Pull chromium at 2c3ffb2355a27c32f45e508ef861416b820c823b" (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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/picture_image_layer.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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 scoped_ptr<TestablePictureImageLayerImpl> CreateLayer(int id, 45 scoped_ptr<TestablePictureImageLayerImpl> CreateLayer(int id,
46 WhichTree which_tree) { 46 WhichTree which_tree) {
47 LayerTreeImpl* tree = nullptr; 47 LayerTreeImpl* tree = nullptr;
48 switch (which_tree) { 48 switch (which_tree) {
49 case ACTIVE_TREE: 49 case ACTIVE_TREE:
50 tree = host_impl_.active_tree(); 50 tree = host_impl_.active_tree();
51 break; 51 break;
52 case PENDING_TREE: 52 case PENDING_TREE:
53 tree = host_impl_.pending_tree(); 53 tree = host_impl_.pending_tree();
54 break; 54 break;
55 case NUM_TREES:
56 NOTREACHED();
57 break;
55 } 58 }
56 TestablePictureImageLayerImpl* layer = 59 TestablePictureImageLayerImpl* layer =
57 new TestablePictureImageLayerImpl(tree, id); 60 new TestablePictureImageLayerImpl(tree, id);
58 layer->raster_source_ = FakePicturePileImpl::CreateInfiniteFilledPile(); 61 layer->raster_source_ = FakePicturePileImpl::CreateInfiniteFilledPile();
59 layer->SetBounds(layer->raster_source_->GetSize()); 62 layer->SetBounds(layer->raster_source_->GetSize());
60 layer->SetContentBounds(layer->raster_source_->GetSize()); 63 layer->SetContentBounds(layer->raster_source_->GetSize());
61 return make_scoped_ptr(layer); 64 return make_scoped_ptr(layer);
62 } 65 }
63 66
64 void SetupDrawPropertiesAndUpdateTiles(TestablePictureImageLayerImpl* layer, 67 void SetupDrawPropertiesAndUpdateTiles(TestablePictureImageLayerImpl* layer,
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 active_layer->DidDraw(nullptr); 153 active_layer->DidDraw(nullptr);
151 154
152 EXPECT_EQ(DrawQuad::TILED_CONTENT, render_pass->quad_list.front()->material); 155 EXPECT_EQ(DrawQuad::TILED_CONTENT, render_pass->quad_list.front()->material);
153 156
154 // Tiles are ready at correct scale, so should not set had_incomplete_tile. 157 // Tiles are ready at correct scale, so should not set had_incomplete_tile.
155 EXPECT_EQ(0, data.num_incomplete_tiles); 158 EXPECT_EQ(0, data.num_incomplete_tiles);
156 } 159 }
157 160
158 } // namespace 161 } // namespace
159 } // namespace cc 162 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_image_layer.cc ('k') | cc/layers/picture_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698