Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(267)

Side by Side Diff: cc/output/gl_renderer.h

Issue 614153002: Refactoring the GLRenderer::GetBackgroundWithFilters method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased on 614953002 Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | cc/output/gl_renderer.cc » ('j') | cc/output/gl_renderer.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | cc/output/gl_renderer.cc » ('j') | cc/output/gl_renderer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698