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

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

Issue 664803003: Update from chromium a8e7c94b1b79a0948d05a1fcfff53391d22ce37a (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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 | « cc/layers/tiled_layer_unittest.cc ('k') | cc/output/gl_renderer.cc » ('j') | no next file with comments »
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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 152
153 gfx::Rect GetBackdropBoundingBoxForRenderPassQuad( 153 gfx::Rect GetBackdropBoundingBoxForRenderPassQuad(
154 DrawingFrame* frame, 154 DrawingFrame* frame,
155 const RenderPassDrawQuad* quad, 155 const RenderPassDrawQuad* quad,
156 const gfx::Transform& contents_device_transform); 156 const gfx::Transform& contents_device_transform,
157 bool use_aa);
157 scoped_ptr<ScopedResource> GetBackdropTexture(const gfx::Rect& bounding_rect); 158 scoped_ptr<ScopedResource> GetBackdropTexture(const gfx::Rect& bounding_rect);
158 159
159 static bool ShouldApplyBackgroundFilters(DrawingFrame* frame, 160 static bool ShouldApplyBackgroundFilters(DrawingFrame* frame,
160 const RenderPassDrawQuad* quad); 161 const RenderPassDrawQuad* quad);
161 skia::RefPtr<SkImage> ApplyBackgroundFilters( 162 skia::RefPtr<SkImage> ApplyBackgroundFilters(
162 DrawingFrame* frame, 163 DrawingFrame* frame,
163 const RenderPassDrawQuad* quad, 164 const RenderPassDrawQuad* quad,
164 ScopedResource* background_texture); 165 ScopedResource* background_texture);
165 scoped_ptr<ScopedResource> ApplyInverseTransformForBackgroundFilters( 166 scoped_ptr<ScopedResource> ApplyInverseTransformForBackgroundFilters(
166 DrawingFrame* frame, 167 DrawingFrame* frame,
167 const RenderPassDrawQuad* quad, 168 const RenderPassDrawQuad* quad,
168 const gfx::Transform& contents_device_transform_inverse, 169 const gfx::Transform& contents_device_transform_inverse,
169 ScopedResource* background_texture,
170 skia::RefPtr<SkImage> backdrop_bitmap, 170 skia::RefPtr<SkImage> backdrop_bitmap,
171 const gfx::Rect& backdrop_bounding_rect); 171 const gfx::Rect& backdrop_bounding_rect);
172 172
173 void DrawRenderPassQuad(DrawingFrame* frame, const RenderPassDrawQuad* quad); 173 void DrawRenderPassQuad(DrawingFrame* frame, const RenderPassDrawQuad* quad);
174 void DrawSolidColorQuad(const DrawingFrame* frame, 174 void DrawSolidColorQuad(const DrawingFrame* frame,
175 const SolidColorDrawQuad* quad); 175 const SolidColorDrawQuad* quad);
176 void DrawStreamVideoQuad(const DrawingFrame* frame, 176 void DrawStreamVideoQuad(const DrawingFrame* frame,
177 const StreamVideoDrawQuad* quad); 177 const StreamVideoDrawQuad* quad);
178 void EnqueueTextureQuad(const DrawingFrame* frame, 178 void EnqueueTextureQuad(const DrawingFrame* frame,
179 const TextureDrawQuad* quad); 179 const TextureDrawQuad* quad);
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 TexCoordPrecision precision, SamplerType sampler); 321 TexCoordPrecision precision, SamplerType sampler);
322 const TileProgramSwizzle* GetTileProgramSwizzle( 322 const TileProgramSwizzle* GetTileProgramSwizzle(
323 TexCoordPrecision precision, SamplerType sampler); 323 TexCoordPrecision precision, SamplerType sampler);
324 const TileProgramSwizzleOpaque* GetTileProgramSwizzleOpaque( 324 const TileProgramSwizzleOpaque* GetTileProgramSwizzleOpaque(
325 TexCoordPrecision precision, SamplerType sampler); 325 TexCoordPrecision precision, SamplerType sampler);
326 const TileProgramSwizzleAA* GetTileProgramSwizzleAA( 326 const TileProgramSwizzleAA* GetTileProgramSwizzleAA(
327 TexCoordPrecision precision, SamplerType sampler); 327 TexCoordPrecision precision, SamplerType sampler);
328 328
329 const TileCheckerboardProgram* GetTileCheckerboardProgram(); 329 const TileCheckerboardProgram* GetTileCheckerboardProgram();
330 330
331 const RenderPassProgram* GetRenderPassProgram( 331 const RenderPassProgram* GetRenderPassProgram(TexCoordPrecision precision,
332 TexCoordPrecision precision); 332 BlendMode blend_mode);
333 const RenderPassProgramAA* GetRenderPassProgramAA( 333 const RenderPassProgramAA* GetRenderPassProgramAA(TexCoordPrecision precision,
334 TexCoordPrecision precision); 334 BlendMode blend_mode);
335 const RenderPassMaskProgram* GetRenderPassMaskProgram( 335 const RenderPassMaskProgram* GetRenderPassMaskProgram(
336 TexCoordPrecision precision); 336 TexCoordPrecision precision,
337 BlendMode blend_mode);
337 const RenderPassMaskProgramAA* GetRenderPassMaskProgramAA( 338 const RenderPassMaskProgramAA* GetRenderPassMaskProgramAA(
338 TexCoordPrecision precision); 339 TexCoordPrecision precision,
340 BlendMode blend_mode);
339 const RenderPassColorMatrixProgram* GetRenderPassColorMatrixProgram( 341 const RenderPassColorMatrixProgram* GetRenderPassColorMatrixProgram(
340 TexCoordPrecision precision); 342 TexCoordPrecision precision,
343 BlendMode blend_mode);
341 const RenderPassColorMatrixProgramAA* GetRenderPassColorMatrixProgramAA( 344 const RenderPassColorMatrixProgramAA* GetRenderPassColorMatrixProgramAA(
342 TexCoordPrecision precision); 345 TexCoordPrecision precision,
346 BlendMode blend_mode);
343 const RenderPassMaskColorMatrixProgram* GetRenderPassMaskColorMatrixProgram( 347 const RenderPassMaskColorMatrixProgram* GetRenderPassMaskColorMatrixProgram(
344 TexCoordPrecision precision); 348 TexCoordPrecision precision,
349 BlendMode blend_mode);
345 const RenderPassMaskColorMatrixProgramAA* 350 const RenderPassMaskColorMatrixProgramAA*
346 GetRenderPassMaskColorMatrixProgramAA(TexCoordPrecision precision); 351 GetRenderPassMaskColorMatrixProgramAA(TexCoordPrecision precision,
352 BlendMode blend_mode);
347 353
348 const TextureProgram* GetTextureProgram( 354 const TextureProgram* GetTextureProgram(
349 TexCoordPrecision precision); 355 TexCoordPrecision precision);
350 const NonPremultipliedTextureProgram* GetNonPremultipliedTextureProgram( 356 const NonPremultipliedTextureProgram* GetNonPremultipliedTextureProgram(
351 TexCoordPrecision precision); 357 TexCoordPrecision precision);
352 const TextureBackgroundProgram* GetTextureBackgroundProgram( 358 const TextureBackgroundProgram* GetTextureBackgroundProgram(
353 TexCoordPrecision precision); 359 TexCoordPrecision precision);
354 const NonPremultipliedTextureBackgroundProgram* 360 const NonPremultipliedTextureBackgroundProgram*
355 GetNonPremultipliedTextureBackgroundProgram(TexCoordPrecision precision); 361 GetNonPremultipliedTextureBackgroundProgram(TexCoordPrecision precision);
356 const TextureProgram* GetTextureIOSurfaceProgram( 362 const TextureProgram* GetTextureIOSurfaceProgram(
(...skipping 24 matching lines...) Expand all
381 TileCheckerboardProgram tile_checkerboard_program_; 387 TileCheckerboardProgram tile_checkerboard_program_;
382 388
383 TextureProgram texture_program_[NumTexCoordPrecisions]; 389 TextureProgram texture_program_[NumTexCoordPrecisions];
384 NonPremultipliedTextureProgram 390 NonPremultipliedTextureProgram
385 nonpremultiplied_texture_program_[NumTexCoordPrecisions]; 391 nonpremultiplied_texture_program_[NumTexCoordPrecisions];
386 TextureBackgroundProgram texture_background_program_[NumTexCoordPrecisions]; 392 TextureBackgroundProgram texture_background_program_[NumTexCoordPrecisions];
387 NonPremultipliedTextureBackgroundProgram 393 NonPremultipliedTextureBackgroundProgram
388 nonpremultiplied_texture_background_program_[NumTexCoordPrecisions]; 394 nonpremultiplied_texture_background_program_[NumTexCoordPrecisions];
389 TextureProgram texture_io_surface_program_[NumTexCoordPrecisions]; 395 TextureProgram texture_io_surface_program_[NumTexCoordPrecisions];
390 396
391 RenderPassProgram render_pass_program_[NumTexCoordPrecisions]; 397 RenderPassProgram render_pass_program_[NumTexCoordPrecisions][NumBlendModes];
392 RenderPassProgramAA render_pass_program_aa_[NumTexCoordPrecisions]; 398 RenderPassProgramAA
393 RenderPassMaskProgram render_pass_mask_program_[NumTexCoordPrecisions]; 399 render_pass_program_aa_[NumTexCoordPrecisions][NumBlendModes];
394 RenderPassMaskProgramAA render_pass_mask_program_aa_[NumTexCoordPrecisions]; 400 RenderPassMaskProgram
401 render_pass_mask_program_[NumTexCoordPrecisions][NumBlendModes];
402 RenderPassMaskProgramAA
403 render_pass_mask_program_aa_[NumTexCoordPrecisions][NumBlendModes];
395 RenderPassColorMatrixProgram 404 RenderPassColorMatrixProgram
396 render_pass_color_matrix_program_[NumTexCoordPrecisions]; 405 render_pass_color_matrix_program_[NumTexCoordPrecisions][NumBlendModes];
397 RenderPassColorMatrixProgramAA 406 RenderPassColorMatrixProgramAA render_pass_color_matrix_program_aa_
398 render_pass_color_matrix_program_aa_[NumTexCoordPrecisions]; 407 [NumTexCoordPrecisions][NumBlendModes];
399 RenderPassMaskColorMatrixProgram 408 RenderPassMaskColorMatrixProgram render_pass_mask_color_matrix_program_
400 render_pass_mask_color_matrix_program_[NumTexCoordPrecisions]; 409 [NumTexCoordPrecisions][NumBlendModes];
401 RenderPassMaskColorMatrixProgramAA 410 RenderPassMaskColorMatrixProgramAA render_pass_mask_color_matrix_program_aa_
402 render_pass_mask_color_matrix_program_aa_[NumTexCoordPrecisions]; 411 [NumTexCoordPrecisions][NumBlendModes];
403 412
404 VideoYUVProgram video_yuv_program_[NumTexCoordPrecisions]; 413 VideoYUVProgram video_yuv_program_[NumTexCoordPrecisions];
405 VideoYUVAProgram video_yuva_program_[NumTexCoordPrecisions]; 414 VideoYUVAProgram video_yuva_program_[NumTexCoordPrecisions];
406 VideoStreamTextureProgram 415 VideoStreamTextureProgram
407 video_stream_texture_program_[NumTexCoordPrecisions]; 416 video_stream_texture_program_[NumTexCoordPrecisions];
408 417
409 DebugBorderProgram debug_border_program_; 418 DebugBorderProgram debug_border_program_;
410 SolidColorProgram solid_color_program_; 419 SolidColorProgram solid_color_program_;
411 SolidColorProgramAA solid_color_program_aa_; 420 SolidColorProgramAA solid_color_program_aa_;
412 421
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 #if DEBUG_GL_CALLS && !defined(NDEBUG) 464 #if DEBUG_GL_CALLS && !defined(NDEBUG)
456 #define GLC(context, x) \ 465 #define GLC(context, x) \
457 (x, GLRenderer::DebugGLCall(&* context, #x, __FILE__, __LINE__)) 466 (x, GLRenderer::DebugGLCall(&* context, #x, __FILE__, __LINE__))
458 #else 467 #else
459 #define GLC(context, x) (x) 468 #define GLC(context, x) (x)
460 #endif 469 #endif
461 470
462 } // namespace cc 471 } // namespace cc
463 472
464 #endif // CC_OUTPUT_GL_RENDERER_H_ 473 #endif // CC_OUTPUT_GL_RENDERER_H_
OLDNEW
« no previous file with comments | « cc/layers/tiled_layer_unittest.cc ('k') | cc/output/gl_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698