OLD | NEW |
1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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_GL_RENDERER_H_ | 5 #ifndef CC_OUTPUT_GL_RENDERER_H_ |
6 #define CC_OUTPUT_GL_RENDERER_H_ | 6 #define CC_OUTPUT_GL_RENDERER_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 void ReleaseRenderPassTextures(); | 95 void ReleaseRenderPassTextures(); |
96 enum BoundGeometry { NO_BINDING, SHARED_BINDING, CLIPPED_BINDING }; | 96 enum BoundGeometry { NO_BINDING, SHARED_BINDING, CLIPPED_BINDING }; |
97 void PrepareGeometry(BoundGeometry geometry_to_bind); | 97 void PrepareGeometry(BoundGeometry geometry_to_bind); |
98 void SetStencilEnabled(bool enabled); | 98 void SetStencilEnabled(bool enabled); |
99 bool stencil_enabled() const { return stencil_shadow_; } | 99 bool stencil_enabled() const { return stencil_shadow_; } |
100 void SetBlendEnabled(bool enabled); | 100 void SetBlendEnabled(bool enabled); |
101 bool blend_enabled() const { return blend_shadow_; } | 101 bool blend_enabled() const { return blend_shadow_; } |
102 | 102 |
103 void BindFramebufferToOutputSurface(DrawingFrame* frame) override; | 103 void BindFramebufferToOutputSurface(DrawingFrame* frame) override; |
104 bool BindFramebufferToTexture(DrawingFrame* frame, | 104 bool BindFramebufferToTexture(DrawingFrame* frame, |
105 const ScopedResource* resource, | 105 const ScopedResource* resource) override; |
106 const gfx::Rect& target_rect) override; | |
107 void SetScissorTestRect(const gfx::Rect& scissor_rect) override; | 106 void SetScissorTestRect(const gfx::Rect& scissor_rect) override; |
108 void PrepareSurfaceForPass(DrawingFrame* frame, | 107 void PrepareSurfaceForPass(DrawingFrame* frame, |
109 SurfaceInitializationMode initialization_mode, | 108 SurfaceInitializationMode initialization_mode, |
110 const gfx::Rect& render_pass_scissor) override; | 109 const gfx::Rect& render_pass_scissor) override; |
111 void DoDrawQuad(DrawingFrame* frame, | 110 void DoDrawQuad(DrawingFrame* frame, |
112 const class DrawQuad*, | 111 const class DrawQuad*, |
113 const gfx::QuadF* draw_region) override; | 112 const gfx::QuadF* draw_region) override; |
114 void BeginDrawingFrame(DrawingFrame* frame) override; | 113 void BeginDrawingFrame(DrawingFrame* frame) override; |
115 void FinishDrawingFrame(DrawingFrame* frame) override; | 114 void FinishDrawingFrame(DrawingFrame* frame) override; |
116 bool FlippedFramebuffer(const DrawingFrame* frame) const override; | 115 bool FlippedFramebuffer(const DrawingFrame* frame) const override; |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 const gfx::RectF& quad_rect, | 228 const gfx::RectF& quad_rect, |
230 const gfx::QuadF& clipping_region_quad, | 229 const gfx::QuadF& clipping_region_quad, |
231 int matrix_location, | 230 int matrix_location, |
232 const float uv[8]); | 231 const float uv[8]); |
233 void DrawQuadGeometry(const DrawingFrame* frame, | 232 void DrawQuadGeometry(const DrawingFrame* frame, |
234 const gfx::Transform& draw_transform, | 233 const gfx::Transform& draw_transform, |
235 const gfx::RectF& quad_rect, | 234 const gfx::RectF& quad_rect, |
236 int matrix_location); | 235 int matrix_location); |
237 void SetUseProgram(unsigned program); | 236 void SetUseProgram(unsigned program); |
238 | 237 |
239 bool UseScopedTexture(DrawingFrame* frame, | |
240 const ScopedResource* resource, | |
241 const gfx::Rect& viewport_rect); | |
242 | |
243 bool MakeContextCurrent(); | 238 bool MakeContextCurrent(); |
244 | 239 |
245 void InitializeSharedObjects(); | 240 void InitializeSharedObjects(); |
246 void CleanupSharedObjects(); | 241 void CleanupSharedObjects(); |
247 | 242 |
248 typedef base::Callback<void(scoped_ptr<CopyOutputRequest> copy_request, | 243 typedef base::Callback<void(scoped_ptr<CopyOutputRequest> copy_request, |
249 bool success)> | 244 bool success)> |
250 AsyncGetFramebufferPixelsCleanupCallback; | 245 AsyncGetFramebufferPixelsCleanupCallback; |
251 void FinishedReadback(unsigned source_buffer, | 246 void FinishedReadback(unsigned source_buffer, |
252 unsigned query, | 247 unsigned query, |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 | 512 |
518 SkBitmap on_demand_tile_raster_bitmap_; | 513 SkBitmap on_demand_tile_raster_bitmap_; |
519 ResourceId on_demand_tile_raster_resource_id_; | 514 ResourceId on_demand_tile_raster_resource_id_; |
520 BoundGeometry bound_geometry_; | 515 BoundGeometry bound_geometry_; |
521 DISALLOW_COPY_AND_ASSIGN(GLRenderer); | 516 DISALLOW_COPY_AND_ASSIGN(GLRenderer); |
522 }; | 517 }; |
523 | 518 |
524 } // namespace cc | 519 } // namespace cc |
525 | 520 |
526 #endif // CC_OUTPUT_GL_RENDERER_H_ | 521 #endif // CC_OUTPUT_GL_RENDERER_H_ |
OLD | NEW |