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_deque.h" | 10 #include "cc/base/scoped_ptr_deque.h" |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 const gfx::Transform& contents_device_transform, | 160 const gfx::Transform& contents_device_transform, |
161 bool use_aa); | 161 bool use_aa); |
162 scoped_ptr<ScopedResource> GetBackdropTexture(const gfx::Rect& bounding_rect); | 162 scoped_ptr<ScopedResource> GetBackdropTexture(const gfx::Rect& bounding_rect); |
163 | 163 |
164 static bool ShouldApplyBackgroundFilters(DrawingFrame* frame, | 164 static bool ShouldApplyBackgroundFilters(DrawingFrame* frame, |
165 const RenderPassDrawQuad* quad); | 165 const RenderPassDrawQuad* quad); |
166 skia::RefPtr<SkImage> ApplyBackgroundFilters( | 166 skia::RefPtr<SkImage> ApplyBackgroundFilters( |
167 DrawingFrame* frame, | 167 DrawingFrame* frame, |
168 const RenderPassDrawQuad* quad, | 168 const RenderPassDrawQuad* quad, |
169 ScopedResource* background_texture); | 169 ScopedResource* background_texture); |
170 scoped_ptr<ScopedResource> ApplyInverseTransformForBackgroundFilters( | |
171 DrawingFrame* frame, | |
172 const RenderPassDrawQuad* quad, | |
173 const gfx::Transform& contents_device_transform, | |
174 skia::RefPtr<SkImage> backdrop_bitmap, | |
175 const gfx::Rect& backdrop_bounding_rect); | |
176 | 170 |
177 void DrawRenderPassQuad(DrawingFrame* frame, const RenderPassDrawQuad* quad); | 171 void DrawRenderPassQuad(DrawingFrame* frame, const RenderPassDrawQuad* quad); |
178 void DrawSolidColorQuad(const DrawingFrame* frame, | 172 void DrawSolidColorQuad(const DrawingFrame* frame, |
179 const SolidColorDrawQuad* quad); | 173 const SolidColorDrawQuad* quad); |
180 void DrawStreamVideoQuad(const DrawingFrame* frame, | 174 void DrawStreamVideoQuad(const DrawingFrame* frame, |
181 const StreamVideoDrawQuad* quad); | 175 const StreamVideoDrawQuad* quad); |
182 void EnqueueTextureQuad(const DrawingFrame* frame, | 176 void EnqueueTextureQuad(const DrawingFrame* frame, |
183 const TextureDrawQuad* quad); | 177 const TextureDrawQuad* quad); |
184 void FlushTextureQuadCache(); | 178 void FlushTextureQuadCache(); |
185 void DrawIOSurfaceQuad(const DrawingFrame* frame, | 179 void DrawIOSurfaceQuad(const DrawingFrame* frame, |
(...skipping 15 matching lines...) Expand all Loading... |
201 const PictureDrawQuad* quad); | 195 const PictureDrawQuad* quad); |
202 | 196 |
203 void SetShaderOpacity(float opacity, int alpha_location); | 197 void SetShaderOpacity(float opacity, int alpha_location); |
204 void SetShaderQuadF(const gfx::QuadF& quad, int quad_location); | 198 void SetShaderQuadF(const gfx::QuadF& quad, int quad_location); |
205 void DrawQuadGeometry(const DrawingFrame* frame, | 199 void DrawQuadGeometry(const DrawingFrame* frame, |
206 const gfx::Transform& draw_transform, | 200 const gfx::Transform& draw_transform, |
207 const gfx::RectF& quad_rect, | 201 const gfx::RectF& quad_rect, |
208 int matrix_location); | 202 int matrix_location); |
209 void SetUseProgram(unsigned program); | 203 void SetUseProgram(unsigned program); |
210 | 204 |
211 void CopyTextureToFramebuffer(const DrawingFrame* frame, | |
212 int texture_id, | |
213 const gfx::Rect& rect, | |
214 const gfx::Transform& draw_matrix, | |
215 bool flip_vertically); | |
216 | |
217 bool UseScopedTexture(DrawingFrame* frame, | 205 bool UseScopedTexture(DrawingFrame* frame, |
218 const ScopedResource* resource, | 206 const ScopedResource* resource, |
219 const gfx::Rect& viewport_rect); | 207 const gfx::Rect& viewport_rect); |
220 | 208 |
221 bool MakeContextCurrent(); | 209 bool MakeContextCurrent(); |
222 | 210 |
223 void InitializeSharedObjects(); | 211 void InitializeSharedObjects(); |
224 void CleanupSharedObjects(); | 212 void CleanupSharedObjects(); |
225 | 213 |
226 typedef base::Callback<void(scoped_ptr<CopyOutputRequest> copy_request, | 214 typedef base::Callback<void(scoped_ptr<CopyOutputRequest> copy_request, |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
480 #if DEBUG_GL_CALLS && !defined(NDEBUG) | 468 #if DEBUG_GL_CALLS && !defined(NDEBUG) |
481 #define GLC(context, x) \ | 469 #define GLC(context, x) \ |
482 (x, GLRenderer::DebugGLCall(&* context, #x, __FILE__, __LINE__)) | 470 (x, GLRenderer::DebugGLCall(&* context, #x, __FILE__, __LINE__)) |
483 #else | 471 #else |
484 #define GLC(context, x) (x) | 472 #define GLC(context, x) (x) |
485 #endif | 473 #endif |
486 | 474 |
487 } // namespace cc | 475 } // namespace cc |
488 | 476 |
489 #endif // CC_OUTPUT_GL_RENDERER_H_ | 477 #endif // CC_OUTPUT_GL_RENDERER_H_ |
OLD | NEW |