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_OUTPUT_DIRECT_RENDERER_H_ | 5 #ifndef CC_OUTPUT_DIRECT_RENDERER_H_ |
6 #define CC_OUTPUT_DIRECT_RENDERER_H_ | 6 #define CC_OUTPUT_DIRECT_RENDERER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/containers/scoped_ptr_hash_map.h" | 10 #include "base/containers/scoped_ptr_hash_map.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 class CC_EXPORT DirectRenderer : public Renderer { | 25 class CC_EXPORT DirectRenderer : public Renderer { |
26 public: | 26 public: |
27 virtual ~DirectRenderer(); | 27 virtual ~DirectRenderer(); |
28 | 28 |
29 virtual bool CanReadPixels() const OVERRIDE; | 29 virtual bool CanReadPixels() const OVERRIDE; |
30 virtual void DecideRenderPassAllocationsForFrame( | 30 virtual void DecideRenderPassAllocationsForFrame( |
31 const RenderPassList& render_passes_in_draw_order) OVERRIDE; | 31 const RenderPassList& render_passes_in_draw_order) OVERRIDE; |
32 virtual bool HasAllocatedResourcesForTesting(RenderPass::Id id) const | 32 virtual bool HasAllocatedResourcesForTesting(RenderPass::Id id) const |
33 OVERRIDE; | 33 OVERRIDE; |
34 virtual void DrawFrame(RenderPassList* render_passes_in_draw_order, | 34 virtual void DrawFrame(RenderPassList* render_passes_in_draw_order, |
35 ContextProvider* offscreen_context_provider, | |
36 float device_scale_factor, | 35 float device_scale_factor, |
37 const gfx::Rect& device_viewport_rect, | 36 const gfx::Rect& device_viewport_rect, |
38 const gfx::Rect& device_clip_rect, | 37 const gfx::Rect& device_clip_rect, |
39 bool disable_picture_quad_image_filtering) OVERRIDE; | 38 bool disable_picture_quad_image_filtering) OVERRIDE; |
40 | 39 |
41 struct CC_EXPORT DrawingFrame { | 40 struct CC_EXPORT DrawingFrame { |
42 DrawingFrame(); | 41 DrawingFrame(); |
43 ~DrawingFrame(); | 42 ~DrawingFrame(); |
44 | 43 |
45 const RenderPass* root_render_pass; | 44 const RenderPass* root_render_pass; |
46 const RenderPass* current_render_pass; | 45 const RenderPass* current_render_pass; |
47 const ScopedResource* current_texture; | 46 const ScopedResource* current_texture; |
48 | 47 |
49 gfx::Rect root_damage_rect; | 48 gfx::Rect root_damage_rect; |
50 gfx::Rect device_viewport_rect; | 49 gfx::Rect device_viewport_rect; |
51 gfx::Rect device_clip_rect; | 50 gfx::Rect device_clip_rect; |
52 | 51 |
53 gfx::Transform projection_matrix; | 52 gfx::Transform projection_matrix; |
54 gfx::Transform window_matrix; | 53 gfx::Transform window_matrix; |
55 | 54 |
56 ContextProvider* offscreen_context_provider; | |
57 | |
58 bool disable_picture_quad_image_filtering; | 55 bool disable_picture_quad_image_filtering; |
59 | 56 |
60 OverlayCandidateList overlay_list; | 57 OverlayCandidateList overlay_list; |
61 }; | 58 }; |
62 | 59 |
63 void SetEnlargePassTextureAmountForTesting(const gfx::Vector2d& amount); | 60 void SetEnlargePassTextureAmountForTesting(const gfx::Vector2d& amount); |
64 | 61 |
65 protected: | 62 protected: |
66 DirectRenderer(RendererClient* client, | 63 DirectRenderer(RendererClient* client, |
67 const LayerTreeSettings* settings, | 64 const LayerTreeSettings* settings, |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 gfx::Vector2d enlarge_pass_texture_amount_; | 136 gfx::Vector2d enlarge_pass_texture_amount_; |
140 | 137 |
141 NamespaceToken on_demand_task_namespace_; | 138 NamespaceToken on_demand_task_namespace_; |
142 | 139 |
143 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); | 140 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); |
144 }; | 141 }; |
145 | 142 |
146 } // namespace cc | 143 } // namespace cc |
147 | 144 |
148 #endif // CC_OUTPUT_DIRECT_RENDERER_H_ | 145 #endif // CC_OUTPUT_DIRECT_RENDERER_H_ |
OLD | NEW |