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_vector.h" | 10 #include "cc/base/scoped_ptr_vector.h" |
11 #include "cc/output/direct_renderer.h" | 11 #include "cc/output/direct_renderer.h" |
12 #include "cc/output/gl_renderer_draw_cache.h" | 12 #include "cc/output/gl_renderer_draw_cache.h" |
13 #include "cc/output/program_binding.h" | 13 #include "cc/output/program_binding.h" |
14 #include "cc/output/renderer.h" | 14 #include "cc/output/renderer.h" |
15 #include "cc/quads/checkerboard_draw_quad.h" | 15 #include "cc/quads/checkerboard_draw_quad.h" |
16 #include "cc/quads/debug_border_draw_quad.h" | 16 #include "cc/quads/debug_border_draw_quad.h" |
17 #include "cc/quads/io_surface_draw_quad.h" | 17 #include "cc/quads/io_surface_draw_quad.h" |
18 #include "cc/quads/render_pass_draw_quad.h" | 18 #include "cc/quads/render_pass_draw_quad.h" |
19 #include "cc/quads/solid_color_draw_quad.h" | 19 #include "cc/quads/solid_color_draw_quad.h" |
20 #include "cc/quads/tile_draw_quad.h" | 20 #include "cc/quads/tile_draw_quad.h" |
21 #include "cc/quads/yuv_video_draw_quad.h" | 21 #include "cc/quads/yuv_video_draw_quad.h" |
22 #include "ui/gfx/quad_f.h" | 22 #include "ui/gfx/quad_f.h" |
23 | 23 |
24 class SkBitmap; | 24 class SkBitmap; |
25 | 25 |
26 namespace WebKit { class WebGraphicsContext3D; } | 26 namespace WebKit { class WebGraphicsContext3D; } |
27 | 27 |
28 namespace cc { | 28 namespace cc { |
29 | 29 |
30 class ContextProvider; | |
piman
2013/11/01 23:15:35
nit: not used in this file.
| |
30 class GLRendererShaderTest; | 31 class GLRendererShaderTest; |
31 class OutputSurface; | 32 class OutputSurface; |
32 class PictureDrawQuad; | 33 class PictureDrawQuad; |
33 class ScopedResource; | 34 class ScopedResource; |
34 class StreamVideoDrawQuad; | 35 class StreamVideoDrawQuad; |
35 class TextureDrawQuad; | 36 class TextureDrawQuad; |
36 class TextureMailboxDeleter; | 37 class TextureMailboxDeleter; |
37 class GeometryBinding; | 38 class GeometryBinding; |
38 class ScopedEnsureFramebufferAllocation; | 39 class ScopedEnsureFramebufferAllocation; |
39 | 40 |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
350 TexCoordPrecision precision); | 351 TexCoordPrecision precision); |
351 const VideoYUVAProgram* GetVideoYUVAProgram( | 352 const VideoYUVAProgram* GetVideoYUVAProgram( |
352 TexCoordPrecision precision); | 353 TexCoordPrecision precision); |
353 const VideoStreamTextureProgram* GetVideoStreamTextureProgram( | 354 const VideoStreamTextureProgram* GetVideoStreamTextureProgram( |
354 TexCoordPrecision precision); | 355 TexCoordPrecision precision); |
355 | 356 |
356 const DebugBorderProgram* GetDebugBorderProgram(); | 357 const DebugBorderProgram* GetDebugBorderProgram(); |
357 const SolidColorProgram* GetSolidColorProgram(); | 358 const SolidColorProgram* GetSolidColorProgram(); |
358 const SolidColorProgramAA* GetSolidColorProgramAA(); | 359 const SolidColorProgramAA* GetSolidColorProgramAA(); |
359 | 360 |
360 scoped_ptr<TileProgram> tile_program_; | 361 TileProgram tile_program_; |
361 scoped_ptr<TileProgramOpaque> tile_program_opaque_; | 362 TileProgramOpaque tile_program_opaque_; |
362 scoped_ptr<TileProgramAA> tile_program_aa_; | 363 TileProgramAA tile_program_aa_; |
363 scoped_ptr<TileProgramSwizzle> tile_program_swizzle_; | 364 TileProgramSwizzle tile_program_swizzle_; |
364 scoped_ptr<TileProgramSwizzleOpaque> tile_program_swizzle_opaque_; | 365 TileProgramSwizzleOpaque tile_program_swizzle_opaque_; |
365 scoped_ptr<TileProgramSwizzleAA> tile_program_swizzle_aa_; | 366 TileProgramSwizzleAA tile_program_swizzle_aa_; |
366 scoped_ptr<TileCheckerboardProgram> tile_checkerboard_program_; | 367 TileCheckerboardProgram tile_checkerboard_program_; |
367 | 368 |
368 scoped_ptr<TileProgram> tile_program_highp_; | 369 TileProgram tile_program_highp_; |
369 scoped_ptr<TileProgramOpaque> tile_program_opaque_highp_; | 370 TileProgramOpaque tile_program_opaque_highp_; |
370 scoped_ptr<TileProgramAA> tile_program_aa_highp_; | 371 TileProgramAA tile_program_aa_highp_; |
371 scoped_ptr<TileProgramSwizzle> tile_program_swizzle_highp_; | 372 TileProgramSwizzle tile_program_swizzle_highp_; |
372 scoped_ptr<TileProgramSwizzleOpaque> tile_program_swizzle_opaque_highp_; | 373 TileProgramSwizzleOpaque tile_program_swizzle_opaque_highp_; |
373 scoped_ptr<TileProgramSwizzleAA> tile_program_swizzle_aa_highp_; | 374 TileProgramSwizzleAA tile_program_swizzle_aa_highp_; |
374 | 375 |
375 scoped_ptr<TextureProgram> texture_program_; | 376 TextureProgram texture_program_; |
376 scoped_ptr<NonPremultipliedTextureProgram> nonpremultiplied_texture_program_; | 377 NonPremultipliedTextureProgram nonpremultiplied_texture_program_; |
377 scoped_ptr<TextureBackgroundProgram> texture_background_program_; | 378 TextureBackgroundProgram texture_background_program_; |
378 scoped_ptr<NonPremultipliedTextureBackgroundProgram> | 379 NonPremultipliedTextureBackgroundProgram |
379 nonpremultiplied_texture_background_program_; | 380 nonpremultiplied_texture_background_program_; |
380 scoped_ptr<TextureIOSurfaceProgram> texture_io_surface_program_; | 381 TextureIOSurfaceProgram texture_io_surface_program_; |
381 | 382 |
382 scoped_ptr<TextureProgram> texture_program_highp_; | 383 TextureProgram texture_program_highp_; |
383 scoped_ptr<NonPremultipliedTextureProgram> | 384 NonPremultipliedTextureProgram nonpremultiplied_texture_program_highp_; |
384 nonpremultiplied_texture_program_highp_; | 385 TextureBackgroundProgram texture_background_program_highp_; |
385 scoped_ptr<TextureBackgroundProgram> texture_background_program_highp_; | 386 NonPremultipliedTextureBackgroundProgram |
386 scoped_ptr<NonPremultipliedTextureBackgroundProgram> | |
387 nonpremultiplied_texture_background_program_highp_; | 387 nonpremultiplied_texture_background_program_highp_; |
388 scoped_ptr<TextureIOSurfaceProgram> texture_io_surface_program_highp_; | 388 TextureIOSurfaceProgram texture_io_surface_program_highp_; |
389 | 389 |
390 scoped_ptr<RenderPassProgram> render_pass_program_; | 390 RenderPassProgram render_pass_program_; |
391 scoped_ptr<RenderPassProgramAA> render_pass_program_aa_; | 391 RenderPassProgramAA render_pass_program_aa_; |
392 scoped_ptr<RenderPassMaskProgram> render_pass_mask_program_; | 392 RenderPassMaskProgram render_pass_mask_program_; |
393 scoped_ptr<RenderPassMaskProgramAA> render_pass_mask_program_aa_; | 393 RenderPassMaskProgramAA render_pass_mask_program_aa_; |
394 scoped_ptr<RenderPassColorMatrixProgram> render_pass_color_matrix_program_; | 394 RenderPassColorMatrixProgram render_pass_color_matrix_program_; |
395 scoped_ptr<RenderPassColorMatrixProgramAA> | 395 RenderPassColorMatrixProgramAA render_pass_color_matrix_program_aa_; |
396 render_pass_color_matrix_program_aa_; | 396 RenderPassMaskColorMatrixProgram render_pass_mask_color_matrix_program_; |
397 scoped_ptr<RenderPassMaskColorMatrixProgram> | 397 RenderPassMaskColorMatrixProgramAA render_pass_mask_color_matrix_program_aa_; |
398 render_pass_mask_color_matrix_program_; | |
399 scoped_ptr<RenderPassMaskColorMatrixProgramAA> | |
400 render_pass_mask_color_matrix_program_aa_; | |
401 | 398 |
402 scoped_ptr<RenderPassProgram> render_pass_program_highp_; | 399 RenderPassProgram render_pass_program_highp_; |
403 scoped_ptr<RenderPassProgramAA> render_pass_program_aa_highp_; | 400 RenderPassProgramAA render_pass_program_aa_highp_; |
404 scoped_ptr<RenderPassMaskProgram> render_pass_mask_program_highp_; | 401 RenderPassMaskProgram render_pass_mask_program_highp_; |
405 scoped_ptr<RenderPassMaskProgramAA> render_pass_mask_program_aa_highp_; | 402 RenderPassMaskProgramAA render_pass_mask_program_aa_highp_; |
406 scoped_ptr<RenderPassColorMatrixProgram> | 403 RenderPassColorMatrixProgram render_pass_color_matrix_program_highp_; |
407 render_pass_color_matrix_program_highp_; | 404 RenderPassColorMatrixProgramAA render_pass_color_matrix_program_aa_highp_; |
408 scoped_ptr<RenderPassColorMatrixProgramAA> | 405 RenderPassMaskColorMatrixProgram render_pass_mask_color_matrix_program_highp_; |
409 render_pass_color_matrix_program_aa_highp_; | 406 RenderPassMaskColorMatrixProgramAA |
410 scoped_ptr<RenderPassMaskColorMatrixProgram> | |
411 render_pass_mask_color_matrix_program_highp_; | |
412 scoped_ptr<RenderPassMaskColorMatrixProgramAA> | |
413 render_pass_mask_color_matrix_program_aa_highp_; | 407 render_pass_mask_color_matrix_program_aa_highp_; |
414 | 408 |
415 scoped_ptr<VideoYUVProgram> video_yuv_program_; | 409 VideoYUVProgram video_yuv_program_; |
416 scoped_ptr<VideoYUVAProgram> video_yuva_program_; | 410 VideoYUVAProgram video_yuva_program_; |
417 scoped_ptr<VideoStreamTextureProgram> video_stream_texture_program_; | 411 VideoStreamTextureProgram video_stream_texture_program_; |
418 | 412 |
419 scoped_ptr<VideoYUVProgram> video_yuv_program_highp_; | 413 VideoYUVProgram video_yuv_program_highp_; |
420 scoped_ptr<VideoYUVAProgram> video_yuva_program_highp_; | 414 VideoYUVAProgram video_yuva_program_highp_; |
421 scoped_ptr<VideoStreamTextureProgram> video_stream_texture_program_highp_; | 415 VideoStreamTextureProgram video_stream_texture_program_highp_; |
422 | 416 |
423 scoped_ptr<DebugBorderProgram> debug_border_program_; | 417 DebugBorderProgram debug_border_program_; |
424 scoped_ptr<SolidColorProgram> solid_color_program_; | 418 SolidColorProgram solid_color_program_; |
425 scoped_ptr<SolidColorProgramAA> solid_color_program_aa_; | 419 SolidColorProgramAA solid_color_program_aa_; |
426 | 420 |
427 WebKit::WebGraphicsContext3D* context_; | 421 WebKit::WebGraphicsContext3D* context_; |
428 gpu::ContextSupport* context_support_; | 422 gpu::ContextSupport* context_support_; |
429 | 423 |
430 skia::RefPtr<GrContext> gr_context_; | 424 skia::RefPtr<GrContext> gr_context_; |
431 skia::RefPtr<SkCanvas> sk_canvas_; | 425 skia::RefPtr<SkCanvas> sk_canvas_; |
432 | 426 |
433 TextureMailboxDeleter* texture_mailbox_deleter_; | 427 TextureMailboxDeleter* texture_mailbox_deleter_; |
434 | 428 |
435 gfx::Rect swap_buffer_rect_; | 429 gfx::Rect swap_buffer_rect_; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
467 #if DEBUG_GL_CALLS && !defined(NDEBUG) | 461 #if DEBUG_GL_CALLS && !defined(NDEBUG) |
468 #define GLC(context, x) \ | 462 #define GLC(context, x) \ |
469 (x, GLRenderer::DebugGLCall(&* context, #x, __FILE__, __LINE__)) | 463 (x, GLRenderer::DebugGLCall(&* context, #x, __FILE__, __LINE__)) |
470 #else | 464 #else |
471 #define GLC(context, x) (x) | 465 #define GLC(context, x) (x) |
472 #endif | 466 #endif |
473 | 467 |
474 } // namespace cc | 468 } // namespace cc |
475 | 469 |
476 #endif // CC_OUTPUT_GL_RENDERER_H_ | 470 #endif // CC_OUTPUT_GL_RENDERER_H_ |
OLD | NEW |