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

Unified Diff: third_party/WebKit/Source/platform/graphics/CompositorMutableStateProvider.cpp

Issue 2890953002: [SPv1] Always set a CompositorElementId on main graphics layers; use PaintLayer id. (Closed)
Patch Set: none Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/graphics/CompositorMutableStateProvider.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/CompositorMutableStateProvider.cpp b/third_party/WebKit/Source/platform/graphics/CompositorMutableStateProvider.cpp
index c4b046ed7b2d5315d58cbea1cbe33ddfaea74c01..3c9eeab6ef7ccf23e3104f49f2be9be42f987255 100644
--- a/third_party/WebKit/Source/platform/graphics/CompositorMutableStateProvider.cpp
+++ b/third_party/WebKit/Source/platform/graphics/CompositorMutableStateProvider.cpp
@@ -7,7 +7,6 @@
#include <memory>
#include "cc/layers/layer_impl.h"
#include "cc/trees/layer_tree_impl.h"
-#include "platform/graphics/CompositorElementId.h"
#include "platform/graphics/CompositorMutableProperties.h"
#include "platform/graphics/CompositorMutableState.h"
#include "platform/graphics/CompositorMutation.h"
@@ -23,13 +22,13 @@ CompositorMutableStateProvider::CompositorMutableStateProvider(
CompositorMutableStateProvider::~CompositorMutableStateProvider() {}
std::unique_ptr<CompositorMutableState>
-CompositorMutableStateProvider::GetMutableStateFor(uint64_t element_id) {
+CompositorMutableStateProvider::GetMutableStateFor(DOMNodeId dom_node_id) {
cc::LayerImpl* main_layer =
tree_->LayerByElementId(CompositorElementIdFromDOMNodeId(
- element_id, CompositorElementIdNamespace::kPrimary));
+ dom_node_id, CompositorElementIdNamespace::kPrimaryCompositorProxy));
cc::LayerImpl* scroll_layer =
tree_->LayerByElementId(CompositorElementIdFromDOMNodeId(
- element_id, CompositorElementIdNamespace::kScroll));
+ dom_node_id, CompositorElementIdNamespace::kScrollCompositorProxy));
if (!main_layer && !scroll_layer)
return nullptr;
@@ -37,7 +36,7 @@ CompositorMutableStateProvider::GetMutableStateFor(uint64_t element_id) {
// Ensure that we have an entry in the map for |elementId| but do as few
// allocations and queries as possible. This will update the map only if we
// have not added a value for |elementId|.
- auto result = mutations_->map.insert(element_id, nullptr);
+ auto result = mutations_->map.insert(dom_node_id, nullptr);
// Only if this is a new entry do we want to allocate a new mutation.
if (result.is_new_entry)

Powered by Google App Engine
This is Rietveld 408576698