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

Unified Diff: cc/blink/web_compositor_mutable_state_provider_impl.cc

Issue 1547893003: WIP - compositor worker mega patch. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/blink/web_compositor_mutable_state_provider_impl.h ('k') | cc/blink/web_compositor_support_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/blink/web_compositor_mutable_state_provider_impl.cc
diff --git a/cc/blink/web_compositor_mutable_state_provider_impl.cc b/cc/blink/web_compositor_mutable_state_provider_impl.cc
new file mode 100644
index 0000000000000000000000000000000000000000..c6e898db3cfd1cae5f9ff40e3592a3978cdafa0c
--- /dev/null
+++ b/cc/blink/web_compositor_mutable_state_provider_impl.cc
@@ -0,0 +1,33 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "cc/blink/web_compositor_mutable_state_provider_impl.h"
+
+#include "cc/animation/layer_tree_mutation.h"
+#include "cc/blink/web_compositor_mutable_state_impl.h"
+#include "cc/layers/layer_impl.h"
+#include "cc/trees/layer_tree_impl.h"
+
+namespace cc_blink {
+
+WebCompositorMutableStateProviderImpl::WebCompositorMutableStateProviderImpl(
+ cc::LayerTreeImpl* state,
+ cc::LayerTreeMutationMap* mutations)
+ : state_(state), mutations_(mutations) {}
+
+WebCompositorMutableStateProviderImpl::
+ ~WebCompositorMutableStateProviderImpl() {}
+
+blink::WebCompositorMutableState*
+WebCompositorMutableStateProviderImpl::getCompositorMutableStateFor(
+ uint64_t element_id) {
+ cc::LayerTreeImpl::ElementLayers layers;
+ if (!state_->GetMutableLayers(element_id, &layers))
+ return nullptr;
+
+ return new WebCompositorMutableStateImpl(&(*mutations_)[element_id],
+ layers.main, layers.scroll);
+}
+
+} // namespace cc_blink
« no previous file with comments | « cc/blink/web_compositor_mutable_state_provider_impl.h ('k') | cc/blink/web_compositor_support_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698