| 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/compositor_frame_metadata.h" | 7 #include "cc/compositor_frame_metadata.h" |
| 8 #include "cc/draw_quad.h" | 8 #include "cc/draw_quad.h" |
| 9 #include "cc/prioritized_resource_manager.h" | 9 #include "cc/prioritized_resource_manager.h" |
| 10 #include "cc/resource_provider.h" | 10 #include "cc/resource_provider.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 m_rootLayer->createRenderSurface(); | 73 m_rootLayer->createRenderSurface(); |
| 74 RenderPass::Id renderPassId = m_rootLayer->renderSurface()->renderPassId
(); | 74 RenderPass::Id renderPassId = m_rootLayer->renderSurface()->renderPassId
(); |
| 75 scoped_ptr<RenderPass> rootRenderPass = RenderPass::Create(); | 75 scoped_ptr<RenderPass> rootRenderPass = RenderPass::Create(); |
| 76 rootRenderPass->SetNew(renderPassId, gfx::Rect(), gfx::Rect(), gfx::Tran
sform()); | 76 rootRenderPass->SetNew(renderPassId, gfx::Rect(), gfx::Rect(), gfx::Tran
sform()); |
| 77 m_renderPassesInDrawOrder.push_back(rootRenderPass.Pass()); | 77 m_renderPassesInDrawOrder.push_back(rootRenderPass.Pass()); |
| 78 } | 78 } |
| 79 | 79 |
| 80 // RendererClient methods. | 80 // RendererClient methods. |
| 81 virtual const gfx::Size& deviceViewportSize() const OVERRIDE { static gfx::S
ize fakeSize(1, 1); return fakeSize; } | 81 virtual const gfx::Size& deviceViewportSize() const OVERRIDE { static gfx::S
ize fakeSize(1, 1); return fakeSize; } |
| 82 virtual const LayerTreeSettings& settings() const OVERRIDE { static LayerTre
eSettings fakeSettings; return fakeSettings; } | 82 virtual const LayerTreeSettings& settings() const OVERRIDE { static LayerTre
eSettings fakeSettings; return fakeSettings; } |
| 83 virtual void didLoseOutputSurface() OVERRIDE { } | |
| 84 virtual void onSwapBuffersComplete() OVERRIDE { } | |
| 85 virtual void setFullRootLayerDamage() OVERRIDE { m_setFullRootLayerDamageCou
nt++; } | 83 virtual void setFullRootLayerDamage() OVERRIDE { m_setFullRootLayerDamageCou
nt++; } |
| 86 virtual void setManagedMemoryPolicy(const ManagedMemoryPolicy& policy) OVERR
IDE { m_memoryAllocationLimitBytes = policy.bytesLimitWhenVisible; } | 84 virtual void setManagedMemoryPolicy(const ManagedMemoryPolicy& policy) OVERR
IDE { m_memoryAllocationLimitBytes = policy.bytesLimitWhenVisible; } |
| 87 virtual void enforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy) O
VERRIDE { if (m_lastCallWasSetVisibility) *m_lastCallWasSetVisibility = false; } | 85 virtual void enforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy) O
VERRIDE { if (m_lastCallWasSetVisibility) *m_lastCallWasSetVisibility = false; } |
| 88 virtual bool hasImplThread() const OVERRIDE { return false; } | 86 virtual bool hasImplThread() const OVERRIDE { return false; } |
| 89 virtual bool shouldClearRootRenderPass() const OVERRIDE { return true; } | 87 virtual bool shouldClearRootRenderPass() const OVERRIDE { return true; } |
| 90 virtual CompositorFrameMetadata makeCompositorFrameMetadata() const | 88 virtual CompositorFrameMetadata makeCompositorFrameMetadata() const |
| 91 OVERRIDE { return CompositorFrameMetadata(); } | 89 OVERRIDE { return CompositorFrameMetadata(); } |
| 92 | 90 |
| 93 // Methods added for test. | 91 // Methods added for test. |
| 94 int setFullRootLayerDamageCount() const { return m_setFullRootLayerDamageCou
nt; } | 92 int setFullRootLayerDamageCount() const { return m_setFullRootLayerDamageCou
nt; } |
| (...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 823 | 821 |
| 824 TEST_F(MockOutputSurfaceTestWithSendCompositorFrame, DrawFrame) | 822 TEST_F(MockOutputSurfaceTestWithSendCompositorFrame, DrawFrame) |
| 825 { | 823 { |
| 826 EXPECT_CALL(m_outputSurface, SendFrameToParentCompositor(_)) | 824 EXPECT_CALL(m_outputSurface, SendFrameToParentCompositor(_)) |
| 827 .Times(1); | 825 .Times(1); |
| 828 drawFrame(); | 826 drawFrame(); |
| 829 } | 827 } |
| 830 | 828 |
| 831 } // namespace | 829 } // namespace |
| 832 } // namespace cc | 830 } // namespace cc |
| OLD | NEW |