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

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

Issue 1868003002: cc: Move RenderTarget Information to Effect Tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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/solid_color_layer_impl_unittest.cc ('k') | cc/trees/damage_tracker_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 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "cc/layers/append_quads_data.h" 7 #include "cc/layers/append_quads_data.h"
8 #include "cc/layers/ui_resource_layer_impl.h" 8 #include "cc/layers/ui_resource_layer_impl.h"
9 #include "cc/quads/draw_quad.h" 9 #include "cc/quads/draw_quad.h"
10 #include "cc/resources/ui_resource_bitmap.h" 10 #include "cc/resources/ui_resource_bitmap.h"
(...skipping 18 matching lines...) Expand all
29 const gfx::Size& bitmap_size, 29 const gfx::Size& bitmap_size,
30 const gfx::Size& layer_size, 30 const gfx::Size& layer_size,
31 bool opaque, 31 bool opaque,
32 UIResourceId uid) { 32 UIResourceId uid) {
33 gfx::Rect visible_layer_rect(layer_size); 33 gfx::Rect visible_layer_rect(layer_size);
34 scoped_ptr<UIResourceLayerImpl> layer = 34 scoped_ptr<UIResourceLayerImpl> layer =
35 UIResourceLayerImpl::Create(host_impl->active_tree(), 1); 35 UIResourceLayerImpl::Create(host_impl->active_tree(), 1);
36 layer->draw_properties().visible_layer_rect = visible_layer_rect; 36 layer->draw_properties().visible_layer_rect = visible_layer_rect;
37 layer->SetBounds(layer_size); 37 layer->SetBounds(layer_size);
38 layer->SetForceRenderSurface(true); 38 layer->SetForceRenderSurface(true);
39 layer->draw_properties().render_target = layer.get();
40 39
41 UIResourceBitmap bitmap(bitmap_size, opaque); 40 UIResourceBitmap bitmap(bitmap_size, opaque);
42 41
43 host_impl->CreateUIResource(uid, bitmap); 42 host_impl->CreateUIResource(uid, bitmap);
44 layer->SetUIResourceId(uid); 43 layer->SetUIResourceId(uid);
45 44
46 return layer; 45 return layer;
47 } 46 }
48 47
49 void QuadSizeTest(scoped_ptr<UIResourceLayerImpl> layer, 48 void QuadSizeTest(scoped_ptr<UIResourceLayerImpl> layer,
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 LayerTestCommon::VerifyQuadsAreOccluded( 213 LayerTestCommon::VerifyQuadsAreOccluded(
215 impl.quad_list(), occluded, &partially_occluded_count); 214 impl.quad_list(), occluded, &partially_occluded_count);
216 // The layer outputs one quad, which is partially occluded. 215 // The layer outputs one quad, which is partially occluded.
217 EXPECT_EQ(1u, impl.quad_list().size()); 216 EXPECT_EQ(1u, impl.quad_list().size());
218 EXPECT_EQ(1u, partially_occluded_count); 217 EXPECT_EQ(1u, partially_occluded_count);
219 } 218 }
220 } 219 }
221 220
222 } // namespace 221 } // namespace
223 } // namespace cc 222 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/solid_color_layer_impl_unittest.cc ('k') | cc/trees/damage_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698