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

Unified Diff: cc/trees/layer_tree_host.cc

Issue 706203003: Update from https://crrev.com/303153 (Closed) Base URL: git@github.com:domokit/mojo.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index 3898156776037a9420ffc8a9909eda0a49f3bcc9..af7eb5bc96e62fe8692b3f459714d06c7017088d 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -128,7 +128,9 @@ LayerTreeHost::LayerTreeHost(
id_(s_layer_tree_host_sequence_number.GetNext() + 1),
next_commit_forces_redraw_(false),
shared_bitmap_manager_(shared_bitmap_manager),
- gpu_memory_buffer_manager_(gpu_memory_buffer_manager) {
+ gpu_memory_buffer_manager_(gpu_memory_buffer_manager),
+ surface_id_namespace_(0u),
+ next_surface_sequence_(1u) {
if (settings_.accelerated_animation_enabled)
animation_registrar_ = AnimationRegistrar::Create();
rendering_stats_instrumentation_->set_record_rendering_stats(
@@ -167,15 +169,15 @@ void LayerTreeHost::InitializeProxy(scoped_ptr<Proxy> proxy) {
LayerTreeHost::~LayerTreeHost() {
TRACE_EVENT0("cc", "LayerTreeHost::~LayerTreeHost");
- DCHECK(swap_promise_monitor_.empty());
-
- BreakSwapPromises(SwapPromise::COMMIT_FAILS);
-
overhang_ui_resource_ = nullptr;
if (root_layer_.get())
root_layer_->SetLayerTreeHost(NULL);
+ DCHECK(swap_promise_monitor_.empty());
+
+ BreakSwapPromises(SwapPromise::COMMIT_FAILS);
+
if (proxy_) {
DCHECK(proxy_->IsMainThread());
proxy_->Stop();
@@ -1336,4 +1338,12 @@ void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) {
swap_promise_list_.clear();
}
+void LayerTreeHost::set_surface_id_namespace(uint32_t id_namespace) {
+ surface_id_namespace_ = id_namespace;
+}
+
+SurfaceSequence LayerTreeHost::CreateSurfaceSequence() {
+ return SurfaceSequence(surface_id_namespace_, next_surface_sequence_++);
+}
+
} // namespace cc
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698