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

Side by Side Diff: cc/layer_tree_host_unittest.cc

Issue 11368156: cc: Expose clear and swap on Region (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 8 years, 1 month 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
« no previous file with comments | « no previous file | cc/occlusion_tracker.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 "config.h" 5 #include "config.h"
6 6
7 #include "cc/layer_tree_host.h" 7 #include "cc/layer_tree_host.h"
8 8
9 #include "base/synchronization/lock.h" 9 #include "base/synchronization/lock.h"
10 #include "cc/content_layer.h" 10 #include "cc/content_layer.h"
(...skipping 1621 matching lines...) Expand 10 before | Expand all | Expand 10 after
1632 virtual void update(ResourceUpdateQueue&, const OcclusionTracker* occlusion, RenderingStats&) OVERRIDE 1632 virtual void update(ResourceUpdateQueue&, const OcclusionTracker* occlusion, RenderingStats&) OVERRIDE
1633 { 1633 {
1634 // Gain access to internals of the OcclusionTracker. 1634 // Gain access to internals of the OcclusionTracker.
1635 const TestOcclusionTracker* testOcclusion = static_cast<const TestOcclus ionTracker*>(occlusion); 1635 const TestOcclusionTracker* testOcclusion = static_cast<const TestOcclus ionTracker*>(occlusion);
1636 m_occludedScreenSpace = testOcclusion ? testOcclusion->occlusionInScreen Space() : Region(); 1636 m_occludedScreenSpace = testOcclusion ? testOcclusion->occlusionInScreen Space() : Region();
1637 } 1637 }
1638 1638
1639 virtual bool drawsContent() const OVERRIDE { return true; } 1639 virtual bool drawsContent() const OVERRIDE { return true; }
1640 1640
1641 const Region& occludedScreenSpace() const { return m_occludedScreenSpace; } 1641 const Region& occludedScreenSpace() const { return m_occludedScreenSpace; }
1642 void clearOccludedScreenSpace() { m_occludedScreenSpace = Region(); } 1642 void clearOccludedScreenSpace() { m_occludedScreenSpace.Clear(); }
1643 1643
1644 private: 1644 private:
1645 TestLayer() : Layer() { } 1645 TestLayer() : Layer() { }
1646 virtual ~TestLayer() { } 1646 virtual ~TestLayer() { }
1647 1647
1648 Region m_occludedScreenSpace; 1648 Region m_occludedScreenSpace;
1649 }; 1649 };
1650 1650
1651 static void setTestLayerPropertiesForTesting(TestLayer* layer, Layer* parent, co nst WebTransformationMatrix& transform, const gfx::PointF& anchor, const gfx::Po intF& position, const gfx::Size& bounds, bool opaque) 1651 static void setTestLayerPropertiesForTesting(TestLayer* layer, Layer* parent, co nst WebTransformationMatrix& transform, const gfx::PointF& anchor, const gfx::Po intF& position, const gfx::Size& bounds, bool opaque)
1652 { 1652 {
(...skipping 1572 matching lines...) Expand 10 before | Expand all | Expand 10 after
3225 int m_numCommitsDeferred; 3225 int m_numCommitsDeferred;
3226 int m_numCompleteCommits; 3226 int m_numCompleteCommits;
3227 }; 3227 };
3228 3228
3229 TEST_F(LayerTreeHostTestDeferCommits, runMultiThread) 3229 TEST_F(LayerTreeHostTestDeferCommits, runMultiThread)
3230 { 3230 {
3231 runTest(true); 3231 runTest(true);
3232 } 3232 }
3233 3233
3234 } // anonymous namespace 3234 } // anonymous namespace
OLDNEW
« no previous file with comments | « no previous file | cc/occlusion_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698