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

Unified Diff: cc/blink/web_compositor_mutable_state_provider_impl.h

Issue 1447893002: compositor-worker: Introduce WebCompositorMutableState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review response. 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
Index: cc/blink/web_compositor_mutable_state_provider_impl.h
diff --git a/cc/blink/web_compositor_mutable_state_provider_impl.h b/cc/blink/web_compositor_mutable_state_provider_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..eb9d6140140190c9528f5709780935473fe3a285
--- /dev/null
+++ b/cc/blink/web_compositor_mutable_state_provider_impl.h
@@ -0,0 +1,45 @@
+// 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.
+
+#ifndef CC_BLINK_WEB_COMPOSITOR_MUTABLE_STATE_PROVIDER_IMPL_H_
+#define CC_BLINK_WEB_COMPOSITOR_MUTABLE_STATE_PROVIDER_IMPL_H_
+
+#include "base/compiler_specific.h"
+#include "base/containers/hash_tables.h"
+#include "cc/blink/cc_blink_export.h"
+
+#include "third_party/WebKit/public/platform/WebCompositorMutableStateProvider.h"
+
+namespace cc {
+class LayerTreeImpl;
+struct LayerTreeMutation;
+typedef base::hash_map<uint64_t, LayerTreeMutation> LayerTreeMutationMap;
esprehn 2016/01/06 19:48:37 why not just include the header? typedef of a comp
Ian Vollick 2016/01/08 03:01:53 Done.
+} // namespace cc
+
+namespace cc_blink {
+
+class WebCompositorMutableStateProviderImpl
+ : public blink::WebCompositorMutableStateProvider {
+ public:
+ // TODO(vollick): after slimming paint v2, this will need to operate on
+ // property trees, not the layer tree impl.
+ //
+ // The LayerTreeImpl and the LayerTreeMutationMap are both owned by caller.
+ CC_BLINK_EXPORT WebCompositorMutableStateProviderImpl(
+ cc::LayerTreeImpl* state,
+ cc::LayerTreeMutationMap* mutations);
+
+ CC_BLINK_EXPORT ~WebCompositorMutableStateProviderImpl() override;
+
+ CC_BLINK_EXPORT blink::WebPassOwnPtr<blink::WebCompositorMutableState>
+ getMutableStateFor(uint64_t element_id) override WARN_UNUSED_RESULT;
+
+ private:
+ cc::LayerTreeImpl* state_;
+ cc::LayerTreeMutationMap* mutations_;
+};
+
+} // namespace cc_blink
+
+#endif // CC_BLINK_WEB_COMPOSITOR_MUTABLE_STATE_PROVIDER_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698