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

Unified Diff: cc/test/fake_picture_layer_impl.cc

Issue 1944623002: CC Animation: Use ElementId to attach CC animation players. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@erasedomids
Patch Set: Let CC clients generate their own ElementIds locally. Created 4 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: cc/test/fake_picture_layer_impl.cc
diff --git a/cc/test/fake_picture_layer_impl.cc b/cc/test/fake_picture_layer_impl.cc
index 65297112fba8523cf1e11f2f2ed636b4a721272e..b977b90a1917aec6de92d9d1a98b33df72c79bf8 100644
--- a/cc/test/fake_picture_layer_impl.cc
+++ b/cc/test/fake_picture_layer_impl.cc
@@ -9,6 +9,7 @@
#include <vector>
#include "base/memory/ptr_util.h"
+#include "cc/test/test_element_id.h"
#include "cc/tiles/tile.h"
#include "cc/trees/layer_tree_impl.h"
@@ -25,6 +26,7 @@ FakePictureLayerImpl::FakePictureLayerImpl(
has_valid_tile_priorities_(false),
use_set_valid_tile_priorities_flag_(false),
release_resources_count_(0) {
+ SetElementId(NextTestElementId());
SetBounds(raster_source->GetSize());
SetRasterSourceOnPending(raster_source, Region());
}
@@ -41,6 +43,7 @@ FakePictureLayerImpl::FakePictureLayerImpl(
has_valid_tile_priorities_(false),
use_set_valid_tile_priorities_flag_(false),
release_resources_count_(0) {
+ SetElementId(NextTestElementId());
SetBounds(layer_bounds);
SetRasterSourceOnPending(raster_source, Region());
}
@@ -53,7 +56,9 @@ FakePictureLayerImpl::FakePictureLayerImpl(LayerTreeImpl* tree_impl,
did_become_active_call_count_(0),
has_valid_tile_priorities_(false),
use_set_valid_tile_priorities_flag_(false),
- release_resources_count_(0) {}
+ release_resources_count_(0) {
+ SetElementId(NextTestElementId());
+}
std::unique_ptr<LayerImpl> FakePictureLayerImpl::CreateLayerImpl(
LayerTreeImpl* tree_impl) {

Powered by Google App Engine
This is Rietveld 408576698