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

Side by Side Diff: cc/trees/layer_tree_host.h

Issue 2337913003: Fork cc::OutputSurface into cc::CompositorFrameSink. (Closed)
Patch Set: cfsfork: android-vulkan Created 4 years, 3 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/trees/channel_main.h ('k') | cc/trees/layer_tree_host.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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_TREES_LAYER_TREE_HOST_H_ 5 #ifndef CC_TREES_LAYER_TREE_HOST_H_
6 #define CC_TREES_LAYER_TREE_HOST_H_ 6 #define CC_TREES_LAYER_TREE_HOST_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 13 matching lines...) Expand all
24 #include "cc/base/cc_export.h" 24 #include "cc/base/cc_export.h"
25 #include "cc/debug/micro_benchmark.h" 25 #include "cc/debug/micro_benchmark.h"
26 #include "cc/debug/micro_benchmark_controller.h" 26 #include "cc/debug/micro_benchmark_controller.h"
27 #include "cc/input/event_listener_properties.h" 27 #include "cc/input/event_listener_properties.h"
28 #include "cc/input/input_handler.h" 28 #include "cc/input/input_handler.h"
29 #include "cc/input/layer_selection_bound.h" 29 #include "cc/input/layer_selection_bound.h"
30 #include "cc/input/scrollbar.h" 30 #include "cc/input/scrollbar.h"
31 #include "cc/input/top_controls_state.h" 31 #include "cc/input/top_controls_state.h"
32 #include "cc/layers/layer_collections.h" 32 #include "cc/layers/layer_collections.h"
33 #include "cc/layers/layer_list_iterator.h" 33 #include "cc/layers/layer_list_iterator.h"
34 #include "cc/output/output_surface.h" 34 #include "cc/output/compositor_frame_sink.h"
35 #include "cc/output/swap_promise.h" 35 #include "cc/output/swap_promise.h"
36 #include "cc/resources/resource_format.h" 36 #include "cc/resources/resource_format.h"
37 #include "cc/trees/compositor_mode.h" 37 #include "cc/trees/compositor_mode.h"
38 #include "cc/trees/layer_tree.h" 38 #include "cc/trees/layer_tree.h"
39 #include "cc/trees/layer_tree_host_client.h" 39 #include "cc/trees/layer_tree_host_client.h"
40 #include "cc/trees/layer_tree_host_interface.h" 40 #include "cc/trees/layer_tree_host_interface.h"
41 #include "cc/trees/layer_tree_settings.h" 41 #include "cc/trees/layer_tree_settings.h"
42 #include "cc/trees/proxy.h" 42 #include "cc/trees/proxy.h"
43 #include "cc/trees/surface_sequence_generator.h" 43 #include "cc/trees/surface_sequence_generator.h"
44 #include "cc/trees/swap_promise_manager.h" 44 #include "cc/trees/swap_promise_manager.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 UIResourceManager* GetUIResourceManager() const override; 146 UIResourceManager* GetUIResourceManager() const override;
147 TaskRunnerProvider* GetTaskRunnerProvider() const override; 147 TaskRunnerProvider* GetTaskRunnerProvider() const override;
148 const LayerTreeSettings& GetSettings() const override; 148 const LayerTreeSettings& GetSettings() const override;
149 void SetSurfaceClientId(uint32_t client_id) override; 149 void SetSurfaceClientId(uint32_t client_id) override;
150 void SetLayerTreeMutator(std::unique_ptr<LayerTreeMutator> mutator) override; 150 void SetLayerTreeMutator(std::unique_ptr<LayerTreeMutator> mutator) override;
151 void QueueSwapPromise(std::unique_ptr<SwapPromise> swap_promise) override; 151 void QueueSwapPromise(std::unique_ptr<SwapPromise> swap_promise) override;
152 SwapPromiseManager* GetSwapPromiseManager() override; 152 SwapPromiseManager* GetSwapPromiseManager() override;
153 void SetHasGpuRasterizationTrigger(bool has_trigger) override; 153 void SetHasGpuRasterizationTrigger(bool has_trigger) override;
154 void SetVisible(bool visible) override; 154 void SetVisible(bool visible) override;
155 bool IsVisible() const override; 155 bool IsVisible() const override;
156 void SetOutputSurface(std::unique_ptr<OutputSurface> output_surface) override; 156 void SetCompositorFrameSink(
157 std::unique_ptr<OutputSurface> ReleaseOutputSurface() override; 157 std::unique_ptr<CompositorFrameSink> compositor_frame_sink) override;
158 std::unique_ptr<CompositorFrameSink> ReleaseCompositorFrameSink() override;
158 void SetNeedsAnimate() override; 159 void SetNeedsAnimate() override;
159 void SetNeedsUpdateLayers() override; 160 void SetNeedsUpdateLayers() override;
160 void SetNeedsCommit() override; 161 void SetNeedsCommit() override;
161 bool BeginMainFrameRequested() const override; 162 bool BeginMainFrameRequested() const override;
162 bool CommitRequested() const override; 163 bool CommitRequested() const override;
163 void SetDeferCommits(bool defer_commits) override; 164 void SetDeferCommits(bool defer_commits) override;
164 void LayoutAndUpdateLayers() override; 165 void LayoutAndUpdateLayers() override;
165 void Composite(base::TimeTicks frame_begin_time) override; 166 void Composite(base::TimeTicks frame_begin_time) override;
166 void SetNeedsRedraw() override; 167 void SetNeedsRedraw() override;
167 void SetNeedsRedrawRect(const gfx::Rect& damage_rect) override; 168 void SetNeedsRedrawRect(const gfx::Rect& damage_rect) override;
(...skipping 17 matching lines...) Expand all
185 // LayerTreeHost interface to Proxy. 186 // LayerTreeHost interface to Proxy.
186 void WillBeginMainFrame(); 187 void WillBeginMainFrame();
187 void DidBeginMainFrame(); 188 void DidBeginMainFrame();
188 void BeginMainFrame(const BeginFrameArgs& args); 189 void BeginMainFrame(const BeginFrameArgs& args);
189 void BeginMainFrameNotExpectedSoon(); 190 void BeginMainFrameNotExpectedSoon();
190 void AnimateLayers(base::TimeTicks monotonic_frame_begin_time); 191 void AnimateLayers(base::TimeTicks monotonic_frame_begin_time);
191 void RequestMainFrameUpdate(); 192 void RequestMainFrameUpdate();
192 void FinishCommitOnImplThread(LayerTreeHostImpl* host_impl); 193 void FinishCommitOnImplThread(LayerTreeHostImpl* host_impl);
193 void WillCommit(); 194 void WillCommit();
194 void CommitComplete(); 195 void CommitComplete();
195 void RequestNewOutputSurface(); 196 void RequestNewCompositorFrameSink();
196 void DidInitializeOutputSurface(); 197 void DidInitializeCompositorFrameSink();
197 void DidFailToInitializeOutputSurface(); 198 void DidFailToInitializeCompositorFrameSink();
198 virtual std::unique_ptr<LayerTreeHostImpl> CreateLayerTreeHostImpl( 199 virtual std::unique_ptr<LayerTreeHostImpl> CreateLayerTreeHostImpl(
199 LayerTreeHostImplClient* client); 200 LayerTreeHostImplClient* client);
200 void DidLoseOutputSurface(); 201 void DidLoseCompositorFrameSink();
201 void DidCommitAndDrawFrame() { client_->DidCommitAndDrawFrame(); } 202 void DidCommitAndDrawFrame() { client_->DidCommitAndDrawFrame(); }
202 void DidCompleteSwapBuffers() { client_->DidCompleteSwapBuffers(); } 203 void DidCompleteSwapBuffers() { client_->DidCompleteSwapBuffers(); }
203 bool UpdateLayers(); 204 bool UpdateLayers();
204 // Called when the compositor completed page scale animation. 205 // Called when the compositor completed page scale animation.
205 void DidCompletePageScaleAnimation(); 206 void DidCompletePageScaleAnimation();
206 void ApplyScrollAndScale(ScrollAndScaleSet* info); 207 void ApplyScrollAndScale(ScrollAndScaleSet* info);
207 208
208 LayerTreeHostClient* client() { return client_; } 209 LayerTreeHostClient* client() { return client_; }
209 210
210 bool gpu_rasterization_histogram_recorded() const { 211 bool gpu_rasterization_histogram_recorded() const {
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 LayerTreeHostClient* client_; 344 LayerTreeHostClient* client_;
344 std::unique_ptr<Proxy> proxy_; 345 std::unique_ptr<Proxy> proxy_;
345 std::unique_ptr<TaskRunnerProvider> task_runner_provider_; 346 std::unique_ptr<TaskRunnerProvider> task_runner_provider_;
346 347
347 int source_frame_number_; 348 int source_frame_number_;
348 std::unique_ptr<RenderingStatsInstrumentation> 349 std::unique_ptr<RenderingStatsInstrumentation>
349 rendering_stats_instrumentation_; 350 rendering_stats_instrumentation_;
350 351
351 SwapPromiseManager swap_promise_manager_; 352 SwapPromiseManager swap_promise_manager_;
352 353
353 // |current_output_surface_| can't be updated until we've successfully 354 // |current_compositor_frame_sink_| can't be updated until we've successfully
354 // initialized a new output surface. |new_output_surface_| contains the 355 // initialized a new CompositorFrameSink. |new_compositor_frame_sink_|
355 // new output surface that is currently being initialized. If initialization 356 // contains the new CompositorFrameSink that is currently being initialized.
356 // is successful then |new_output_surface_| replaces 357 // If initialization is successful then |new_compositor_frame_sink_| replaces
357 // |current_output_surface_|. 358 // |current_compositor_frame_sink_|.
358 std::unique_ptr<OutputSurface> new_output_surface_; 359 std::unique_ptr<CompositorFrameSink> new_compositor_frame_sink_;
359 std::unique_ptr<OutputSurface> current_output_surface_; 360 std::unique_ptr<CompositorFrameSink> current_compositor_frame_sink_;
360 361
361 const LayerTreeSettings settings_; 362 const LayerTreeSettings settings_;
362 LayerTreeDebugState debug_state_; 363 LayerTreeDebugState debug_state_;
363 364
364 bool visible_; 365 bool visible_;
365 366
366 bool has_gpu_rasterization_trigger_; 367 bool has_gpu_rasterization_trigger_;
367 bool content_is_suitable_for_gpu_rasterization_; 368 bool content_is_suitable_for_gpu_rasterization_;
368 bool gpu_rasterization_histogram_recorded_; 369 bool gpu_rasterization_histogram_recorded_;
369 370
(...skipping 14 matching lines...) Expand all
384 385
385 SurfaceSequenceGenerator surface_sequence_generator_; 386 SurfaceSequenceGenerator surface_sequence_generator_;
386 uint32_t num_consecutive_frames_suitable_for_gpu_ = 0; 387 uint32_t num_consecutive_frames_suitable_for_gpu_ = 0;
387 388
388 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); 389 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost);
389 }; 390 };
390 391
391 } // namespace cc 392 } // namespace cc
392 393
393 #endif // CC_TREES_LAYER_TREE_HOST_H_ 394 #endif // CC_TREES_LAYER_TREE_HOST_H_
OLDNEW
« no previous file with comments | « cc/trees/channel_main.h ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698