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 <memory> | 8 #include <memory> |
9 #include <unordered_map> | 9 #include <unordered_map> |
10 #include <vector> | 10 #include <vector> |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 void DoDrawPolygon(const DrawPolygon& poly, | 137 void DoDrawPolygon(const DrawPolygon& poly, |
138 DrawingFrame* frame, | 138 DrawingFrame* frame, |
139 const gfx::Rect& render_pass_scissor, | 139 const gfx::Rect& render_pass_scissor, |
140 bool use_render_pass_scissor); | 140 bool use_render_pass_scissor); |
141 | 141 |
142 const FilterOperations* FiltersForPass(int render_pass_id) const; | 142 const FilterOperations* FiltersForPass(int render_pass_id) const; |
143 const FilterOperations* BackgroundFiltersForPass(int render_pass_id) const; | 143 const FilterOperations* BackgroundFiltersForPass(int render_pass_id) const; |
144 | 144 |
145 // Private interface implemented by subclasses for use by DirectRenderer. | 145 // Private interface implemented by subclasses for use by DirectRenderer. |
146 virtual bool CanPartialSwap() = 0; | 146 virtual bool CanPartialSwap() = 0; |
147 virtual ResourceFormat BackbufferFormat() const = 0; | |
148 virtual void BindFramebufferToOutputSurface(DrawingFrame* frame) = 0; | 147 virtual void BindFramebufferToOutputSurface(DrawingFrame* frame) = 0; |
149 virtual bool BindFramebufferToTexture(DrawingFrame* frame, | 148 virtual bool BindFramebufferToTexture(DrawingFrame* frame, |
150 const ScopedResource* resource) = 0; | 149 const ScopedResource* resource) = 0; |
151 virtual void SetScissorTestRect(const gfx::Rect& scissor_rect) = 0; | 150 virtual void SetScissorTestRect(const gfx::Rect& scissor_rect) = 0; |
152 virtual void PrepareSurfaceForPass( | 151 virtual void PrepareSurfaceForPass( |
153 DrawingFrame* frame, | 152 DrawingFrame* frame, |
154 SurfaceInitializationMode initialization_mode, | 153 SurfaceInitializationMode initialization_mode, |
155 const gfx::Rect& render_pass_scissor) = 0; | 154 const gfx::Rect& render_pass_scissor) = 0; |
156 // |clip_region| is a (possibly null) pointer to a quad in the same | 155 // |clip_region| is a (possibly null) pointer to a quad in the same |
157 // space as the quad. When non-null only the area of the quad that overlaps | 156 // space as the quad. When non-null only the area of the quad that overlaps |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 gfx::ColorSpace reshape_device_color_space_; | 224 gfx::ColorSpace reshape_device_color_space_; |
226 bool reshape_has_alpha_ = false; | 225 bool reshape_has_alpha_ = false; |
227 bool reshape_use_stencil_ = false; | 226 bool reshape_use_stencil_ = false; |
228 | 227 |
229 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); | 228 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); |
230 }; | 229 }; |
231 | 230 |
232 } // namespace cc | 231 } // namespace cc |
233 | 232 |
234 #endif // CC_OUTPUT_DIRECT_RENDERER_H_ | 233 #endif // CC_OUTPUT_DIRECT_RENDERER_H_ |
OLD | NEW |