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