| 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" | |
| 10 #include "cc/base/scoped_ptr_deque.h" | 9 #include "cc/base/scoped_ptr_deque.h" |
| 11 #include "cc/base/scoped_ptr_vector.h" | 10 #include "cc/base/scoped_ptr_vector.h" |
| 12 #include "cc/output/direct_renderer.h" | 11 #include "cc/output/direct_renderer.h" |
| 13 #include "cc/output/gl_renderer_draw_cache.h" | 12 #include "cc/output/gl_renderer_draw_cache.h" |
| 14 #include "cc/output/program_binding.h" | 13 #include "cc/output/program_binding.h" |
| 15 #include "cc/output/renderer.h" | 14 #include "cc/output/renderer.h" |
| 16 #include "cc/quads/checkerboard_draw_quad.h" | 15 #include "cc/quads/checkerboard_draw_quad.h" |
| 17 #include "cc/quads/debug_border_draw_quad.h" | 16 #include "cc/quads/debug_border_draw_quad.h" |
| 18 #include "cc/quads/io_surface_draw_quad.h" | 17 #include "cc/quads/io_surface_draw_quad.h" |
| 19 #include "cc/quads/render_pass_draw_quad.h" | 18 #include "cc/quads/render_pass_draw_quad.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 37 class PictureDrawQuad; | 36 class PictureDrawQuad; |
| 38 class ScopedResource; | 37 class ScopedResource; |
| 39 class StreamVideoDrawQuad; | 38 class StreamVideoDrawQuad; |
| 40 class TextureDrawQuad; | 39 class TextureDrawQuad; |
| 41 class TextureMailboxDeleter; | 40 class TextureMailboxDeleter; |
| 42 class StaticGeometryBinding; | 41 class StaticGeometryBinding; |
| 43 class DynamicGeometryBinding; | 42 class DynamicGeometryBinding; |
| 44 class ScopedEnsureFramebufferAllocation; | 43 class ScopedEnsureFramebufferAllocation; |
| 45 | 44 |
| 46 // Class that handles drawing of composited render layers using GL. | 45 // Class that handles drawing of composited render layers using GL. |
| 47 class CC_EXPORT GLRenderer : public DirectRenderer { | 46 class GLRenderer : public DirectRenderer { |
| 48 public: | 47 public: |
| 49 class ScopedUseGrContext; | 48 class ScopedUseGrContext; |
| 50 | 49 |
| 51 static scoped_ptr<GLRenderer> Create( | 50 static scoped_ptr<GLRenderer> Create( |
| 52 RendererClient* client, | 51 RendererClient* client, |
| 53 const RendererSettings* settings, | 52 const RendererSettings* settings, |
| 54 OutputSurface* output_surface, | 53 OutputSurface* output_surface, |
| 55 ResourceProvider* resource_provider, | 54 ResourceProvider* resource_provider, |
| 56 TextureMailboxDeleter* texture_mailbox_deleter, | 55 TextureMailboxDeleter* texture_mailbox_deleter, |
| 57 int highp_threshold_min); | 56 int highp_threshold_min); |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 void RestoreBlendFuncToDefault(SkXfermode::Mode blend_mode); | 164 void RestoreBlendFuncToDefault(SkXfermode::Mode blend_mode); |
| 166 | 165 |
| 167 gfx::Rect GetBackdropBoundingBoxForRenderPassQuad( | 166 gfx::Rect GetBackdropBoundingBoxForRenderPassQuad( |
| 168 DrawingFrame* frame, | 167 DrawingFrame* frame, |
| 169 const RenderPassDrawQuad* quad, | 168 const RenderPassDrawQuad* quad, |
| 170 const gfx::Transform& contents_device_transform, | 169 const gfx::Transform& contents_device_transform, |
| 171 const gfx::QuadF* clip_region, | 170 const gfx::QuadF* clip_region, |
| 172 bool use_aa); | 171 bool use_aa); |
| 173 scoped_ptr<ScopedResource> GetBackdropTexture(const gfx::Rect& bounding_rect); | 172 scoped_ptr<ScopedResource> GetBackdropTexture(const gfx::Rect& bounding_rect); |
| 174 | 173 |
| 175 static bool ShouldApplyBackgroundFilters(DrawingFrame* frame, | |
| 176 const RenderPassDrawQuad* quad); | |
| 177 skia::RefPtr<SkImage> ApplyBackgroundFilters( | |
| 178 DrawingFrame* frame, | |
| 179 const RenderPassDrawQuad* quad, | |
| 180 ScopedResource* background_texture); | |
| 181 | |
| 182 void DrawRenderPassQuad(DrawingFrame* frame, | 174 void DrawRenderPassQuad(DrawingFrame* frame, |
| 183 const RenderPassDrawQuad* quadi, | 175 const RenderPassDrawQuad* quadi, |
| 184 const gfx::QuadF* clip_region); | 176 const gfx::QuadF* clip_region); |
| 185 void DrawSolidColorQuad(const DrawingFrame* frame, | 177 void DrawSolidColorQuad(const DrawingFrame* frame, |
| 186 const SolidColorDrawQuad* quad, | 178 const SolidColorDrawQuad* quad, |
| 187 const gfx::QuadF* clip_region); | 179 const gfx::QuadF* clip_region); |
| 188 void DrawStreamVideoQuad(const DrawingFrame* frame, | 180 void DrawStreamVideoQuad(const DrawingFrame* frame, |
| 189 const StreamVideoDrawQuad* quad, | 181 const StreamVideoDrawQuad* quad, |
| 190 const gfx::QuadF* clip_region); | 182 const gfx::QuadF* clip_region); |
| 191 void DrawTextureQuad(const DrawingFrame* frame, | 183 void DrawTextureQuad(const DrawingFrame* frame, |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 #if DEBUG_GL_CALLS && !defined(NDEBUG) | 518 #if DEBUG_GL_CALLS && !defined(NDEBUG) |
| 527 #define GLC(context, x) \ | 519 #define GLC(context, x) \ |
| 528 (x, GLRenderer::DebugGLCall(&* context, #x, __FILE__, __LINE__)) | 520 (x, GLRenderer::DebugGLCall(&* context, #x, __FILE__, __LINE__)) |
| 529 #else | 521 #else |
| 530 #define GLC(context, x) (x) | 522 #define GLC(context, x) (x) |
| 531 #endif | 523 #endif |
| 532 | 524 |
| 533 } // namespace cc | 525 } // namespace cc |
| 534 | 526 |
| 535 #endif // CC_OUTPUT_GL_RENDERER_H_ | 527 #endif // CC_OUTPUT_GL_RENDERER_H_ |
| OLD | NEW |