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

Side by Side Diff: content/browser/renderer_host/compositor_impl_android.h

Issue 2612083002: DirectCompositorFrameSink Uses CompositorFrameSinkSupport (Closed)
Patch Set: Added Add/RemoveChildFrameSink() to WindowAndroidCompositor Created 3 years, 10 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <unordered_set>
11 12
12 #include "base/cancelable_callback.h" 13 #include "base/cancelable_callback.h"
13 #include "base/compiler_specific.h" 14 #include "base/compiler_specific.h"
14 #include "base/macros.h" 15 #include "base/macros.h"
15 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
16 #include "base/observer_list.h" 17 #include "base/observer_list.h"
17 #include "base/timer/timer.h" 18 #include "base/timer/timer.h"
18 #include "cc/surfaces/frame_sink_id.h" 19 #include "cc/surfaces/frame_sink_id.h"
19 #include "cc/trees/layer_tree_host_client.h" 20 #include "cc/trees/layer_tree_host_client.h"
20 #include "cc/trees/layer_tree_host_single_thread_client.h" 21 #include "cc/trees/layer_tree_host_single_thread_client.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // LayerTreeHostSingleThreadClient implementation. 97 // LayerTreeHostSingleThreadClient implementation.
97 void DidSubmitCompositorFrame() override; 98 void DidSubmitCompositorFrame() override;
98 void DidLoseCompositorFrameSink() override; 99 void DidLoseCompositorFrameSink() override;
99 100
100 // WindowAndroidCompositor implementation. 101 // WindowAndroidCompositor implementation.
101 void AttachLayerForReadback(scoped_refptr<cc::Layer> layer) override; 102 void AttachLayerForReadback(scoped_refptr<cc::Layer> layer) override;
102 void RequestCopyOfOutputOnRootLayer( 103 void RequestCopyOfOutputOnRootLayer(
103 std::unique_ptr<cc::CopyOutputRequest> request) override; 104 std::unique_ptr<cc::CopyOutputRequest> request) override;
104 void SetNeedsAnimate() override; 105 void SetNeedsAnimate() override;
105 cc::FrameSinkId GetFrameSinkId() override; 106 cc::FrameSinkId GetFrameSinkId() override;
107 void AddChildFrameSink(const cc::FrameSinkId& frame_sink_id);
Fady Samuel 2017/02/02 16:40:26 Add override; to the end.
Alex Z. 2017/02/02 17:01:56 Done.
108 void RemoveChildFrameSink(const cc::FrameSinkId& frame_sink_id);
Fady Samuel 2017/02/02 16:40:26 Add override; to the end.
Alex Z. 2017/02/02 17:01:56 Done.
106 109
107 void SetVisible(bool visible); 110 void SetVisible(bool visible);
108 void CreateLayerTreeHost(); 111 void CreateLayerTreeHost();
109 112
110 void HandlePendingCompositorFrameSinkRequest(); 113 void HandlePendingCompositorFrameSinkRequest();
111 114
112 #if defined(ENABLE_VULKAN) 115 #if defined(ENABLE_VULKAN)
113 void CreateVulkanOutputSurface(); 116 void CreateVulkanOutputSurface();
114 #endif 117 #endif
115 void OnGpuChannelEstablished( 118 void OnGpuChannelEstablished(
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 161
159 size_t num_successive_context_creation_failures_; 162 size_t num_successive_context_creation_failures_;
160 163
161 // Whether there is an CompositorFrameSink request pending from the current 164 // Whether there is an CompositorFrameSink request pending from the current
162 // |host_|. Becomes |true| if RequestNewCompositorFrameSink is called, and 165 // |host_|. Becomes |true| if RequestNewCompositorFrameSink is called, and
163 // |false| if |host_| is deleted or we succeed in creating *and* initializing 166 // |false| if |host_| is deleted or we succeed in creating *and* initializing
164 // a CompositorFrameSink (which is essentially the contract with cc). 167 // a CompositorFrameSink (which is essentially the contract with cc).
165 bool compositor_frame_sink_request_pending_; 168 bool compositor_frame_sink_request_pending_;
166 169
167 gpu::Capabilities gpu_capabilities_; 170 gpu::Capabilities gpu_capabilities_;
171 bool has_compositor_frame_sink_ = false;
172 std::unordered_set<cc::FrameSinkId, cc::FrameSinkIdHash>
173 pending_child_frame_sink_ids_;
174
168 base::WeakPtrFactory<CompositorImpl> weak_factory_; 175 base::WeakPtrFactory<CompositorImpl> weak_factory_;
169 176
170 DISALLOW_COPY_AND_ASSIGN(CompositorImpl); 177 DISALLOW_COPY_AND_ASSIGN(CompositorImpl);
171 }; 178 };
172 179
173 } // namespace content 180 } // namespace content
174 181
175 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ 182 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_
OLDNEW
« no previous file with comments | « components/exo/compositor_frame_sink.cc ('k') | content/browser/renderer_host/compositor_impl_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698