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

Unified Diff: cc/test/fake_picture_layer.h

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.h
diff --git a/cc/test/fake_picture_layer.h b/cc/test/fake_picture_layer.h
index 038e97543d9ad206f0750f812363b93bf481d5f8..75089eaf5eb4cc6d4a67a18c050e93626938b635 100644
--- a/cc/test/fake_picture_layer.h
+++ b/cc/test/fake_picture_layer.h
@@ -12,18 +12,24 @@
#include "base/memory/ref_counted.h"
#include "cc/layers/picture_layer.h"
#include "cc/playback/recording_source.h"
+#include "cc/test/test_element_id.h"
namespace cc {
class FakePictureLayer : public PictureLayer {
public:
static scoped_refptr<FakePictureLayer> Create(ContentLayerClient* client) {
- return make_scoped_refptr(new FakePictureLayer(client));
+ auto layer = make_scoped_refptr(new FakePictureLayer(client));
+ layer->SetElementId(NextTestElementId());
+ return layer;
}
static scoped_refptr<FakePictureLayer> CreateWithRecordingSource(
ContentLayerClient* client,
std::unique_ptr<RecordingSource> source) {
- return make_scoped_refptr(new FakePictureLayer(client, std::move(source)));
+ auto layer =
+ make_scoped_refptr(new FakePictureLayer(client, std::move(source)));
+ layer->SetElementId(NextTestElementId());
+ return layer;
}
std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;

Powered by Google App Engine
This is Rietveld 408576698