OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |