| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 int m_frame; | 60 int m_frame; |
| 61 WebGraphicsMemoryAllocationChangedCallbackCHROMIUM* m_memoryAllocationChange
dCallback; | 61 WebGraphicsMemoryAllocationChangedCallbackCHROMIUM* m_memoryAllocationChange
dCallback; |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 class FakeRendererClient : public RendererClient { | 64 class FakeRendererClient : public RendererClient { |
| 65 public: | 65 public: |
| 66 FakeRendererClient() | 66 FakeRendererClient() |
| 67 : m_hostImpl(&m_proxy) | 67 : m_hostImpl(&m_proxy) |
| 68 , m_setFullRootLayerDamageCount(0) | 68 , m_setFullRootLayerDamageCount(0) |
| 69 , m_lastCallWasSetVisibility(0) | 69 , m_lastCallWasSetVisibility(0) |
| 70 , m_rootLayer(LayerImpl::Create(m_hostImpl.activeTree(), 1)) | 70 , m_rootLayer(LayerImpl::Create(m_hostImpl.active_tree(), 1)) |
| 71 , m_memoryAllocationLimitBytes(PrioritizedResourceManager::defaultMemory
AllocationLimit()) | 71 , m_memoryAllocationLimitBytes(PrioritizedResourceManager::defaultMemory
AllocationLimit()) |
| 72 { | 72 { |
| 73 m_rootLayer->CreateRenderSurface(); | 73 m_rootLayer->CreateRenderSurface(); |
| 74 RenderPass::Id renderPassId = m_rootLayer->render_surface()->RenderPassI
d(); | 74 RenderPass::Id renderPassId = m_rootLayer->render_surface()->RenderPassI
d(); |
| 75 scoped_ptr<RenderPass> root_render_pass = RenderPass::Create(); | 75 scoped_ptr<RenderPass> root_render_pass = RenderPass::Create(); |
| 76 root_render_pass->SetNew(renderPassId, gfx::Rect(), gfx::Rect(), gfx::Tr
ansform()); | 76 root_render_pass->SetNew(renderPassId, gfx::Rect(), gfx::Rect(), gfx::Tr
ansform()); |
| 77 m_renderPassesInDrawOrder.push_back(root_render_pass.Pass()); | 77 m_renderPassesInDrawOrder.push_back(root_render_pass.Pass()); |
| 78 } | 78 } |
| 79 | 79 |
| 80 // RendererClient methods. | 80 // RendererClient methods. |
| (...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 823 | 823 |
| 824 TEST_F(MockOutputSurfaceTestWithSendCompositorFrame, DrawFrame) | 824 TEST_F(MockOutputSurfaceTestWithSendCompositorFrame, DrawFrame) |
| 825 { | 825 { |
| 826 EXPECT_CALL(m_outputSurface, SendFrameToParentCompositor(_)) | 826 EXPECT_CALL(m_outputSurface, SendFrameToParentCompositor(_)) |
| 827 .Times(1); | 827 .Times(1); |
| 828 DrawFrame(); | 828 DrawFrame(); |
| 829 } | 829 } |
| 830 | 830 |
| 831 } // namespace | 831 } // namespace |
| 832 } // namespace cc | 832 } // namespace cc |
| OLD | NEW |