| 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" | |
| 19 #include "cc/quads/debug_border_draw_quad.h" | 18 #include "cc/quads/debug_border_draw_quad.h" |
| 20 #include "cc/quads/render_pass_draw_quad.h" | 19 #include "cc/quads/render_pass_draw_quad.h" |
| 21 #include "cc/quads/solid_color_draw_quad.h" | 20 #include "cc/quads/solid_color_draw_quad.h" |
| 22 #include "cc/quads/tile_draw_quad.h" | 21 #include "cc/quads/tile_draw_quad.h" |
| 23 #include "cc/quads/yuv_video_draw_quad.h" | 22 #include "cc/quads/yuv_video_draw_quad.h" |
| 24 #include "ui/gfx/geometry/quad_f.h" | 23 #include "ui/gfx/geometry/quad_f.h" |
| 25 | 24 |
| 26 class SkBitmap; | 25 class SkBitmap; |
| 27 | 26 |
| 28 namespace gpu { | 27 namespace gpu { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 51 public: | 50 public: |
| 52 class ScopedUseGrContext; | 51 class ScopedUseGrContext; |
| 53 | 52 |
| 54 GLRenderer(const RendererSettings* settings, | 53 GLRenderer(const RendererSettings* settings, |
| 55 OutputSurface* output_surface, | 54 OutputSurface* output_surface, |
| 56 ResourceProvider* resource_provider, | 55 ResourceProvider* resource_provider, |
| 57 TextureMailboxDeleter* texture_mailbox_deleter, | 56 TextureMailboxDeleter* texture_mailbox_deleter, |
| 58 int highp_threshold_min); | 57 int highp_threshold_min); |
| 59 ~GLRenderer() override; | 58 ~GLRenderer() override; |
| 60 | 59 |
| 61 const RendererCapabilitiesImpl& Capabilities() const override; | |
| 62 | |
| 63 void SwapBuffers(CompositorFrameMetadata metadata) override; | 60 void SwapBuffers(CompositorFrameMetadata metadata) override; |
| 64 void SwapBuffersComplete() override; | 61 void SwapBuffersComplete() override; |
| 65 | 62 |
| 66 void DidReceiveTextureInUseResponses( | 63 void DidReceiveTextureInUseResponses( |
| 67 const gpu::TextureInUseResponses& responses) override; | 64 const gpu::TextureInUseResponses& responses) override; |
| 68 | 65 |
| 69 virtual bool IsContextLost(); | 66 virtual bool IsContextLost(); |
| 70 | 67 |
| 71 protected: | 68 protected: |
| 72 void DidChangeVisibility() override; | 69 void DidChangeVisibility() override; |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 // Resources that have been sent to the GPU process, but not yet swapped. | 273 // Resources that have been sent to the GPU process, but not yet swapped. |
| 277 OverlayResourceLockList pending_overlay_resources_; | 274 OverlayResourceLockList pending_overlay_resources_; |
| 278 | 275 |
| 279 // Resources that should be shortly swapped by the GPU process. | 276 // Resources that should be shortly swapped by the GPU process. |
| 280 std::deque<OverlayResourceLockList> swapping_overlay_resources_; | 277 std::deque<OverlayResourceLockList> swapping_overlay_resources_; |
| 281 | 278 |
| 282 // Resources that the GPU process has finished swapping. The key is the | 279 // Resources that the GPU process has finished swapping. The key is the |
| 283 // texture id of the resource. | 280 // texture id of the resource. |
| 284 std::map<unsigned, OverlayResourceLock> swapped_and_acked_overlay_resources_; | 281 std::map<unsigned, OverlayResourceLock> swapped_and_acked_overlay_resources_; |
| 285 | 282 |
| 286 RendererCapabilitiesImpl capabilities_; | |
| 287 | |
| 288 unsigned offscreen_framebuffer_id_; | 283 unsigned offscreen_framebuffer_id_; |
| 289 | 284 |
| 290 std::unique_ptr<StaticGeometryBinding> shared_geometry_; | 285 std::unique_ptr<StaticGeometryBinding> shared_geometry_; |
| 291 std::unique_ptr<DynamicGeometryBinding> clipped_geometry_; | 286 std::unique_ptr<DynamicGeometryBinding> clipped_geometry_; |
| 292 gfx::QuadF shared_geometry_quad_; | 287 gfx::QuadF shared_geometry_quad_; |
| 293 | 288 |
| 294 // This block of bindings defines all of the programs used by the compositor | 289 // This block of bindings defines all of the programs used by the compositor |
| 295 // itself. Add any new programs here to GLRendererShaderTest. | 290 // itself. Add any new programs here to GLRendererShaderTest. |
| 296 | 291 |
| 297 // Tiled layer shaders. | 292 // Tiled layer shaders. |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 bool force_drawing_frame_framebuffer_unflipped_ = false; | 538 bool force_drawing_frame_framebuffer_unflipped_ = false; |
| 544 | 539 |
| 545 BoundGeometry bound_geometry_; | 540 BoundGeometry bound_geometry_; |
| 546 ColorLUTCache color_lut_cache_; | 541 ColorLUTCache color_lut_cache_; |
| 547 DISALLOW_COPY_AND_ASSIGN(GLRenderer); | 542 DISALLOW_COPY_AND_ASSIGN(GLRenderer); |
| 548 }; | 543 }; |
| 549 | 544 |
| 550 } // namespace cc | 545 } // namespace cc |
| 551 | 546 |
| 552 #endif // CC_OUTPUT_GL_RENDERER_H_ | 547 #endif // CC_OUTPUT_GL_RENDERER_H_ |
| OLD | NEW |