OLD | NEW |
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/gl_renderer.h" | 5 #include "cc/gl_renderer.h" |
6 | 6 |
7 #include "cc/draw_quad.h" | 7 #include "cc/draw_quad.h" |
8 #include "cc/prioritized_resource_manager.h" | 8 #include "cc/prioritized_resource_manager.h" |
9 #include "cc/resource_provider.h" | 9 #include "cc/resource_provider.h" |
10 #include "cc/test/fake_impl_proxy.h" | 10 #include "cc/test/fake_impl_proxy.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 | 75 |
76 // RendererClient methods. | 76 // RendererClient methods. |
77 virtual const gfx::Size& deviceViewportSize() const OVERRIDE { static gfx::S
ize fakeSize(1, 1); return fakeSize; } | 77 virtual const gfx::Size& deviceViewportSize() const OVERRIDE { static gfx::S
ize fakeSize(1, 1); return fakeSize; } |
78 virtual const LayerTreeSettings& settings() const OVERRIDE { static LayerTre
eSettings fakeSettings; return fakeSettings; } | 78 virtual const LayerTreeSettings& settings() const OVERRIDE { static LayerTre
eSettings fakeSettings; return fakeSettings; } |
79 virtual void didLoseOutputSurface() OVERRIDE { } | 79 virtual void didLoseOutputSurface() OVERRIDE { } |
80 virtual void onSwapBuffersComplete() OVERRIDE { } | 80 virtual void onSwapBuffersComplete() OVERRIDE { } |
81 virtual void setFullRootLayerDamage() OVERRIDE { m_setFullRootLayerDamageCou
nt++; } | 81 virtual void setFullRootLayerDamage() OVERRIDE { m_setFullRootLayerDamageCou
nt++; } |
82 virtual void setManagedMemoryPolicy(const ManagedMemoryPolicy& policy) OVERR
IDE { m_memoryAllocationLimitBytes = policy.bytesLimitWhenVisible; } | 82 virtual void setManagedMemoryPolicy(const ManagedMemoryPolicy& policy) OVERR
IDE { m_memoryAllocationLimitBytes = policy.bytesLimitWhenVisible; } |
83 virtual void enforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy) O
VERRIDE { if (m_lastCallWasSetVisibility) *m_lastCallWasSetVisibility = false; } | 83 virtual void enforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy) O
VERRIDE { if (m_lastCallWasSetVisibility) *m_lastCallWasSetVisibility = false; } |
84 virtual bool hasImplThread() const OVERRIDE { return false; } | 84 virtual bool hasImplThread() const OVERRIDE { return false; } |
| 85 virtual void onReceivedLatencyInfo(const WebKit::WebLatencyInfoImpl&) OVERRI
DE { } |
85 | 86 |
86 // Methods added for test. | 87 // Methods added for test. |
87 int setFullRootLayerDamageCount() const { return m_setFullRootLayerDamageCou
nt; } | 88 int setFullRootLayerDamageCount() const { return m_setFullRootLayerDamageCou
nt; } |
88 void setLastCallWasSetVisibilityPointer(bool* lastCallWasSetVisibility) { m_
lastCallWasSetVisibility = lastCallWasSetVisibility; } | 89 void setLastCallWasSetVisibilityPointer(bool* lastCallWasSetVisibility) { m_
lastCallWasSetVisibility = lastCallWasSetVisibility; } |
89 | 90 |
90 RenderPass* rootRenderPass() { return m_renderPassesInDrawOrder.back(); } | 91 RenderPass* rootRenderPass() { return m_renderPassesInDrawOrder.back(); } |
91 RenderPassList& renderPassesInDrawOrder() { return m_renderPassesInDrawOrder
; } | 92 RenderPassList& renderPassesInDrawOrder() { return m_renderPassesInDrawOrder
; } |
92 RenderPassIdHashMap& renderPasses() { return m_renderPasses; } | 93 RenderPassIdHashMap& renderPasses() { return m_renderPasses; } |
93 | 94 |
94 size_t memoryAllocationLimitBytes() const { return m_memoryAllocationLimitBy
tes; } | 95 size_t memoryAllocationLimitBytes() const { return m_memoryAllocationLimitBy
tes; } |
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
573 it != pass->quad_list.backToFrontEnd(); ++it) { | 574 it != pass->quad_list.backToFrontEnd(); ++it) { |
574 renderer.drawQuad(drawingFrame, *it); | 575 renderer.drawQuad(drawingFrame, *it); |
575 } | 576 } |
576 renderer.finishDrawingQuadList(); | 577 renderer.finishDrawingQuadList(); |
577 EXPECT_EQ(context->activeTexture(), GL_TEXTURE0); | 578 EXPECT_EQ(context->activeTexture(), GL_TEXTURE0); |
578 Mock::VerifyAndClearExpectations(context); | 579 Mock::VerifyAndClearExpectations(context); |
579 } | 580 } |
580 | 581 |
581 } // namespace | 582 } // namespace |
582 } // namespace cc | 583 } // namespace cc |
OLD | NEW |