| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 const gfx::QuadF& SharedGeometryQuad() const { return shared_geometry_quad_; } | 97 const gfx::QuadF& SharedGeometryQuad() const { return shared_geometry_quad_; } |
| 98 const GeometryBinding* SharedGeometry() const { | 98 const GeometryBinding* SharedGeometry() const { |
| 99 return shared_geometry_.get(); | 99 return shared_geometry_.get(); |
| 100 } | 100 } |
| 101 | 101 |
| 102 void GetFramebufferPixelsAsync(gfx::Rect rect, | 102 void GetFramebufferPixelsAsync(gfx::Rect rect, |
| 103 scoped_ptr<CopyOutputRequest> request); | 103 scoped_ptr<CopyOutputRequest> request); |
| 104 void GetFramebufferTexture(unsigned texture_id, | 104 void GetFramebufferTexture(unsigned texture_id, |
| 105 ResourceFormat texture_format, | 105 ResourceFormat texture_format, |
| 106 gfx::Rect device_rect); | 106 gfx::Rect device_rect); |
| 107 void GetFramebufferTextureSubImage(unsigned texture_id, |
| 108 gfx::Rect device_rect); |
| 107 void ReleaseRenderPassTextures(); | 109 void ReleaseRenderPassTextures(); |
| 108 | 110 |
| 109 void SetStencilEnabled(bool enabled); | 111 void SetStencilEnabled(bool enabled); |
| 110 bool stencil_enabled() const { return stencil_shadow_; } | 112 bool stencil_enabled() const { return stencil_shadow_; } |
| 111 void SetBlendEnabled(bool enabled); | 113 void SetBlendEnabled(bool enabled); |
| 112 bool blend_enabled() const { return blend_shadow_; } | 114 bool blend_enabled() const { return blend_shadow_; } |
| 113 | 115 |
| 114 virtual void BindFramebufferToOutputSurface(DrawingFrame* frame) OVERRIDE; | 116 virtual void BindFramebufferToOutputSurface(DrawingFrame* frame) OVERRIDE; |
| 115 virtual bool BindFramebufferToTexture(DrawingFrame* frame, | 117 virtual bool BindFramebufferToTexture(DrawingFrame* frame, |
| 116 const ScopedResource* resource, | 118 const ScopedResource* resource, |
| (...skipping 29 matching lines...) Expand all Loading... |
| 146 private: | 148 private: |
| 147 friend class GLRendererShaderPixelTest; | 149 friend class GLRendererShaderPixelTest; |
| 148 friend class GLRendererShaderTest; | 150 friend class GLRendererShaderTest; |
| 149 | 151 |
| 150 static void ToGLMatrix(float* gl_matrix, const gfx::Transform& transform); | 152 static void ToGLMatrix(float* gl_matrix, const gfx::Transform& transform); |
| 151 | 153 |
| 152 void DrawCheckerboardQuad(const DrawingFrame* frame, | 154 void DrawCheckerboardQuad(const DrawingFrame* frame, |
| 153 const CheckerboardDrawQuad* quad); | 155 const CheckerboardDrawQuad* quad); |
| 154 void DrawDebugBorderQuad(const DrawingFrame* frame, | 156 void DrawDebugBorderQuad(const DrawingFrame* frame, |
| 155 const DebugBorderDrawQuad* quad); | 157 const DebugBorderDrawQuad* quad); |
| 156 scoped_ptr<ScopedResource> DrawBackgroundFilters( | 158 scoped_ptr<ScopedResource> GetBackgroundWithFilters( |
| 157 DrawingFrame* frame, | 159 DrawingFrame* frame, |
| 158 const RenderPassDrawQuad* quad, | 160 const RenderPassDrawQuad* quad, |
| 159 const gfx::Transform& contents_device_transform, | 161 const gfx::Transform& contents_device_transform, |
| 160 const gfx::Transform& contents_device_transformInverse); | 162 const gfx::Transform& contents_device_transformInverse, |
| 163 bool* background_changed); |
| 161 void DrawRenderPassQuad(DrawingFrame* frame, const RenderPassDrawQuad* quad); | 164 void DrawRenderPassQuad(DrawingFrame* frame, const RenderPassDrawQuad* quad); |
| 162 void DrawSolidColorQuad(const DrawingFrame* frame, | 165 void DrawSolidColorQuad(const DrawingFrame* frame, |
| 163 const SolidColorDrawQuad* quad); | 166 const SolidColorDrawQuad* quad); |
| 164 void DrawStreamVideoQuad(const DrawingFrame* frame, | 167 void DrawStreamVideoQuad(const DrawingFrame* frame, |
| 165 const StreamVideoDrawQuad* quad); | 168 const StreamVideoDrawQuad* quad); |
| 166 void EnqueueTextureQuad(const DrawingFrame* frame, | 169 void EnqueueTextureQuad(const DrawingFrame* frame, |
| 167 const TextureDrawQuad* quad); | 170 const TextureDrawQuad* quad); |
| 168 void FlushTextureQuadCache(); | 171 void FlushTextureQuadCache(); |
| 169 void DrawIOSurfaceQuad(const DrawingFrame* frame, | 172 void DrawIOSurfaceQuad(const DrawingFrame* frame, |
| 170 const IOSurfaceDrawQuad* quad); | 173 const IOSurfaceDrawQuad* quad); |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 #if DEBUG_GL_CALLS && !defined(NDEBUG) | 472 #if DEBUG_GL_CALLS && !defined(NDEBUG) |
| 470 #define GLC(context, x) \ | 473 #define GLC(context, x) \ |
| 471 (x, GLRenderer::DebugGLCall(&* context, #x, __FILE__, __LINE__)) | 474 (x, GLRenderer::DebugGLCall(&* context, #x, __FILE__, __LINE__)) |
| 472 #else | 475 #else |
| 473 #define GLC(context, x) (x) | 476 #define GLC(context, x) (x) |
| 474 #endif | 477 #endif |
| 475 | 478 |
| 476 } // namespace cc | 479 } // namespace cc |
| 477 | 480 |
| 478 #endif // CC_OUTPUT_GL_RENDERER_H_ | 481 #endif // CC_OUTPUT_GL_RENDERER_H_ |
| OLD | NEW |