| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 | 94 |
| 95 const gfx::QuadF& SharedGeometryQuad() const { return shared_geometry_quad_; } | 95 const gfx::QuadF& SharedGeometryQuad() const { return shared_geometry_quad_; } |
| 96 const GeometryBinding* SharedGeometry() const { | 96 const GeometryBinding* SharedGeometry() const { |
| 97 return shared_geometry_.get(); | 97 return shared_geometry_.get(); |
| 98 } | 98 } |
| 99 | 99 |
| 100 void GetFramebufferPixelsAsync(gfx::Rect rect, | 100 void GetFramebufferPixelsAsync(gfx::Rect rect, |
| 101 scoped_ptr<CopyOutputRequest> request); | 101 scoped_ptr<CopyOutputRequest> request); |
| 102 void GetFramebufferTexture(unsigned texture_id, | 102 void GetFramebufferTexture(unsigned texture_id, |
| 103 ResourceFormat texture_format, | 103 ResourceFormat texture_format, |
| 104 gfx::Rect device_rect); | 104 gfx::Rect device_rect, |
| 105 bool is_texture_storage); |
| 105 void ReleaseRenderPassTextures(); | 106 void ReleaseRenderPassTextures(); |
| 106 | 107 |
| 107 void SetStencilEnabled(bool enabled); | 108 void SetStencilEnabled(bool enabled); |
| 108 bool stencil_enabled() const { return stencil_shadow_; } | 109 bool stencil_enabled() const { return stencil_shadow_; } |
| 109 void SetBlendEnabled(bool enabled); | 110 void SetBlendEnabled(bool enabled); |
| 110 bool blend_enabled() const { return blend_shadow_; } | 111 bool blend_enabled() const { return blend_shadow_; } |
| 111 | 112 |
| 112 virtual void BindFramebufferToOutputSurface(DrawingFrame* frame) OVERRIDE; | 113 virtual void BindFramebufferToOutputSurface(DrawingFrame* frame) OVERRIDE; |
| 113 virtual bool BindFramebufferToTexture(DrawingFrame* frame, | 114 virtual bool BindFramebufferToTexture(DrawingFrame* frame, |
| 114 const ScopedResource* resource, | 115 const ScopedResource* resource, |
| (...skipping 29 matching lines...) Expand all Loading... |
| 144 private: | 145 private: |
| 145 friend class GLRendererShaderPixelTest; | 146 friend class GLRendererShaderPixelTest; |
| 146 friend class GLRendererShaderTest; | 147 friend class GLRendererShaderTest; |
| 147 | 148 |
| 148 static void ToGLMatrix(float* gl_matrix, const gfx::Transform& transform); | 149 static void ToGLMatrix(float* gl_matrix, const gfx::Transform& transform); |
| 149 | 150 |
| 150 void DrawCheckerboardQuad(const DrawingFrame* frame, | 151 void DrawCheckerboardQuad(const DrawingFrame* frame, |
| 151 const CheckerboardDrawQuad* quad); | 152 const CheckerboardDrawQuad* quad); |
| 152 void DrawDebugBorderQuad(const DrawingFrame* frame, | 153 void DrawDebugBorderQuad(const DrawingFrame* frame, |
| 153 const DebugBorderDrawQuad* quad); | 154 const DebugBorderDrawQuad* quad); |
| 154 scoped_ptr<ScopedResource> DrawBackgroundFilters( | 155 scoped_ptr<ScopedResource> GetBackgroundWithFilters( |
| 155 DrawingFrame* frame, | 156 DrawingFrame* frame, |
| 156 const RenderPassDrawQuad* quad, | 157 const RenderPassDrawQuad* quad, |
| 157 const gfx::Transform& contents_device_transform, | 158 const gfx::Transform& contents_device_transform, |
| 158 const gfx::Transform& contents_device_transformInverse); | 159 const gfx::Transform& contents_device_transformInverse, |
| 160 bool* background_changed); |
| 159 void DrawRenderPassQuad(DrawingFrame* frame, const RenderPassDrawQuad* quad); | 161 void DrawRenderPassQuad(DrawingFrame* frame, const RenderPassDrawQuad* quad); |
| 160 void DrawSolidColorQuad(const DrawingFrame* frame, | 162 void DrawSolidColorQuad(const DrawingFrame* frame, |
| 161 const SolidColorDrawQuad* quad); | 163 const SolidColorDrawQuad* quad); |
| 162 void DrawStreamVideoQuad(const DrawingFrame* frame, | 164 void DrawStreamVideoQuad(const DrawingFrame* frame, |
| 163 const StreamVideoDrawQuad* quad); | 165 const StreamVideoDrawQuad* quad); |
| 164 void EnqueueTextureQuad(const DrawingFrame* frame, | 166 void EnqueueTextureQuad(const DrawingFrame* frame, |
| 165 const TextureDrawQuad* quad); | 167 const TextureDrawQuad* quad); |
| 166 void FlushTextureQuadCache(); | 168 void FlushTextureQuadCache(); |
| 167 void DrawIOSurfaceQuad(const DrawingFrame* frame, | 169 void DrawIOSurfaceQuad(const DrawingFrame* frame, |
| 168 const IOSurfaceDrawQuad* quad); | 170 const IOSurfaceDrawQuad* quad); |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 skia::RefPtr<GrContext> gr_context_; | 432 skia::RefPtr<GrContext> gr_context_; |
| 431 skia::RefPtr<SkCanvas> sk_canvas_; | 433 skia::RefPtr<SkCanvas> sk_canvas_; |
| 432 | 434 |
| 433 TextureMailboxDeleter* texture_mailbox_deleter_; | 435 TextureMailboxDeleter* texture_mailbox_deleter_; |
| 434 | 436 |
| 435 gfx::Rect swap_buffer_rect_; | 437 gfx::Rect swap_buffer_rect_; |
| 436 gfx::Rect scissor_rect_; | 438 gfx::Rect scissor_rect_; |
| 437 gfx::Rect viewport_; | 439 gfx::Rect viewport_; |
| 438 bool is_backbuffer_discarded_; | 440 bool is_backbuffer_discarded_; |
| 439 bool is_using_bind_uniform_; | 441 bool is_using_bind_uniform_; |
| 442 bool is_using_texture_storage_; |
| 440 bool visible_; | 443 bool visible_; |
| 441 bool is_scissor_enabled_; | 444 bool is_scissor_enabled_; |
| 442 bool stencil_shadow_; | 445 bool stencil_shadow_; |
| 443 bool blend_shadow_; | 446 bool blend_shadow_; |
| 444 unsigned program_shadow_; | 447 unsigned program_shadow_; |
| 445 TexturedQuadDrawCache draw_cache_; | 448 TexturedQuadDrawCache draw_cache_; |
| 446 int highp_threshold_min_; | 449 int highp_threshold_min_; |
| 447 int highp_threshold_cache_; | 450 int highp_threshold_cache_; |
| 448 | 451 |
| 449 struct PendingAsyncReadPixels; | 452 struct PendingAsyncReadPixels; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 467 #if DEBUG_GL_CALLS && !defined(NDEBUG) | 470 #if DEBUG_GL_CALLS && !defined(NDEBUG) |
| 468 #define GLC(context, x) \ | 471 #define GLC(context, x) \ |
| 469 (x, GLRenderer::DebugGLCall(&* context, #x, __FILE__, __LINE__)) | 472 (x, GLRenderer::DebugGLCall(&* context, #x, __FILE__, __LINE__)) |
| 470 #else | 473 #else |
| 471 #define GLC(context, x) (x) | 474 #define GLC(context, x) (x) |
| 472 #endif | 475 #endif |
| 473 | 476 |
| 474 } // namespace cc | 477 } // namespace cc |
| 475 | 478 |
| 476 #endif // CC_OUTPUT_GL_RENDERER_H_ | 479 #endif // CC_OUTPUT_GL_RENDERER_H_ |
| OLD | NEW |