| 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 <deque> | 8 #include <deque> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/cancelable_callback.h" | 11 #include "base/cancelable_callback.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "cc/base/cc_export.h" | 13 #include "cc/base/cc_export.h" |
| 14 #include "cc/output/direct_renderer.h" | 14 #include "cc/output/direct_renderer.h" |
| 15 #include "cc/output/gl_renderer_draw_cache.h" | 15 #include "cc/output/gl_renderer_draw_cache.h" |
| 16 #include "cc/output/program_binding.h" | 16 #include "cc/output/program_binding.h" |
| 17 #include "cc/output/renderer.h" | 17 #include "cc/output/renderer.h" |
| 18 #include "cc/quads/debug_border_draw_quad.h" | 18 #include "cc/quads/debug_border_draw_quad.h" |
| 19 #include "cc/quads/render_pass_draw_quad.h" | 19 #include "cc/quads/render_pass_draw_quad.h" |
| 20 #include "cc/quads/solid_color_draw_quad.h" | 20 #include "cc/quads/solid_color_draw_quad.h" |
| 21 #include "cc/quads/tile_draw_quad.h" | 21 #include "cc/quads/tile_draw_quad.h" |
| 22 #include "cc/quads/y_video_draw_quad.h" |
| 22 #include "cc/quads/yuv_video_draw_quad.h" | 23 #include "cc/quads/yuv_video_draw_quad.h" |
| 23 #include "ui/gfx/geometry/quad_f.h" | 24 #include "ui/gfx/geometry/quad_f.h" |
| 24 | 25 |
| 25 class SkBitmap; | 26 class SkBitmap; |
| 26 | 27 |
| 27 namespace gpu { | 28 namespace gpu { |
| 28 namespace gles2 { | 29 namespace gles2 { |
| 29 class GLES2Interface; | 30 class GLES2Interface; |
| 30 } | 31 } |
| 31 } | 32 } |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 const gfx::Transform& device_transform, | 216 const gfx::Transform& device_transform, |
| 216 const gfx::QuadF& aa_quad, | 217 const gfx::QuadF& aa_quad, |
| 217 const gfx::QuadF* clip_region); | 218 const gfx::QuadF* clip_region); |
| 218 void DrawContentQuadNoAA(const DrawingFrame* frame, | 219 void DrawContentQuadNoAA(const DrawingFrame* frame, |
| 219 const ContentDrawQuadBase* quad, | 220 const ContentDrawQuadBase* quad, |
| 220 ResourceId resource_id, | 221 ResourceId resource_id, |
| 221 const gfx::QuadF* clip_region); | 222 const gfx::QuadF* clip_region); |
| 222 void DrawYUVVideoQuad(const DrawingFrame* frame, | 223 void DrawYUVVideoQuad(const DrawingFrame* frame, |
| 223 const YUVVideoDrawQuad* quad, | 224 const YUVVideoDrawQuad* quad, |
| 224 const gfx::QuadF* clip_region); | 225 const gfx::QuadF* clip_region); |
| 226 void DrawYVideoQuad(const DrawingFrame* frame, |
| 227 const YVideoDrawQuad* quad, |
| 228 const gfx::QuadF* clip_region); |
| 225 void DrawPictureQuad(const DrawingFrame* frame, | 229 void DrawPictureQuad(const DrawingFrame* frame, |
| 226 const PictureDrawQuad* quad, | 230 const PictureDrawQuad* quad, |
| 227 const gfx::QuadF* clip_region); | 231 const gfx::QuadF* clip_region); |
| 228 | 232 |
| 229 void SetShaderOpacity(float opacity, int alpha_location); | 233 void SetShaderOpacity(float opacity, int alpha_location); |
| 230 void SetShaderQuadF(const gfx::QuadF& quad, int quad_location); | 234 void SetShaderQuadF(const gfx::QuadF& quad, int quad_location); |
| 231 void DrawQuadGeometryClippedByQuadF(const DrawingFrame* frame, | 235 void DrawQuadGeometryClippedByQuadF(const DrawingFrame* frame, |
| 232 const gfx::Transform& draw_transform, | 236 const gfx::Transform& draw_transform, |
| 233 const gfx::RectF& quad_rect, | 237 const gfx::RectF& quad_rect, |
| 234 const gfx::QuadF& clipping_region_quad, | 238 const gfx::QuadF& clipping_region_quad, |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 RenderPassColorMatrixProgramAA; | 341 RenderPassColorMatrixProgramAA; |
| 338 typedef ProgramBinding<VertexShaderPosTexTransform, | 342 typedef ProgramBinding<VertexShaderPosTexTransform, |
| 339 FragmentShaderRGBATexAlphaMaskColorMatrix> | 343 FragmentShaderRGBATexAlphaMaskColorMatrix> |
| 340 RenderPassMaskColorMatrixProgram; | 344 RenderPassMaskColorMatrixProgram; |
| 341 | 345 |
| 342 // Video shaders. | 346 // Video shaders. |
| 343 typedef ProgramBinding<VertexShaderVideoTransform, FragmentShaderRGBATex> | 347 typedef ProgramBinding<VertexShaderVideoTransform, FragmentShaderRGBATex> |
| 344 VideoStreamTextureProgram; | 348 VideoStreamTextureProgram; |
| 345 typedef ProgramBinding<VertexShaderPosTexYUVStretchOffset, | 349 typedef ProgramBinding<VertexShaderPosTexYUVStretchOffset, |
| 346 FragmentShaderYUVVideo> VideoYUVProgram; | 350 FragmentShaderYUVVideo> VideoYUVProgram; |
| 351 typedef ProgramBinding<VertexShaderPosTexTransform, FragmentShaderYVideo> |
| 352 VideoYProgram; |
| 347 | 353 |
| 348 // Special purpose / effects shaders. | 354 // Special purpose / effects shaders. |
| 349 typedef ProgramBinding<VertexShaderPos, FragmentShaderColor> | 355 typedef ProgramBinding<VertexShaderPos, FragmentShaderColor> |
| 350 DebugBorderProgram; | 356 DebugBorderProgram; |
| 351 typedef ProgramBinding<VertexShaderQuad, FragmentShaderColor> | 357 typedef ProgramBinding<VertexShaderQuad, FragmentShaderColor> |
| 352 SolidColorProgram; | 358 SolidColorProgram; |
| 353 typedef ProgramBinding<VertexShaderQuadAA, FragmentShaderColorAA> | 359 typedef ProgramBinding<VertexShaderQuadAA, FragmentShaderColorAA> |
| 354 SolidColorProgramAA; | 360 SolidColorProgramAA; |
| 355 | 361 |
| 356 const TileProgram* GetTileProgram( | 362 const TileProgram* GetTileProgram( |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 TexCoordPrecision precision, | 412 TexCoordPrecision precision, |
| 407 SamplerType sampler); | 413 SamplerType sampler); |
| 408 const NonPremultipliedTextureBackgroundProgram* | 414 const NonPremultipliedTextureBackgroundProgram* |
| 409 GetNonPremultipliedTextureBackgroundProgram(TexCoordPrecision precision, | 415 GetNonPremultipliedTextureBackgroundProgram(TexCoordPrecision precision, |
| 410 SamplerType sampler); | 416 SamplerType sampler); |
| 411 | 417 |
| 412 const VideoYUVProgram* GetVideoYUVProgram(TexCoordPrecision precision, | 418 const VideoYUVProgram* GetVideoYUVProgram(TexCoordPrecision precision, |
| 413 SamplerType sampler, | 419 SamplerType sampler, |
| 414 bool use_alpha_texture, | 420 bool use_alpha_texture, |
| 415 bool use_nv12); | 421 bool use_nv12); |
| 422 const VideoYProgram* GetVideoYProgram(TexCoordPrecision precision, |
| 423 SamplerType sampler); |
| 416 const VideoStreamTextureProgram* GetVideoStreamTextureProgram( | 424 const VideoStreamTextureProgram* GetVideoStreamTextureProgram( |
| 417 TexCoordPrecision precision); | 425 TexCoordPrecision precision); |
| 418 | 426 |
| 419 const DebugBorderProgram* GetDebugBorderProgram(); | 427 const DebugBorderProgram* GetDebugBorderProgram(); |
| 420 const SolidColorProgram* GetSolidColorProgram(); | 428 const SolidColorProgram* GetSolidColorProgram(); |
| 421 const SolidColorProgramAA* GetSolidColorProgramAA(); | 429 const SolidColorProgramAA* GetSolidColorProgramAA(); |
| 422 | 430 |
| 423 TileProgram | 431 TileProgram |
| 424 tile_program_[LAST_TEX_COORD_PRECISION + 1][LAST_SAMPLER_TYPE + 1]; | 432 tile_program_[LAST_TEX_COORD_PRECISION + 1][LAST_SAMPLER_TYPE + 1]; |
| 425 TileProgramOpaque | 433 TileProgramOpaque |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 [LAST_BLEND_MODE + 1] | 480 [LAST_BLEND_MODE + 1] |
| 473 [LAST_MASK_VALUE + 1]; | 481 [LAST_MASK_VALUE + 1]; |
| 474 RenderPassMaskColorMatrixProgramAA | 482 RenderPassMaskColorMatrixProgramAA |
| 475 render_pass_mask_color_matrix_program_aa_[LAST_TEX_COORD_PRECISION + 1] | 483 render_pass_mask_color_matrix_program_aa_[LAST_TEX_COORD_PRECISION + 1] |
| 476 [LAST_SAMPLER_TYPE + 1] | 484 [LAST_SAMPLER_TYPE + 1] |
| 477 [LAST_BLEND_MODE + 1] | 485 [LAST_BLEND_MODE + 1] |
| 478 [LAST_MASK_VALUE + 1]; | 486 [LAST_MASK_VALUE + 1]; |
| 479 | 487 |
| 480 VideoYUVProgram video_yuv_program_[LAST_TEX_COORD_PRECISION + 1] | 488 VideoYUVProgram video_yuv_program_[LAST_TEX_COORD_PRECISION + 1] |
| 481 [LAST_SAMPLER_TYPE + 1][2][2]; | 489 [LAST_SAMPLER_TYPE + 1][2][2]; |
| 490 VideoYProgram video_y_program_[LAST_TEX_COORD_PRECISION + 1] |
| 491 [LAST_SAMPLER_TYPE + 1]; |
| 482 VideoStreamTextureProgram | 492 VideoStreamTextureProgram |
| 483 video_stream_texture_program_[LAST_TEX_COORD_PRECISION + 1]; | 493 video_stream_texture_program_[LAST_TEX_COORD_PRECISION + 1]; |
| 484 | 494 |
| 485 DebugBorderProgram debug_border_program_; | 495 DebugBorderProgram debug_border_program_; |
| 486 SolidColorProgram solid_color_program_; | 496 SolidColorProgram solid_color_program_; |
| 487 SolidColorProgramAA solid_color_program_aa_; | 497 SolidColorProgramAA solid_color_program_aa_; |
| 488 | 498 |
| 489 gpu::gles2::GLES2Interface* gl_; | 499 gpu::gles2::GLES2Interface* gl_; |
| 490 gpu::ContextSupport* context_support_; | 500 gpu::ContextSupport* context_support_; |
| 491 | 501 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 523 | 533 |
| 524 SkBitmap on_demand_tile_raster_bitmap_; | 534 SkBitmap on_demand_tile_raster_bitmap_; |
| 525 ResourceId on_demand_tile_raster_resource_id_; | 535 ResourceId on_demand_tile_raster_resource_id_; |
| 526 BoundGeometry bound_geometry_; | 536 BoundGeometry bound_geometry_; |
| 527 DISALLOW_COPY_AND_ASSIGN(GLRenderer); | 537 DISALLOW_COPY_AND_ASSIGN(GLRenderer); |
| 528 }; | 538 }; |
| 529 | 539 |
| 530 } // namespace cc | 540 } // namespace cc |
| 531 | 541 |
| 532 #endif // CC_OUTPUT_GL_RENDERER_H_ | 542 #endif // CC_OUTPUT_GL_RENDERER_H_ |
| OLD | NEW |