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

Side by Side Diff: cc/occlusion_tracker_unittest.cc

Issue 12212007: cc: Route offscreen context creation for compositor to the browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix typo Created 7 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 | Annotate | Revision Log
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/occlusion_tracker.h" 5 #include "cc/occlusion_tracker.h"
6 6
7 #include "cc/layer.h" 7 #include "cc/layer.h"
8 #include "cc/layer_animation_controller.h" 8 #include "cc/layer_animation_controller.h"
9 #include "cc/layer_impl.h" 9 #include "cc/layer_impl.h"
10 #include "cc/layer_tree_host_common.h" 10 #include "cc/layer_tree_host_common.h"
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 182
183 virtual void runMyTest() = 0; 183 virtual void runMyTest() = 0;
184 184
185 virtual void TearDown() 185 virtual void TearDown()
186 { 186 {
187 Types::destroyLayer(m_root); 187 Types::destroyLayer(m_root);
188 m_renderSurfaceLayerList.clear(); 188 m_renderSurfaceLayerList.clear();
189 m_renderSurfaceLayerListImpl.clear(); 189 m_renderSurfaceLayerListImpl.clear();
190 m_replicaLayers.clear(); 190 m_replicaLayers.clear();
191 m_maskLayers.clear(); 191 m_maskLayers.clear();
192 LayerTreeHost::setNeedsFilterContext(false);
193 } 192 }
194 193
195 typename Types::HostType* getHost(); 194 typename Types::HostType* getHost();
196 195
197 typename Types::ContentLayerType* createRoot(const gfx::Transform& transform , const gfx::PointF& position, const gfx::Size& bounds) 196 typename Types::ContentLayerType* createRoot(const gfx::Transform& transform , const gfx::PointF& position, const gfx::Size& bounds)
198 { 197 {
199 typename Types::ContentLayerPtrType layer(Types::createContentLayer(getH ost())); 198 typename Types::ContentLayerPtrType layer(Types::createContentLayer(getH ost()));
200 typename Types::ContentLayerType* layerPtr = layer.get(); 199 typename Types::ContentLayerType* layerPtr = layer.get();
201 setProperties(layerPtr, transform, position, bounds); 200 setProperties(layerPtr, transform, position, bounds);
202 201
(...skipping 2847 matching lines...) Expand 10 before | Expand all | Expand 10 after
3050 hasOcclusionFromOutsideTargetSurface = false; 3049 hasOcclusionFromOutsideTargetSurface = false;
3051 EXPECT_RECT_EQ(gfx::Rect(0, 0, 50, 50), occlusion.unoccludedContributing SurfaceContentRect(smaller, false, gfx::Rect(0, 0, 100, 100), &hasOcclusionFromO utsideTargetSurface)); 3050 EXPECT_RECT_EQ(gfx::Rect(0, 0, 50, 50), occlusion.unoccludedContributing SurfaceContentRect(smaller, false, gfx::Rect(0, 0, 100, 100), &hasOcclusionFromO utsideTargetSurface));
3052 EXPECT_FALSE(hasOcclusionFromOutsideTargetSurface); 3051 EXPECT_FALSE(hasOcclusionFromOutsideTargetSurface);
3053 } 3052 }
3054 }; 3053 };
3055 3054
3056 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestLayerClipIsExternalOcclusion) 3055 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestLayerClipIsExternalOcclusion)
3057 3056
3058 } // namespace 3057 } // namespace
3059 } // namespace cc 3058 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698