| 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 4586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4597 void SetHaveCachedResourcesForRenderPassId(RenderPass::Id id) { | 4597 void SetHaveCachedResourcesForRenderPassId(RenderPass::Id id) { |
| 4598 textures_.insert(id); | 4598 textures_.insert(id); |
| 4599 } | 4599 } |
| 4600 | 4600 |
| 4601 virtual bool HaveCachedResourcesForRenderPassId(RenderPass::Id id) const | 4601 virtual bool HaveCachedResourcesForRenderPassId(RenderPass::Id id) const |
| 4602 OVERRIDE { | 4602 OVERRIDE { |
| 4603 return textures_.count(id); | 4603 return textures_.count(id); |
| 4604 } | 4604 } |
| 4605 | 4605 |
| 4606 // RendererClient implementation. | 4606 // RendererClient implementation. |
| 4607 virtual gfx::Size DeviceViewportSize() const OVERRIDE { | 4607 virtual gfx::Rect DeviceViewport() const OVERRIDE { |
| 4608 return viewport_size_; | 4608 return gfx::Rect(viewport_size_); |
| 4609 } | 4609 } |
| 4610 virtual float DeviceScaleFactor() const OVERRIDE { | 4610 virtual float DeviceScaleFactor() const OVERRIDE { |
| 4611 return 1.f; | 4611 return 1.f; |
| 4612 } | 4612 } |
| 4613 virtual const LayerTreeSettings& Settings() const OVERRIDE { | 4613 virtual const LayerTreeSettings& Settings() const OVERRIDE { |
| 4614 return settings_; | 4614 return settings_; |
| 4615 } | 4615 } |
| 4616 virtual void SetFullRootLayerDamage() OVERRIDE {} | 4616 virtual void SetFullRootLayerDamage() OVERRIDE {} |
| 4617 virtual void SetManagedMemoryPolicy(const ManagedMemoryPolicy& policy) | 4617 virtual void SetManagedMemoryPolicy(const ManagedMemoryPolicy& policy) |
| 4618 OVERRIDE {} | 4618 OVERRIDE {} |
| (...skipping 1216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5835 EXPECT_TRUE(host_impl_->PrepareToDraw(&frame, gfx::Rect())); | 5835 EXPECT_TRUE(host_impl_->PrepareToDraw(&frame, gfx::Rect())); |
| 5836 host_impl_->DrawLayers(&frame, base::TimeTicks::Now()); | 5836 host_impl_->DrawLayers(&frame, base::TimeTicks::Now()); |
| 5837 host_impl_->DidDrawAllLayers(frame); | 5837 host_impl_->DidDrawAllLayers(frame); |
| 5838 | 5838 |
| 5839 EXPECT_EQ(1u, frame.will_draw_layers.size()); | 5839 EXPECT_EQ(1u, frame.will_draw_layers.size()); |
| 5840 EXPECT_EQ(host_impl_->active_tree()->root_layer(), frame.will_draw_layers[0]); | 5840 EXPECT_EQ(host_impl_->active_tree()->root_layer(), frame.will_draw_layers[0]); |
| 5841 } | 5841 } |
| 5842 | 5842 |
| 5843 } // namespace | 5843 } // namespace |
| 5844 } // namespace cc | 5844 } // namespace cc |
| OLD | NEW |