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

Unified Diff: cc/test/fake_picture_layer.cc

Issue 671653005: SetNeedsRedraw directly when updating a visible tile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pinchblurmerge-test: tweak Created 6 years, 1 month 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.cc
diff --git a/cc/test/fake_picture_layer.cc b/cc/test/fake_picture_layer.cc
index bd169ba770b4199d617af4372488ec41b5673303..51fcf26a43479138b251c8581d5d24c9165c57ad 100644
--- a/cc/test/fake_picture_layer.cc
+++ b/cc/test/fake_picture_layer.cc
@@ -4,6 +4,7 @@
#include "cc/test/fake_picture_layer.h"
+#include "cc/test/delayed_raster_picture_pile_impl.h"
#include "cc/test/fake_picture_layer_impl.h"
namespace cc {
@@ -12,8 +13,9 @@ FakePictureLayer::FakePictureLayer(ContentLayerClient* client)
: PictureLayer(client),
update_count_(0),
push_properties_count_(0),
+ output_surface_created_count_(0),
always_update_resources_(false),
- output_surface_created_count_(0) {
+ delayed_raster_trigger_(nullptr) {
SetBounds(gfx::Size(1, 1));
SetIsDrawable(true);
}
@@ -42,4 +44,11 @@ void FakePictureLayer::OnOutputSurfaceCreated() {
output_surface_created_count_++;
}
+scoped_refptr<PicturePileImpl> FakePictureLayer::CreatePicturePileImpl() {
+ if (!delayed_raster_trigger_)
+ return PictureLayer::CreatePicturePileImpl();
+ return DelayedRasterPicturePileImpl::CreateFromOther(
+ GetPicturePileForTesting(), delayed_raster_trigger_);
reveman 2014/11/10 23:43:02 note: if you end up reusing FakePicturePileImpl th
danakj 2014/11/12 20:19:40 I added a constructor to FakePictureLayer to overr
+}
+
} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698