| 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/color_lut_cache.h" | 14 #include "cc/output/color_lut_cache.h" |
| 15 #include "cc/output/direct_renderer.h" | 15 #include "cc/output/direct_renderer.h" |
| 16 #include "cc/output/gl_renderer_draw_cache.h" | 16 #include "cc/output/gl_renderer_draw_cache.h" |
| 17 #include "cc/output/program_binding.h" | 17 #include "cc/output/program_binding.h" |
| 18 #include "cc/output/renderer_capabilities_impl.h" | 18 #include "cc/output/renderer_capabilities_impl.h" |
| 19 #include "cc/quads/debug_border_draw_quad.h" | 19 #include "cc/quads/debug_border_draw_quad.h" |
| 20 #include "cc/quads/render_pass_draw_quad.h" | 20 #include "cc/quads/render_pass_draw_quad.h" |
| 21 #include "cc/quads/solid_color_draw_quad.h" | 21 #include "cc/quads/solid_color_draw_quad.h" |
| 22 #include "cc/quads/tile_draw_quad.h" | 22 #include "cc/quads/tile_draw_quad.h" |
| 23 #include "cc/quads/yuv_video_draw_quad.h" | 23 #include "cc/quads/yuv_video_draw_quad.h" |
| 24 #include "gpu/command_buffer/client/context_support.h" |
| 24 #include "ui/gfx/geometry/quad_f.h" | 25 #include "ui/gfx/geometry/quad_f.h" |
| 25 | 26 |
| 26 class SkBitmap; | 27 class SkBitmap; |
| 27 | 28 |
| 28 namespace gpu { | 29 namespace gpu { |
| 29 namespace gles2 { | 30 namespace gles2 { |
| 30 class GLES2Interface; | 31 class GLES2Interface; |
| 31 } | 32 } |
| 32 } | 33 } |
| 33 | 34 |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 const CALayerOverlay* ca_layer_overlay, | 263 const CALayerOverlay* ca_layer_overlay, |
| 263 Resource** resource, | 264 Resource** resource, |
| 264 DrawingFrame* frame, | 265 DrawingFrame* frame, |
| 265 gfx::RectF* new_bounds); | 266 gfx::RectF* new_bounds); |
| 266 | 267 |
| 267 // Schedules the |ca_layer_overlay|, which is guaranteed to have a non-null | 268 // Schedules the |ca_layer_overlay|, which is guaranteed to have a non-null |
| 268 // |rpdq| parameter. | 269 // |rpdq| parameter. |
| 269 void ScheduleRenderPassDrawQuad(const CALayerOverlay* ca_layer_overlay, | 270 void ScheduleRenderPassDrawQuad(const CALayerOverlay* ca_layer_overlay, |
| 270 DrawingFrame* external_frame); | 271 DrawingFrame* external_frame); |
| 271 | 272 |
| 273 void UpdateVisibilityForContextProvider(bool is_visible); |
| 274 |
| 272 using OverlayResourceLock = | 275 using OverlayResourceLock = |
| 273 std::unique_ptr<ResourceProvider::ScopedReadLockGL>; | 276 std::unique_ptr<ResourceProvider::ScopedReadLockGL>; |
| 274 using OverlayResourceLockList = std::vector<OverlayResourceLock>; | 277 using OverlayResourceLockList = std::vector<OverlayResourceLock>; |
| 275 | 278 |
| 276 // Resources that have been sent to the GPU process, but not yet swapped. | 279 // Resources that have been sent to the GPU process, but not yet swapped. |
| 277 OverlayResourceLockList pending_overlay_resources_; | 280 OverlayResourceLockList pending_overlay_resources_; |
| 278 | 281 |
| 279 // Resources that should be shortly swapped by the GPU process. | 282 // Resources that should be shortly swapped by the GPU process. |
| 280 std::deque<OverlayResourceLockList> swapping_overlay_resources_; | 283 std::deque<OverlayResourceLockList> swapping_overlay_resources_; |
| 281 | 284 |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 | 540 |
| 538 // The method FlippedFramebuffer determines whether the framebuffer associated | 541 // The method FlippedFramebuffer determines whether the framebuffer associated |
| 539 // with a DrawingFrame is flipped. It makes the assumption that the | 542 // with a DrawingFrame is flipped. It makes the assumption that the |
| 540 // DrawingFrame is being used as part of a render pass. If a DrawingFrame is | 543 // DrawingFrame is being used as part of a render pass. If a DrawingFrame is |
| 541 // not being used as part of a render pass, setting it here forces | 544 // not being used as part of a render pass, setting it here forces |
| 542 // FlippedFramebuffer to return |true|. | 545 // FlippedFramebuffer to return |true|. |
| 543 bool force_drawing_frame_framebuffer_unflipped_ = false; | 546 bool force_drawing_frame_framebuffer_unflipped_ = false; |
| 544 | 547 |
| 545 BoundGeometry bound_geometry_; | 548 BoundGeometry bound_geometry_; |
| 546 ColorLUTCache color_lut_cache_; | 549 ColorLUTCache color_lut_cache_; |
| 550 |
| 551 std::unique_ptr<gpu::ContextSupport::ScopedVisibility> |
| 552 context_client_visibility_; |
| 547 DISALLOW_COPY_AND_ASSIGN(GLRenderer); | 553 DISALLOW_COPY_AND_ASSIGN(GLRenderer); |
| 548 }; | 554 }; |
| 549 | 555 |
| 550 } // namespace cc | 556 } // namespace cc |
| 551 | 557 |
| 552 #endif // CC_OUTPUT_GL_RENDERER_H_ | 558 #endif // CC_OUTPUT_GL_RENDERER_H_ |
| OLD | NEW |