| 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 #ifndef CC_TEST_LAYER_TEST_COMMON_H_ |    5 #ifndef CC_TEST_LAYER_TEST_COMMON_H_ | 
|    6 #define CC_TEST_LAYER_TEST_COMMON_H_ |    6 #define CC_TEST_LAYER_TEST_COMMON_H_ | 
|    7  |    7  | 
|    8 #include "base/basictypes.h" |    8 #include "base/basictypes.h" | 
|    9 #include "base/memory/scoped_ptr.h" |    9 #include "base/memory/scoped_ptr.h" | 
|   10 #include "cc/quads/render_pass.h" |   10 #include "cc/quads/render_pass.h" | 
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  102           T::Create(host_->host_impl()->active_tree(), 2, a, b, c, d, e); |  102           T::Create(host_->host_impl()->active_tree(), 2, a, b, c, d, e); | 
|  103       T* ptr = layer.get(); |  103       T* ptr = layer.get(); | 
|  104       root_layer_impl_->AddChild(layer.template PassAs<LayerImpl>()); |  104       root_layer_impl_->AddChild(layer.template PassAs<LayerImpl>()); | 
|  105       return ptr; |  105       return ptr; | 
|  106     } |  106     } | 
|  107  |  107  | 
|  108     void CalcDrawProps(const gfx::Size& viewport_size); |  108     void CalcDrawProps(const gfx::Size& viewport_size); | 
|  109     void AppendQuadsWithOcclusion(LayerImpl* layer_impl, |  109     void AppendQuadsWithOcclusion(LayerImpl* layer_impl, | 
|  110                                   const gfx::Rect& occluded); |  110                                   const gfx::Rect& occluded); | 
|  111     void AppendQuadsForPassWithOcclusion(LayerImpl* layer_impl, |  111     void AppendQuadsForPassWithOcclusion(LayerImpl* layer_impl, | 
|  112                                          const RenderPass::Id& id, |  112                                          const RenderPassId& id, | 
|  113                                          const gfx::Rect& occluded); |  113                                          const gfx::Rect& occluded); | 
|  114     void AppendSurfaceQuadsWithOcclusion(RenderSurfaceImpl* surface_impl, |  114     void AppendSurfaceQuadsWithOcclusion(RenderSurfaceImpl* surface_impl, | 
|  115                                          const gfx::Rect& occluded); |  115                                          const gfx::Rect& occluded); | 
|  116  |  116  | 
|  117     OutputSurface* output_surface() const { |  117     OutputSurface* output_surface() const { | 
|  118       return host_->host_impl()->output_surface(); |  118       return host_->host_impl()->output_surface(); | 
|  119     } |  119     } | 
|  120     ResourceProvider* resource_provider() const { |  120     ResourceProvider* resource_provider() const { | 
|  121       return host_->host_impl()->resource_provider(); |  121       return host_->host_impl()->resource_provider(); | 
|  122     } |  122     } | 
|  123     LayerImpl* root_layer() const { return root_layer_impl_.get(); } |  123     LayerImpl* root_layer() const { return root_layer_impl_.get(); } | 
|  124     FakeLayerTreeHostImpl* host_impl() const { return host_->host_impl(); } |  124     FakeLayerTreeHostImpl* host_impl() const { return host_->host_impl(); } | 
|  125     Proxy* proxy() const { return host_->host_impl()->proxy(); } |  125     Proxy* proxy() const { return host_->host_impl()->proxy(); } | 
|  126     const QuadList& quad_list() const { return render_pass_->quad_list; } |  126     const QuadList& quad_list() const { return render_pass_->quad_list; } | 
|  127  |  127  | 
|  128    private: |  128    private: | 
|  129     scoped_ptr<FakeLayerTreeHost> host_; |  129     scoped_ptr<FakeLayerTreeHost> host_; | 
|  130     scoped_ptr<LayerImpl> root_layer_impl_; |  130     scoped_ptr<LayerImpl> root_layer_impl_; | 
|  131     scoped_ptr<RenderPass> render_pass_; |  131     scoped_ptr<RenderPass> render_pass_; | 
|  132     MockOcclusionTracker<LayerImpl> occlusion_tracker_; |  132     MockOcclusionTracker<LayerImpl> occlusion_tracker_; | 
|  133   }; |  133   }; | 
|  134 }; |  134 }; | 
|  135  |  135  | 
|  136 }  // namespace cc |  136 }  // namespace cc | 
|  137  |  137  | 
|  138 #endif  // CC_TEST_LAYER_TEST_COMMON_H_ |  138 #endif  // CC_TEST_LAYER_TEST_COMMON_H_ | 
| OLD | NEW |