| 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 void DrawCheckerboardQuad(const DrawingFrame* frame, | 142 void DrawCheckerboardQuad(const DrawingFrame* frame, |
| 143 const CheckerboardDrawQuad* quad); | 143 const CheckerboardDrawQuad* quad); |
| 144 void DrawDebugBorderQuad(const DrawingFrame* frame, | 144 void DrawDebugBorderQuad(const DrawingFrame* frame, |
| 145 const DebugBorderDrawQuad* quad); | 145 const DebugBorderDrawQuad* quad); |
| 146 static bool IsDefaultBlendMode(SkXfermode::Mode blend_mode) { | 146 static bool IsDefaultBlendMode(SkXfermode::Mode blend_mode) { |
| 147 return blend_mode == SkXfermode::kSrcOver_Mode; | 147 return blend_mode == SkXfermode::kSrcOver_Mode; |
| 148 } | 148 } |
| 149 bool CanApplyBlendModeUsingBlendFunc(SkXfermode::Mode blend_mode); | 149 bool CanApplyBlendModeUsingBlendFunc(SkXfermode::Mode blend_mode); |
| 150 void ApplyBlendModeUsingBlendFunc(SkXfermode::Mode blend_mode); | 150 void ApplyBlendModeUsingBlendFunc(SkXfermode::Mode blend_mode); |
| 151 void RestoreBlendFuncToDefault(SkXfermode::Mode blend_mode); | 151 void RestoreBlendFuncToDefault(SkXfermode::Mode blend_mode); |
| 152 scoped_ptr<ScopedResource> GetBackgroundWithFilters( | 152 |
| 153 gfx::Rect GetBackdropBoundingBoxForRenderPassQuad( |
| 153 DrawingFrame* frame, | 154 DrawingFrame* frame, |
| 154 const RenderPassDrawQuad* quad, | 155 const RenderPassDrawQuad* quad, |
| 155 const gfx::Transform& contents_device_transform, | 156 const gfx::Transform& contents_device_transform); |
| 156 const gfx::Transform& contents_device_transformInverse, | 157 scoped_ptr<ScopedResource> GetBackdropTexture(const gfx::Rect& bounding_rect); |
| 157 bool* background_changed); | 158 |
| 159 static bool ShouldApplyBackgroundFilters(DrawingFrame* frame, |
| 160 const RenderPassDrawQuad* quad); |
| 161 skia::RefPtr<SkImage> ApplyBackgroundFilters( |
| 162 DrawingFrame* frame, |
| 163 const RenderPassDrawQuad* quad, |
| 164 ScopedResource* background_texture); |
| 165 scoped_ptr<ScopedResource> ApplyInverseTransformForBackgroundFilters( |
| 166 DrawingFrame* frame, |
| 167 const RenderPassDrawQuad* quad, |
| 168 const gfx::Transform& contents_device_transform_inverse, |
| 169 ScopedResource* background_texture, |
| 170 skia::RefPtr<SkImage> backdrop_bitmap, |
| 171 const gfx::Rect& backdrop_bounding_rect); |
| 172 |
| 158 void DrawRenderPassQuad(DrawingFrame* frame, const RenderPassDrawQuad* quad); | 173 void DrawRenderPassQuad(DrawingFrame* frame, const RenderPassDrawQuad* quad); |
| 159 void DrawSolidColorQuad(const DrawingFrame* frame, | 174 void DrawSolidColorQuad(const DrawingFrame* frame, |
| 160 const SolidColorDrawQuad* quad); | 175 const SolidColorDrawQuad* quad); |
| 161 void DrawStreamVideoQuad(const DrawingFrame* frame, | 176 void DrawStreamVideoQuad(const DrawingFrame* frame, |
| 162 const StreamVideoDrawQuad* quad); | 177 const StreamVideoDrawQuad* quad); |
| 163 void EnqueueTextureQuad(const DrawingFrame* frame, | 178 void EnqueueTextureQuad(const DrawingFrame* frame, |
| 164 const TextureDrawQuad* quad); | 179 const TextureDrawQuad* quad); |
| 165 void FlushTextureQuadCache(); | 180 void FlushTextureQuadCache(); |
| 166 void DrawIOSurfaceQuad(const DrawingFrame* frame, | 181 void DrawIOSurfaceQuad(const DrawingFrame* frame, |
| 167 const IOSurfaceDrawQuad* quad); | 182 const IOSurfaceDrawQuad* quad); |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 #if DEBUG_GL_CALLS && !defined(NDEBUG) | 455 #if DEBUG_GL_CALLS && !defined(NDEBUG) |
| 441 #define GLC(context, x) \ | 456 #define GLC(context, x) \ |
| 442 (x, GLRenderer::DebugGLCall(&* context, #x, __FILE__, __LINE__)) | 457 (x, GLRenderer::DebugGLCall(&* context, #x, __FILE__, __LINE__)) |
| 443 #else | 458 #else |
| 444 #define GLC(context, x) (x) | 459 #define GLC(context, x) (x) |
| 445 #endif | 460 #endif |
| 446 | 461 |
| 447 } // namespace cc | 462 } // namespace cc |
| 448 | 463 |
| 449 #endif // CC_OUTPUT_GL_RENDERER_H_ | 464 #endif // CC_OUTPUT_GL_RENDERER_H_ |
| OLD | NEW |