| 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 "base/cancelable_callback.h" | 8 #include "base/cancelable_callback.h" |
| 9 #include "cc/base/cc_export.h" | 9 #include "cc/base/cc_export.h" |
| 10 #include "cc/base/scoped_ptr_vector.h" | 10 #include "cc/base/scoped_ptr_vector.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 void InitializeGrContext(); | 96 void InitializeGrContext(); |
| 97 | 97 |
| 98 const gfx::QuadF& SharedGeometryQuad() const { return shared_geometry_quad_; } | 98 const gfx::QuadF& SharedGeometryQuad() const { return shared_geometry_quad_; } |
| 99 const GeometryBinding* SharedGeometry() const { | 99 const GeometryBinding* SharedGeometry() const { |
| 100 return shared_geometry_.get(); | 100 return shared_geometry_.get(); |
| 101 } | 101 } |
| 102 | 102 |
| 103 void GetFramebufferPixelsAsync(gfx::Rect rect, | 103 void GetFramebufferPixelsAsync(gfx::Rect rect, |
| 104 scoped_ptr<CopyOutputRequest> request); | 104 scoped_ptr<CopyOutputRequest> request); |
| 105 void GetFramebufferTexture(unsigned texture_id, | 105 void GetFramebufferTexture(unsigned texture_id, |
| 106 unsigned texture_format, | 106 ResourceProvider::Format texture_format, |
| 107 gfx::Rect device_rect); | 107 gfx::Rect device_rect); |
| 108 void ReleaseRenderPassTextures(); | 108 void ReleaseRenderPassTextures(); |
| 109 | 109 |
| 110 void SetStencilEnabled(bool enabled); | 110 void SetStencilEnabled(bool enabled); |
| 111 bool stencil_enabled() const { return stencil_shadow_; } | 111 bool stencil_enabled() const { return stencil_shadow_; } |
| 112 void SetBlendEnabled(bool enabled); | 112 void SetBlendEnabled(bool enabled); |
| 113 bool blend_enabled() const { return blend_shadow_; } | 113 bool blend_enabled() const { return blend_shadow_; } |
| 114 | 114 |
| 115 virtual void BindFramebufferToOutputSurface(DrawingFrame* frame) OVERRIDE; | 115 virtual void BindFramebufferToOutputSurface(DrawingFrame* frame) OVERRIDE; |
| 116 virtual bool BindFramebufferToTexture(DrawingFrame* frame, | 116 virtual bool BindFramebufferToTexture(DrawingFrame* frame, |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 bool offscreen_context_labelled_; | 448 bool offscreen_context_labelled_; |
| 449 | 449 |
| 450 struct PendingAsyncReadPixels; | 450 struct PendingAsyncReadPixels; |
| 451 ScopedPtrVector<PendingAsyncReadPixels> pending_async_read_pixels_; | 451 ScopedPtrVector<PendingAsyncReadPixels> pending_async_read_pixels_; |
| 452 | 452 |
| 453 scoped_ptr<ResourceProvider::ScopedWriteLockGL> current_framebuffer_lock_; | 453 scoped_ptr<ResourceProvider::ScopedWriteLockGL> current_framebuffer_lock_; |
| 454 | 454 |
| 455 scoped_refptr<ResourceProvider::Fence> last_swap_fence_; | 455 scoped_refptr<ResourceProvider::Fence> last_swap_fence_; |
| 456 | 456 |
| 457 SkBitmap on_demand_tile_raster_bitmap_; | 457 SkBitmap on_demand_tile_raster_bitmap_; |
| 458 SkBitmap on_demand_tile_raster_bitmap_4444_; |
| 458 ResourceProvider::ResourceId on_demand_tile_raster_resource_id_; | 459 ResourceProvider::ResourceId on_demand_tile_raster_resource_id_; |
| 459 | 460 |
| 460 DISALLOW_COPY_AND_ASSIGN(GLRenderer); | 461 DISALLOW_COPY_AND_ASSIGN(GLRenderer); |
| 461 }; | 462 }; |
| 462 | 463 |
| 463 // Setting DEBUG_GL_CALLS to 1 will call glGetError() after almost every GL | 464 // Setting DEBUG_GL_CALLS to 1 will call glGetError() after almost every GL |
| 464 // call made by the compositor. Useful for debugging rendering issues but | 465 // call made by the compositor. Useful for debugging rendering issues but |
| 465 // will significantly degrade performance. | 466 // will significantly degrade performance. |
| 466 #define DEBUG_GL_CALLS 0 | 467 #define DEBUG_GL_CALLS 0 |
| 467 | 468 |
| 468 #if DEBUG_GL_CALLS && !defined(NDEBUG) | 469 #if DEBUG_GL_CALLS && !defined(NDEBUG) |
| 469 #define GLC(context, x) \ | 470 #define GLC(context, x) \ |
| 470 (x, GLRenderer::DebugGLCall(&* context, #x, __FILE__, __LINE__)) | 471 (x, GLRenderer::DebugGLCall(&* context, #x, __FILE__, __LINE__)) |
| 471 #else | 472 #else |
| 472 #define GLC(context, x) (x) | 473 #define GLC(context, x) (x) |
| 473 #endif | 474 #endif |
| 474 | 475 |
| 475 } // namespace cc | 476 } // namespace cc |
| 476 | 477 |
| 477 #endif // CC_OUTPUT_GL_RENDERER_H_ | 478 #endif // CC_OUTPUT_GL_RENDERER_H_ |
| OLD | NEW |