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 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/tiled_layer_unittest.cc ('k') | cc/output/delegating_renderer_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 "cc/layers/append_quads_data.h" 5 #include "cc/layers/append_quads_data.h"
6 #include "cc/layers/ui_resource_layer_impl.h" 6 #include "cc/layers/ui_resource_layer_impl.h"
7 #include "cc/quads/draw_quad.h" 7 #include "cc/quads/draw_quad.h"
8 #include "cc/resources/ui_resource_bitmap.h" 8 #include "cc/resources/ui_resource_bitmap.h"
9 #include "cc/resources/ui_resource_client.h" 9 #include "cc/resources/ui_resource_client.h"
10 #include "cc/test/fake_impl_proxy.h" 10 #include "cc/test/fake_impl_proxy.h"
(...skipping 14 matching lines...) Expand all
25 const gfx::Size& bitmap_size, 25 const gfx::Size& bitmap_size,
26 const gfx::Size& layer_size, 26 const gfx::Size& layer_size,
27 bool opaque, 27 bool opaque,
28 UIResourceId uid) { 28 UIResourceId uid) {
29 gfx::Rect visible_content_rect(layer_size); 29 gfx::Rect visible_content_rect(layer_size);
30 scoped_ptr<UIResourceLayerImpl> layer = 30 scoped_ptr<UIResourceLayerImpl> layer =
31 UIResourceLayerImpl::Create(host_impl->active_tree(), 1); 31 UIResourceLayerImpl::Create(host_impl->active_tree(), 1);
32 layer->draw_properties().visible_content_rect = visible_content_rect; 32 layer->draw_properties().visible_content_rect = visible_content_rect;
33 layer->SetBounds(layer_size); 33 layer->SetBounds(layer_size);
34 layer->SetContentBounds(layer_size); 34 layer->SetContentBounds(layer_size);
35 layer->CreateRenderSurface(); 35 layer->SetHasRenderSurface(true);
36 layer->draw_properties().render_target = layer.get(); 36 layer->draw_properties().render_target = layer.get();
37 37
38 UIResourceBitmap bitmap(bitmap_size, opaque); 38 UIResourceBitmap bitmap(bitmap_size, opaque);
39 39
40 host_impl->CreateUIResource(uid, bitmap); 40 host_impl->CreateUIResource(uid, bitmap);
41 layer->SetUIResourceId(uid); 41 layer->SetUIResourceId(uid);
42 42
43 return layer.Pass(); 43 return layer.Pass();
44 } 44 }
45 45
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 LayerTestCommon::VerifyQuadsAreOccluded( 196 LayerTestCommon::VerifyQuadsAreOccluded(
197 impl.quad_list(), occluded, &partially_occluded_count); 197 impl.quad_list(), occluded, &partially_occluded_count);
198 // The layer outputs one quad, which is partially occluded. 198 // The layer outputs one quad, which is partially occluded.
199 EXPECT_EQ(1u, impl.quad_list().size()); 199 EXPECT_EQ(1u, impl.quad_list().size());
200 EXPECT_EQ(1u, partially_occluded_count); 200 EXPECT_EQ(1u, partially_occluded_count);
201 } 201 }
202 } 202 }
203 203
204 } // namespace 204 } // namespace
205 } // namespace cc 205 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/tiled_layer_unittest.cc ('k') | cc/output/delegating_renderer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698