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/callback.h" | 8 #include "base/callback.h" |
9 #include "base/containers/scoped_ptr_hash_map.h" | 9 #include "base/containers/scoped_ptr_hash_map.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 108 |
109 void FlushPolygons(std::deque<scoped_ptr<DrawPolygon>>* poly_list, | 109 void FlushPolygons(std::deque<scoped_ptr<DrawPolygon>>* poly_list, |
110 DrawingFrame* frame, | 110 DrawingFrame* frame, |
111 const gfx::Rect& render_pass_scissor, | 111 const gfx::Rect& render_pass_scissor, |
112 bool use_render_pass_scissor); | 112 bool use_render_pass_scissor); |
113 void DrawRenderPass(DrawingFrame* frame, const RenderPass* render_pass); | 113 void DrawRenderPass(DrawingFrame* frame, const RenderPass* render_pass); |
114 bool UseRenderPass(DrawingFrame* frame, const RenderPass* render_pass); | 114 bool UseRenderPass(DrawingFrame* frame, const RenderPass* render_pass); |
115 | 115 |
116 virtual void BindFramebufferToOutputSurface(DrawingFrame* frame) = 0; | 116 virtual void BindFramebufferToOutputSurface(DrawingFrame* frame) = 0; |
117 virtual bool BindFramebufferToTexture(DrawingFrame* frame, | 117 virtual bool BindFramebufferToTexture(DrawingFrame* frame, |
118 const ScopedResource* resource, | 118 const ScopedResource* resource) = 0; |
119 const gfx::Rect& target_rect) = 0; | |
120 virtual void SetScissorTestRect(const gfx::Rect& scissor_rect) = 0; | 119 virtual void SetScissorTestRect(const gfx::Rect& scissor_rect) = 0; |
121 virtual void PrepareSurfaceForPass( | 120 virtual void PrepareSurfaceForPass( |
122 DrawingFrame* frame, | 121 DrawingFrame* frame, |
123 SurfaceInitializationMode initialization_mode, | 122 SurfaceInitializationMode initialization_mode, |
124 const gfx::Rect& render_pass_scissor) = 0; | 123 const gfx::Rect& render_pass_scissor) = 0; |
125 // clip_region is a (possibly null) pointer to a quad in the same | 124 // clip_region is a (possibly null) pointer to a quad in the same |
126 // space as the quad. When non-null only the area of the quad that overlaps | 125 // space as the quad. When non-null only the area of the quad that overlaps |
127 // with clip_region will be drawn. | 126 // with clip_region will be drawn. |
128 virtual void DoDrawQuad(DrawingFrame* frame, | 127 virtual void DoDrawQuad(DrawingFrame* frame, |
129 const DrawQuad* quad, | 128 const DrawQuad* quad, |
(...skipping 30 matching lines...) Expand all Loading... |
160 | 159 |
161 private: | 160 private: |
162 gfx::Vector2d enlarge_pass_texture_amount_; | 161 gfx::Vector2d enlarge_pass_texture_amount_; |
163 | 162 |
164 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); | 163 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); |
165 }; | 164 }; |
166 | 165 |
167 } // namespace cc | 166 } // namespace cc |
168 | 167 |
169 #endif // CC_OUTPUT_DIRECT_RENDERER_H_ | 168 #endif // CC_OUTPUT_DIRECT_RENDERER_H_ |
OLD | NEW |