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

Side by Side Diff: cc/output/compositor_frame_sink.h

Issue 2868473002: Implement aura::Window::CreateCompositorFrameSink() (Closed)
Patch Set: Address review issues Created 3 years, 7 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 | components/exo/BUILD.gn » ('j') | components/exo/surface.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_COMPOSITOR_FRAME_SINK_H_ 5 #ifndef CC_OUTPUT_COMPOSITOR_FRAME_SINK_H_
6 #define CC_OUTPUT_COMPOSITOR_FRAME_SINK_H_ 6 #define CC_OUTPUT_COMPOSITOR_FRAME_SINK_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <memory> 9 #include <memory>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/threading/thread_checker.h" 13 #include "base/threading/thread_checker.h"
14 #include "cc/cc_export.h" 14 #include "cc/cc_export.h"
15 #include "cc/output/context_provider.h" 15 #include "cc/output/context_provider.h"
16 #include "cc/output/overlay_candidate_validator.h" 16 #include "cc/output/overlay_candidate_validator.h"
17 #include "cc/output/vulkan_context_provider.h" 17 #include "cc/output/vulkan_context_provider.h"
18 #include "cc/resources/returned_resource.h" 18 #include "cc/resources/returned_resource.h"
19 #include "cc/surfaces/surface_id.h"
19 #include "gpu/command_buffer/common/texture_in_use_response.h" 20 #include "gpu/command_buffer/common/texture_in_use_response.h"
20 #include "ui/gfx/color_space.h" 21 #include "ui/gfx/color_space.h"
21 22
22 namespace gpu { 23 namespace gpu {
23 class GpuMemoryBufferManager; 24 class GpuMemoryBufferManager;
24 } 25 }
25 26
26 namespace cc { 27 namespace cc {
27 28
28 class CompositorFrame; 29 class CompositorFrame;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // 115 //
115 // CompositorFrameSink::Invalidate is called by the compositor to notify that 116 // CompositorFrameSink::Invalidate is called by the compositor to notify that
116 // there's new content. 117 // there's new content.
117 virtual void Invalidate() {} 118 virtual void Invalidate() {}
118 119
119 // For successful swaps, the implementation must call 120 // For successful swaps, the implementation must call
120 // DidReceiveCompositorFrameAck() asynchronously when the frame has been 121 // DidReceiveCompositorFrameAck() asynchronously when the frame has been
121 // processed in order to unthrottle the next frame. 122 // processed in order to unthrottle the next frame.
122 virtual void SubmitCompositorFrame(CompositorFrame frame) = 0; 123 virtual void SubmitCompositorFrame(CompositorFrame frame) = 0;
123 124
125 // Notify that the surface is no longer in use (and is okay to be evicted) so
126 // that its resources gets returned in time.
127 virtual void EvictFrame() {}
Fady Samuel 2017/05/08 18:17:35 We prefer pure virtual in cc.
Peng 2017/05/08 20:14:00 Tried it and found out making it pure will modify
128
124 protected: 129 protected:
125 // Bound to the ContextProvider to hear about when it is lost and inform the 130 // Bound to the ContextProvider to hear about when it is lost and inform the
126 // |client_|. 131 // |client_|.
127 void DidLoseCompositorFrameSink(); 132 void DidLoseCompositorFrameSink();
128 133
129 CompositorFrameSinkClient* client_ = nullptr; 134 CompositorFrameSinkClient* client_ = nullptr;
130 135
131 struct CompositorFrameSink::Capabilities capabilities_; 136 struct CompositorFrameSink::Capabilities capabilities_;
132 scoped_refptr<ContextProvider> context_provider_; 137 scoped_refptr<ContextProvider> context_provider_;
133 scoped_refptr<ContextProvider> worker_context_provider_; 138 scoped_refptr<ContextProvider> worker_context_provider_;
134 scoped_refptr<VulkanContextProvider> vulkan_context_provider_; 139 scoped_refptr<VulkanContextProvider> vulkan_context_provider_;
135 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; 140 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_;
136 SharedBitmapManager* shared_bitmap_manager_; 141 SharedBitmapManager* shared_bitmap_manager_;
137 142
138 private: 143 private:
139 DISALLOW_COPY_AND_ASSIGN(CompositorFrameSink); 144 DISALLOW_COPY_AND_ASSIGN(CompositorFrameSink);
140 }; 145 };
141 146
142 } // namespace cc 147 } // namespace cc
143 148
144 #endif // CC_OUTPUT_COMPOSITOR_FRAME_SINK_H_ 149 #endif // CC_OUTPUT_COMPOSITOR_FRAME_SINK_H_
OLDNEW
« no previous file with comments | « no previous file | components/exo/BUILD.gn » ('j') | components/exo/surface.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698