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

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

Issue 666163006: Allow layers to signal that additional sequences are needed before surface destruction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 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 <limits> 8 #include <limits>
9 #include <list> 9 #include <list>
10 #include <set> 10 #include <set>
(...skipping 16 matching lines...) Expand all
27 #include "cc/debug/micro_benchmark.h" 27 #include "cc/debug/micro_benchmark.h"
28 #include "cc/debug/micro_benchmark_controller.h" 28 #include "cc/debug/micro_benchmark_controller.h"
29 #include "cc/input/input_handler.h" 29 #include "cc/input/input_handler.h"
30 #include "cc/input/layer_selection_bound.h" 30 #include "cc/input/layer_selection_bound.h"
31 #include "cc/input/scrollbar.h" 31 #include "cc/input/scrollbar.h"
32 #include "cc/input/top_controls_state.h" 32 #include "cc/input/top_controls_state.h"
33 #include "cc/layers/layer_lists.h" 33 #include "cc/layers/layer_lists.h"
34 #include "cc/output/output_surface.h" 34 #include "cc/output/output_surface.h"
35 #include "cc/resources/resource_format.h" 35 #include "cc/resources/resource_format.h"
36 #include "cc/resources/scoped_ui_resource.h" 36 #include "cc/resources/scoped_ui_resource.h"
37 #include "cc/surfaces/surface_sequence.h"
37 #include "cc/trees/layer_tree_host_client.h" 38 #include "cc/trees/layer_tree_host_client.h"
38 #include "cc/trees/layer_tree_host_common.h" 39 #include "cc/trees/layer_tree_host_common.h"
39 #include "cc/trees/layer_tree_settings.h" 40 #include "cc/trees/layer_tree_settings.h"
40 #include "cc/trees/proxy.h" 41 #include "cc/trees/proxy.h"
41 #include "third_party/skia/include/core/SkColor.h" 42 #include "third_party/skia/include/core/SkColor.h"
42 #include "ui/gfx/geometry/rect.h" 43 #include "ui/gfx/geometry/rect.h"
43 44
44 namespace cc { 45 namespace cc {
45 class AnimationRegistrar; 46 class AnimationRegistrar;
46 class GpuMemoryBufferManager; 47 class GpuMemoryBufferManager;
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 void RemoveSwapPromiseMonitor(SwapPromiseMonitor* monitor); 298 void RemoveSwapPromiseMonitor(SwapPromiseMonitor* monitor);
298 299
299 // Call this function when you expect there to be a swap buffer. 300 // Call this function when you expect there to be a swap buffer.
300 // See swap_promise.h for how to use SwapPromise. 301 // See swap_promise.h for how to use SwapPromise.
301 void QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise); 302 void QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise);
302 303
303 void BreakSwapPromises(SwapPromise::DidNotSwapReason reason); 304 void BreakSwapPromises(SwapPromise::DidNotSwapReason reason);
304 305
305 size_t num_queued_swap_promises() const { return swap_promise_list_.size(); } 306 size_t num_queued_swap_promises() const { return swap_promise_list_.size(); }
306 307
308 void set_surface_id_namespace(uint32_t id_namespace);
309 SurfaceSequence CreateSurfaceSequence();
310
307 protected: 311 protected:
308 LayerTreeHost(LayerTreeHostClient* client, 312 LayerTreeHost(LayerTreeHostClient* client,
309 SharedBitmapManager* shared_bitmap_manager, 313 SharedBitmapManager* shared_bitmap_manager,
310 GpuMemoryBufferManager* gpu_memory_buffer_manager, 314 GpuMemoryBufferManager* gpu_memory_buffer_manager,
311 const LayerTreeSettings& settings); 315 const LayerTreeSettings& settings);
312 void InitializeThreaded( 316 void InitializeThreaded(
313 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 317 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
314 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); 318 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner);
315 void InitializeSingleThreaded( 319 void InitializeSingleThreaded(
316 LayerTreeHostSingleThreadClient* single_thread_client, 320 LayerTreeHostSingleThreadClient* single_thread_client,
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 458
455 LayerSelectionBound selection_start_; 459 LayerSelectionBound selection_start_;
456 LayerSelectionBound selection_end_; 460 LayerSelectionBound selection_end_;
457 461
458 SharedBitmapManager* shared_bitmap_manager_; 462 SharedBitmapManager* shared_bitmap_manager_;
459 GpuMemoryBufferManager* gpu_memory_buffer_manager_; 463 GpuMemoryBufferManager* gpu_memory_buffer_manager_;
460 464
461 ScopedPtrVector<SwapPromise> swap_promise_list_; 465 ScopedPtrVector<SwapPromise> swap_promise_list_;
462 std::set<SwapPromiseMonitor*> swap_promise_monitor_; 466 std::set<SwapPromiseMonitor*> swap_promise_monitor_;
463 467
468 uint32_t surface_id_namespace_;
469 uint32_t next_surface_sequence_;
470
464 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); 471 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost);
465 }; 472 };
466 473
467 } // namespace cc 474 } // namespace cc
468 475
469 #endif // CC_TREES_LAYER_TREE_HOST_H_ 476 #endif // CC_TREES_LAYER_TREE_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698