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 "cc/layer_tree_host_impl.h" | 5 #include "cc/layer_tree_host_impl.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 virtual void SetNeedsRedrawOnImplThread() OVERRIDE { m_didRequestRedraw = tr
ue; } | 95 virtual void SetNeedsRedrawOnImplThread() OVERRIDE { m_didRequestRedraw = tr
ue; } |
96 virtual void DidInitializeVisibleTileOnImplThread() OVERRIDE { m_didUploadVi
sibleTile = true; } | 96 virtual void DidInitializeVisibleTileOnImplThread() OVERRIDE { m_didUploadVi
sibleTile = true; } |
97 virtual void SetNeedsCommitOnImplThread() OVERRIDE { m_didRequestCommit = tr
ue; } | 97 virtual void SetNeedsCommitOnImplThread() OVERRIDE { m_didRequestCommit = tr
ue; } |
98 virtual void SetNeedsManageTilesOnImplThread() OVERRIDE { } | 98 virtual void SetNeedsManageTilesOnImplThread() OVERRIDE { } |
99 virtual void PostAnimationEventsToMainThreadOnImplThread(scoped_ptr<Animatio
nEventsVector>, base::Time wallClockTime) OVERRIDE { } | 99 virtual void PostAnimationEventsToMainThreadOnImplThread(scoped_ptr<Animatio
nEventsVector>, base::Time wallClockTime) OVERRIDE { } |
100 virtual bool ReduceContentsTextureMemoryOnImplThread(size_t limitBytes, int
priorityCutoff) OVERRIDE { return m_reduceMemoryResult; } | 100 virtual bool ReduceContentsTextureMemoryOnImplThread(size_t limitBytes, int
priorityCutoff) OVERRIDE { return m_reduceMemoryResult; } |
101 virtual void ReduceWastedContentsTextureMemoryOnImplThread() OVERRIDE { } | 101 virtual void ReduceWastedContentsTextureMemoryOnImplThread() OVERRIDE { } |
102 virtual void SendManagedMemoryStats() OVERRIDE { } | 102 virtual void SendManagedMemoryStats() OVERRIDE { } |
103 virtual bool IsInsideDraw() OVERRIDE { return false; } | 103 virtual bool IsInsideDraw() OVERRIDE { return false; } |
104 virtual void RenewTreePriority() OVERRIDE { } | 104 virtual void RenewTreePriority() OVERRIDE { } |
| 105 virtual void RequestScrollbarAnimationOnImplThread(base::TimeDelta delay) OV
ERRIDE { } |
105 | 106 |
106 void setReduceMemoryResult(bool reduceMemoryResult) { m_reduceMemoryResult =
reduceMemoryResult; } | 107 void setReduceMemoryResult(bool reduceMemoryResult) { m_reduceMemoryResult =
reduceMemoryResult; } |
107 | 108 |
108 void createLayerTreeHost(bool partialSwap, scoped_ptr<OutputSurface> outputS
urface) | 109 void createLayerTreeHost(bool partialSwap, scoped_ptr<OutputSurface> outputS
urface) |
109 { | 110 { |
110 LayerTreeSettings settings; | 111 LayerTreeSettings settings; |
111 settings.minimumOcclusionTrackingSize = gfx::Size(); | 112 settings.minimumOcclusionTrackingSize = gfx::Size(); |
112 settings.partialSwapEnabled = partialSwap; | 113 settings.partialSwapEnabled = partialSwap; |
113 | 114 |
114 m_hostImpl = LayerTreeHostImpl::Create(settings, this, &m_proxy); | 115 m_hostImpl = LayerTreeHostImpl::Create(settings, this, &m_proxy); |
(...skipping 4226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4341 EXPECT_EQ(gfx::Rect(0, 0, 100, 100).ToString(), renderPassQuad->rect.ToS
tring()); | 4342 EXPECT_EQ(gfx::Rect(0, 0, 100, 100).ToString(), renderPassQuad->rect.ToS
tring()); |
4342 EXPECT_EQ(gfx::RectF(0.f, 0.f, 1.f, 1.f).ToString(), renderPassQuad->mas
k_uv_rect.ToString()); | 4343 EXPECT_EQ(gfx::RectF(0.f, 0.f, 1.f, 1.f).ToString(), renderPassQuad->mas
k_uv_rect.ToString()); |
4343 | 4344 |
4344 m_hostImpl->DrawLayers(&frame, base::TimeTicks::Now()); | 4345 m_hostImpl->DrawLayers(&frame, base::TimeTicks::Now()); |
4345 m_hostImpl->DidDrawAllLayers(frame); | 4346 m_hostImpl->DidDrawAllLayers(frame); |
4346 } | 4347 } |
4347 } | 4348 } |
4348 | 4349 |
4349 } // namespace | 4350 } // namespace |
4350 } // namespace cc | 4351 } // namespace cc |
OLD | NEW |