| 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 "cc/resources/raster_worker_pool.h" |
| 23 #include "cc/resources/task_graph_runner.h" |
| 22 #include "ui/gfx/quad_f.h" | 24 #include "ui/gfx/quad_f.h" |
| 23 | 25 |
| 24 class SkBitmap; | 26 class SkBitmap; |
| 25 | 27 |
| 26 namespace gpu { | 28 namespace gpu { |
| 27 namespace gles2 { | 29 namespace gles2 { |
| 28 class GLES2Interface; | 30 class GLES2Interface; |
| 29 } | 31 } |
| 30 } | 32 } |
| 31 | 33 |
| (...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 | 423 |
| 422 struct PendingAsyncReadPixels; | 424 struct PendingAsyncReadPixels; |
| 423 ScopedPtrVector<PendingAsyncReadPixels> pending_async_read_pixels_; | 425 ScopedPtrVector<PendingAsyncReadPixels> pending_async_read_pixels_; |
| 424 | 426 |
| 425 scoped_ptr<ResourceProvider::ScopedWriteLockGL> current_framebuffer_lock_; | 427 scoped_ptr<ResourceProvider::ScopedWriteLockGL> current_framebuffer_lock_; |
| 426 | 428 |
| 427 scoped_refptr<ResourceProvider::Fence> last_swap_fence_; | 429 scoped_refptr<ResourceProvider::Fence> last_swap_fence_; |
| 428 | 430 |
| 429 SkBitmap on_demand_tile_raster_bitmap_; | 431 SkBitmap on_demand_tile_raster_bitmap_; |
| 430 ResourceProvider::ResourceId on_demand_tile_raster_resource_id_; | 432 ResourceProvider::ResourceId on_demand_tile_raster_resource_id_; |
| 433 internal::NamespaceToken on_demand_task_namespace_; |
| 431 | 434 |
| 432 DISALLOW_COPY_AND_ASSIGN(GLRenderer); | 435 DISALLOW_COPY_AND_ASSIGN(GLRenderer); |
| 433 }; | 436 }; |
| 434 | 437 |
| 435 // Setting DEBUG_GL_CALLS to 1 will call glGetError() after almost every GL | 438 // Setting DEBUG_GL_CALLS to 1 will call glGetError() after almost every GL |
| 436 // call made by the compositor. Useful for debugging rendering issues but | 439 // call made by the compositor. Useful for debugging rendering issues but |
| 437 // will significantly degrade performance. | 440 // will significantly degrade performance. |
| 438 #define DEBUG_GL_CALLS 0 | 441 #define DEBUG_GL_CALLS 0 |
| 439 | 442 |
| 440 #if DEBUG_GL_CALLS && !defined(NDEBUG) | 443 #if DEBUG_GL_CALLS && !defined(NDEBUG) |
| 441 #define GLC(context, x) \ | 444 #define GLC(context, x) \ |
| 442 (x, GLRenderer::DebugGLCall(&* context, #x, __FILE__, __LINE__)) | 445 (x, GLRenderer::DebugGLCall(&* context, #x, __FILE__, __LINE__)) |
| 443 #else | 446 #else |
| 444 #define GLC(context, x) (x) | 447 #define GLC(context, x) (x) |
| 445 #endif | 448 #endif |
| 446 | 449 |
| 447 } // namespace cc | 450 } // namespace cc |
| 448 | 451 |
| 449 #endif // CC_OUTPUT_GL_RENDERER_H_ | 452 #endif // CC_OUTPUT_GL_RENDERER_H_ |
| OLD | NEW |