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

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

Issue 2888043004: [cc] Add and plumb CFS::DidNotProduceFrame. (Closed)
Patch Set: address nits, rename to DidNotProduceFrame. 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 | « cc/ipc/mojo_compositor_frame_sink.mojom ('k') | cc/output/compositor_frame_sink_unittest.cc » ('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 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 "gpu/command_buffer/common/texture_in_use_response.h" 19 #include "gpu/command_buffer/common/texture_in_use_response.h"
20 #include "ui/gfx/color_space.h" 20 #include "ui/gfx/color_space.h"
21 21
22 namespace gpu { 22 namespace gpu {
23 class GpuMemoryBufferManager; 23 class GpuMemoryBufferManager;
24 } 24 }
25 25
26 namespace cc { 26 namespace cc {
27 27
28 struct BeginFrameAck;
28 class CompositorFrame; 29 class CompositorFrame;
29 class CompositorFrameSinkClient; 30 class CompositorFrameSinkClient;
30 class LocalSurfaceId; 31 class LocalSurfaceId;
31 class SharedBitmapManager; 32 class SharedBitmapManager;
32 33
33 // An interface for submitting CompositorFrames to a display compositor 34 // An interface for submitting CompositorFrames to a display compositor
34 // which will compose frames from multiple CompositorFrameSinks to show 35 // which will compose frames from multiple CompositorFrameSinks to show
35 // on screen to the user. 36 // on screen to the user.
36 // If a context_provider() is present, frames should be submitted with 37 // If a context_provider() is present, frames should be submitted with
37 // OpenGL resources (created with the context_provider()). If not, then 38 // OpenGL resources (created with the context_provider()). If not, then
(...skipping 76 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 // Signals that a BeginFrame issued by the BeginFrameSource provided to the
126 // client did not lead to a CompositorFrame submission.
127 virtual void DidNotProduceFrame(const BeginFrameAck& ack) = 0;
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 | « cc/ipc/mojo_compositor_frame_sink.mojom ('k') | cc/output/compositor_frame_sink_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698