| 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/trees/layer_tree_host_impl.h" | 5 #include "cc/trees/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 3745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3756 } | 3756 } |
| 3757 | 3757 |
| 3758 void clearCachedTextures() { m_textures.clear(); } | 3758 void clearCachedTextures() { m_textures.clear(); } |
| 3759 void setHaveCachedResourcesForRenderPassId(RenderPass::Id id) { m_textures.i
nsert(id); } | 3759 void setHaveCachedResourcesForRenderPassId(RenderPass::Id id) { m_textures.i
nsert(id); } |
| 3760 | 3760 |
| 3761 virtual bool HaveCachedResourcesForRenderPassId(RenderPass::Id id) const OVE
RRIDE { return m_textures.count(id); } | 3761 virtual bool HaveCachedResourcesForRenderPassId(RenderPass::Id id) const OVE
RRIDE { return m_textures.count(id); } |
| 3762 | 3762 |
| 3763 // RendererClient implementation. | 3763 // RendererClient implementation. |
| 3764 virtual gfx::Size DeviceViewportSize() const OVERRIDE { return m_viewportSiz
e; } | 3764 virtual gfx::Size DeviceViewportSize() const OVERRIDE { return m_viewportSiz
e; } |
| 3765 virtual const LayerTreeSettings& Settings() const OVERRIDE { return m_settin
gs; } | 3765 virtual const LayerTreeSettings& Settings() const OVERRIDE { return m_settin
gs; } |
| 3766 virtual void DidLoseOutputSurface() OVERRIDE { } | |
| 3767 virtual void OnSwapBuffersComplete() OVERRIDE { } | |
| 3768 virtual void SetFullRootLayerDamage() OVERRIDE { } | 3766 virtual void SetFullRootLayerDamage() OVERRIDE { } |
| 3769 virtual void SetManagedMemoryPolicy(const ManagedMemoryPolicy& policy) OVERR
IDE { } | 3767 virtual void SetManagedMemoryPolicy(const ManagedMemoryPolicy& policy) OVERR
IDE { } |
| 3770 virtual void EnforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy) O
VERRIDE { } | 3768 virtual void EnforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy) O
VERRIDE { } |
| 3771 virtual bool HasImplThread() const OVERRIDE { return false; } | 3769 virtual bool HasImplThread() const OVERRIDE { return false; } |
| 3772 virtual bool ShouldClearRootRenderPass() const OVERRIDE { return true; } | 3770 virtual bool ShouldClearRootRenderPass() const OVERRIDE { return true; } |
| 3773 virtual CompositorFrameMetadata MakeCompositorFrameMetadata() const | 3771 virtual CompositorFrameMetadata MakeCompositorFrameMetadata() const |
| 3774 OVERRIDE { return CompositorFrameMetadata(); } | 3772 OVERRIDE { return CompositorFrameMetadata(); } |
| 3775 | 3773 |
| 3776 protected: | 3774 protected: |
| 3777 TestRenderer(ResourceProvider* resourceProvider, OutputSurface* outputSurfac
e, Proxy* proxy) : GLRenderer(this, outputSurface, resourceProvider) { } | 3775 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... |
| 4377 EXPECT_EQ(gfx::Rect(0, 0, 100, 100).ToString(), renderPassQuad->rect.ToS
tring()); | 4375 EXPECT_EQ(gfx::Rect(0, 0, 100, 100).ToString(), renderPassQuad->rect.ToS
tring()); |
| 4378 EXPECT_EQ(gfx::RectF(0.f, 0.f, 1.f, 1.f).ToString(), renderPassQuad->mas
k_uv_rect.ToString()); | 4376 EXPECT_EQ(gfx::RectF(0.f, 0.f, 1.f, 1.f).ToString(), renderPassQuad->mas
k_uv_rect.ToString()); |
| 4379 | 4377 |
| 4380 m_hostImpl->DrawLayers(&frame, base::TimeTicks::Now()); | 4378 m_hostImpl->DrawLayers(&frame, base::TimeTicks::Now()); |
| 4381 m_hostImpl->DidDrawAllLayers(frame); | 4379 m_hostImpl->DidDrawAllLayers(frame); |
| 4382 } | 4380 } |
| 4383 } | 4381 } |
| 4384 | 4382 |
| 4385 } // namespace | 4383 } // namespace |
| 4386 } // namespace cc | 4384 } // namespace cc |
| OLD | NEW |