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

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

Issue 1180073015: cc: Remove LayerImpl::SetContentBounds() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rm-setcontentbounds: . Created 5 years, 6 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/surface_layer_impl_unittest.cc ('k') | cc/layers/ui_resource_layer_impl_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/texture_layer_impl.h" 5 #include "cc/layers/texture_layer_impl.h"
6 6
7 #include "cc/output/context_provider.h" 7 #include "cc/output/context_provider.h"
8 #include "cc/output/output_surface.h" 8 #include "cc/output/output_surface.h"
9 #include "cc/test/layer_test_common.h" 9 #include "cc/test/layer_test_common.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 13 matching lines...) Expand all
24 LayerTestCommon::LayerImplTest impl; 24 LayerTestCommon::LayerImplTest impl;
25 25
26 gpu::Mailbox mailbox; 26 gpu::Mailbox mailbox;
27 impl.output_surface()->context_provider()->ContextGL()->GenMailboxCHROMIUM( 27 impl.output_surface()->context_provider()->ContextGL()->GenMailboxCHROMIUM(
28 mailbox.name); 28 mailbox.name);
29 TextureMailbox texture_mailbox(mailbox, GL_TEXTURE_2D, 0); 29 TextureMailbox texture_mailbox(mailbox, GL_TEXTURE_2D, 0);
30 30
31 TextureLayerImpl* texture_layer_impl = 31 TextureLayerImpl* texture_layer_impl =
32 impl.AddChildToRoot<TextureLayerImpl>(); 32 impl.AddChildToRoot<TextureLayerImpl>();
33 texture_layer_impl->SetBounds(layer_size); 33 texture_layer_impl->SetBounds(layer_size);
34 texture_layer_impl->SetContentBounds(layer_size);
35 texture_layer_impl->SetDrawsContent(true); 34 texture_layer_impl->SetDrawsContent(true);
36 texture_layer_impl->SetTextureMailbox( 35 texture_layer_impl->SetTextureMailbox(
37 texture_mailbox, 36 texture_mailbox,
38 SingleReleaseCallbackImpl::Create(base::Bind(&IgnoreCallback))); 37 SingleReleaseCallbackImpl::Create(base::Bind(&IgnoreCallback)));
39 38
40 impl.CalcDrawProps(viewport_size); 39 impl.CalcDrawProps(viewport_size);
41 40
42 { 41 {
43 SCOPED_TRACE("No occlusion"); 42 SCOPED_TRACE("No occlusion");
44 gfx::Rect occluded; 43 gfx::Rect occluded;
(...skipping 22 matching lines...) Expand all
67 LayerTestCommon::VerifyQuadsAreOccluded( 66 LayerTestCommon::VerifyQuadsAreOccluded(
68 impl.quad_list(), occluded, &partially_occluded_count); 67 impl.quad_list(), occluded, &partially_occluded_count);
69 // The layer outputs one quad, which is partially occluded. 68 // The layer outputs one quad, which is partially occluded.
70 EXPECT_EQ(1u, impl.quad_list().size()); 69 EXPECT_EQ(1u, impl.quad_list().size());
71 EXPECT_EQ(1u, partially_occluded_count); 70 EXPECT_EQ(1u, partially_occluded_count);
72 } 71 }
73 } 72 }
74 73
75 } // namespace 74 } // namespace
76 } // namespace cc 75 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/surface_layer_impl_unittest.cc ('k') | cc/layers/ui_resource_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698