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

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

Issue 817653003: Update from https://crrev.com/309717 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 | « cc/layers/texture_layer_unittest.cc ('k') | cc/layers/tiled_layer_unittest.cc » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/tiled_layer_impl.h" 5 #include "cc/layers/tiled_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/tile_draw_quad.h" 8 #include "cc/quads/tile_draw_quad.h"
9 #include "cc/resources/layer_tiling_data.h" 9 #include "cc/resources/layer_tiling_data.h"
10 #include "cc/test/fake_impl_proxy.h" 10 #include "cc/test/fake_impl_proxy.h"
(...skipping 19 matching lines...) Expand all
30 scoped_ptr<LayerTilingData> tiler = 30 scoped_ptr<LayerTilingData> tiler =
31 LayerTilingData::Create(tile_size, border_texels); 31 LayerTilingData::Create(tile_size, border_texels);
32 tiler->SetTilingSize(layer_size); 32 tiler->SetTilingSize(layer_size);
33 layer->SetTilingData(*tiler); 33 layer->SetTilingData(*tiler);
34 layer->set_skips_draw(false); 34 layer->set_skips_draw(false);
35 layer->draw_properties().visible_content_rect = 35 layer->draw_properties().visible_content_rect =
36 gfx::Rect(layer_size); 36 gfx::Rect(layer_size);
37 layer->draw_properties().opacity = 1; 37 layer->draw_properties().opacity = 1;
38 layer->SetBounds(layer_size); 38 layer->SetBounds(layer_size);
39 layer->SetContentBounds(layer_size); 39 layer->SetContentBounds(layer_size);
40 layer->CreateRenderSurface(); 40 layer->SetHasRenderSurface(true);
41 layer->draw_properties().render_target = layer.get(); 41 layer->draw_properties().render_target = layer.get();
42 return layer.Pass(); 42 return layer.Pass();
43 } 43 }
44 44
45 // Create a default tiled layer with textures for all tiles and a default 45 // Create a default tiled layer with textures for all tiles and a default
46 // visibility of the entire layer size. 46 // visibility of the entire layer size.
47 scoped_ptr<TiledLayerImpl> CreateLayer( 47 scoped_ptr<TiledLayerImpl> CreateLayer(
48 const gfx::Size& tile_size, 48 const gfx::Size& tile_size,
49 const gfx::Size& layer_size, 49 const gfx::Size& layer_size,
50 LayerTilingData::BorderTexelOption border_texels) { 50 LayerTilingData::BorderTexelOption border_texels) {
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 LayerTestCommon::VerifyQuadsAreOccluded( 366 LayerTestCommon::VerifyQuadsAreOccluded(
367 impl.quad_list(), occluded, &partially_occluded_count); 367 impl.quad_list(), occluded, &partially_occluded_count);
368 // The layer outputs one quad, which is partially occluded. 368 // The layer outputs one quad, which is partially occluded.
369 EXPECT_EQ(100u - 10u, impl.quad_list().size()); 369 EXPECT_EQ(100u - 10u, impl.quad_list().size());
370 EXPECT_EQ(10u + 10u, partially_occluded_count); 370 EXPECT_EQ(10u + 10u, partially_occluded_count);
371 } 371 }
372 } 372 }
373 373
374 } // namespace 374 } // namespace
375 } // namespace cc 375 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/texture_layer_unittest.cc ('k') | cc/layers/tiled_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698