| 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 3709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3720 } | 3720 } |
| 3721 | 3721 |
| 3722 void clearCachedTextures() { m_textures.clear(); } | 3722 void clearCachedTextures() { m_textures.clear(); } |
| 3723 void setHaveCachedResourcesForRenderPassId(RenderPass::Id id) { m_textures.i
nsert(id); } | 3723 void setHaveCachedResourcesForRenderPassId(RenderPass::Id id) { m_textures.i
nsert(id); } |
| 3724 | 3724 |
| 3725 virtual bool haveCachedResourcesForRenderPassId(RenderPass::Id id) const OVE
RRIDE { return m_textures.count(id); } | 3725 virtual bool haveCachedResourcesForRenderPassId(RenderPass::Id id) const OVE
RRIDE { return m_textures.count(id); } |
| 3726 | 3726 |
| 3727 // RendererClient implementation. | 3727 // RendererClient implementation. |
| 3728 virtual const gfx::Size& deviceViewportSize() const OVERRIDE { return m_view
portSize; } | 3728 virtual const gfx::Size& deviceViewportSize() const OVERRIDE { return m_view
portSize; } |
| 3729 virtual const LayerTreeSettings& settings() const OVERRIDE { return m_settin
gs; } | 3729 virtual const LayerTreeSettings& settings() const OVERRIDE { return m_settin
gs; } |
| 3730 virtual void didLoseOutputSurface() OVERRIDE { } | |
| 3731 virtual void onSwapBuffersComplete() OVERRIDE { } | |
| 3732 virtual void setFullRootLayerDamage() OVERRIDE { } | 3730 virtual void setFullRootLayerDamage() OVERRIDE { } |
| 3733 virtual void setManagedMemoryPolicy(const ManagedMemoryPolicy& policy) OVERR
IDE { } | 3731 virtual void setManagedMemoryPolicy(const ManagedMemoryPolicy& policy) OVERR
IDE { } |
| 3734 virtual void enforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy) O
VERRIDE { } | 3732 virtual void enforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy) O
VERRIDE { } |
| 3735 virtual bool hasImplThread() const OVERRIDE { return false; } | 3733 virtual bool hasImplThread() const OVERRIDE { return false; } |
| 3736 virtual bool shouldClearRootRenderPass() const OVERRIDE { return true; } | 3734 virtual bool shouldClearRootRenderPass() const OVERRIDE { return true; } |
| 3737 virtual CompositorFrameMetadata makeCompositorFrameMetadata() const | 3735 virtual CompositorFrameMetadata makeCompositorFrameMetadata() const |
| 3738 OVERRIDE { return CompositorFrameMetadata(); } | 3736 OVERRIDE { return CompositorFrameMetadata(); } |
| 3739 | 3737 |
| 3740 protected: | 3738 protected: |
| 3741 TestRenderer(ResourceProvider* resourceProvider, OutputSurface* outputSurfac
e, Proxy* proxy) : GLRenderer(this, outputSurface, resourceProvider) { } | 3739 TestRenderer(ResourceProvider* resourceProvider, OutputSurface* outputSurfac
e, Proxy* proxy) : GLRenderer(this, outputSurface, resourceProvider) { } |
| (...skipping 599 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()); | 4339 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()); | 4340 EXPECT_EQ(gfx::RectF(0.f, 0.f, 1.f, 1.f).ToString(), renderPassQuad->mas
k_uv_rect.ToString()); |
| 4343 | 4341 |
| 4344 m_hostImpl->drawLayers(frame); | 4342 m_hostImpl->drawLayers(frame); |
| 4345 m_hostImpl->didDrawAllLayers(frame); | 4343 m_hostImpl->didDrawAllLayers(frame); |
| 4346 } | 4344 } |
| 4347 } | 4345 } |
| 4348 | 4346 |
| 4349 } // namespace | 4347 } // namespace |
| 4350 } // namespace cc | 4348 } // namespace cc |
| OLD | NEW |