Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Side by Side Diff: blimp/client/feature/compositor/blimp_delegating_output_surface.h

Issue 2237223004: Add/fix some comments for BlimpDelegatingOutputSurface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | cc/test/test_delegating_output_surface.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 BLIMP_CLIENT_FEATURE_COMPOSITOR_BLIMP_DELEGATING_OUTPUT_SURFACE_H_ 5 #ifndef BLIMP_CLIENT_FEATURE_COMPOSITOR_BLIMP_DELEGATING_OUTPUT_SURFACE_H_
6 #define BLIMP_CLIENT_FEATURE_COMPOSITOR_BLIMP_DELEGATING_OUTPUT_SURFACE_H_ 6 #define BLIMP_CLIENT_FEATURE_COMPOSITOR_BLIMP_DELEGATING_OUTPUT_SURFACE_H_
7 7
8 #include "cc/output/output_surface.h" 8 #include "cc/output/output_surface.h"
9 #include "cc/output/renderer_settings.h" 9 #include "cc/output/renderer_settings.h"
10 #include "cc/scheduler/begin_frame_source.h" 10 #include "cc/scheduler/begin_frame_source.h"
11 #include "cc/surfaces/display.h" 11 #include "cc/surfaces/display.h"
12 #include "cc/surfaces/display_client.h" 12 #include "cc/surfaces/display_client.h"
13 #include "cc/surfaces/surface_factory.h" 13 #include "cc/surfaces/surface_factory.h"
14 #include "cc/surfaces/surface_factory_client.h" 14 #include "cc/surfaces/surface_factory_client.h"
15 #include "cc/surfaces/surface_id_allocator.h" 15 #include "cc/surfaces/surface_id_allocator.h"
16 #include "cc/surfaces/surface_manager.h" 16 #include "cc/surfaces/surface_manager.h"
17 17
18 namespace blimp { 18 namespace blimp {
19 namespace client { 19 namespace client {
20 20
21 // Delegating output surface that owns and forwards frames to a Display.
21 class BlimpDelegatingOutputSurface : public cc::OutputSurface, 22 class BlimpDelegatingOutputSurface : public cc::OutputSurface,
22 public cc::SurfaceFactoryClient, 23 public cc::SurfaceFactoryClient,
23 public cc::DisplayClient { 24 public cc::DisplayClient {
24 public: 25 public:
25 BlimpDelegatingOutputSurface( 26 BlimpDelegatingOutputSurface(
26 scoped_refptr<cc::ContextProvider> compositor_context_provider, 27 scoped_refptr<cc::ContextProvider> compositor_context_provider,
27 scoped_refptr<cc::ContextProvider> worker_context_provider, 28 scoped_refptr<cc::ContextProvider> worker_context_provider,
28 std::unique_ptr<cc::OutputSurface> display_output_surface, 29 std::unique_ptr<cc::OutputSurface> display_output_surface,
29 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, 30 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
30 const cc::RendererSettings& renderer_settings, 31 const cc::RendererSettings& renderer_settings,
(...skipping 13 matching lines...) Expand all
44 void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override; 45 void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override;
45 46
46 // DisplayClient implementation. 47 // DisplayClient implementation.
47 void DisplayOutputSurfaceLost() override; 48 void DisplayOutputSurfaceLost() override;
48 void DisplaySetMemoryPolicy(const cc::ManagedMemoryPolicy& policy) override; 49 void DisplaySetMemoryPolicy(const cc::ManagedMemoryPolicy& policy) override;
49 void DisplayWillDrawAndSwap(bool will_draw_and_swap, 50 void DisplayWillDrawAndSwap(bool will_draw_and_swap,
50 const cc::RenderPassList& render_passes) override; 51 const cc::RenderPassList& render_passes) override;
51 void DisplayDidDrawAndSwap() override; 52 void DisplayDidDrawAndSwap() override;
52 53
53 private: 54 private:
54 // TODO(danakj): These don't to be stored in unique_ptrs when OutputSurface 55 // TODO(danakj): These don't need to be stored in unique_ptrs when
55 // is owned/destroyed on the compositor thread. 56 // OutputSurface is owned/destroyed on the compositor thread.
56 std::unique_ptr<cc::SurfaceManager> surface_manager_; 57 std::unique_ptr<cc::SurfaceManager> surface_manager_;
57 std::unique_ptr<cc::SurfaceIdAllocator> surface_id_allocator_; 58 std::unique_ptr<cc::SurfaceIdAllocator> surface_id_allocator_;
58 cc::SurfaceId delegated_surface_id_; 59 cc::SurfaceId delegated_surface_id_;
59 60
60 // Uses surface_manager_. 61 // Uses surface_manager_.
61 std::unique_ptr<cc::SurfaceFactory> surface_factory_; 62 std::unique_ptr<cc::SurfaceFactory> surface_factory_;
62 63
63 // Uses surface_manager_. 64 // Uses surface_manager_.
64 std::unique_ptr<cc::Display> display_; 65 std::unique_ptr<cc::Display> display_;
65 }; 66 };
66 67
67 } // namespace client 68 } // namespace client
68 } // namespace blimp 69 } // namespace blimp
69 70
70 #endif // BLIMP_CLIENT_FEATURE_COMPOSITOR_BLIMP_DELEGATING_OUTPUT_SURFACE_H_ 71 #endif // BLIMP_CLIENT_FEATURE_COMPOSITOR_BLIMP_DELEGATING_OUTPUT_SURFACE_H_
OLDNEW
« no previous file with comments | « no previous file | cc/test/test_delegating_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698