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

Unified Diff: cc/test/fake_picture_pile.h

Issue 732423002: Update from chromium https://crrev.com/304586 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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
« no previous file with comments | « cc/test/fake_picture_layer_tiling_client.cc ('k') | cc/test/fake_picture_pile.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/fake_picture_pile.h
diff --git a/cc/test/fake_picture_pile.h b/cc/test/fake_picture_pile.h
index e486e3b4cd37c63fb53bc38c13f6c9ababb83622..4a7b65b86b343a4620721620c489f46789c13565 100644
--- a/cc/test/fake_picture_pile.h
+++ b/cc/test/fake_picture_pile.h
@@ -7,15 +7,29 @@
#include "cc/resources/picture_pile.h"
+namespace base {
+class WaitableEvent;
+}
+
namespace cc {
class FakePicturePile : public PicturePile {
public:
+ using PictureInfo = PicturePile::PictureInfo;
+ using PictureMapKey = PicturePile::PictureMapKey;
+ using PictureMap = PicturePile::PictureMap;
+
+ FakePicturePile() : playback_allowed_event_(nullptr) {}
~FakePicturePile() override {}
+ // PicturePile overrides.
+ scoped_refptr<RasterSource> CreateRasterSource() const override;
+
using PicturePile::buffer_pixels;
using PicturePile::CanRasterSlowTileCheck;
using PicturePile::Clear;
+ using PicturePile::SetMinContentsScale;
+ using PicturePile::SetTileGridSize;
PictureMap& picture_map() { return picture_map_; }
const gfx::Rect& recorded_viewport() const { return recorded_viewport_; }
@@ -37,6 +51,10 @@ class FakePicturePile : public PicturePile {
has_any_recordings_ = has_recordings;
}
+ void SetPlaybackAllowedEvent(base::WaitableEvent* event) {
+ playback_allowed_event_ = event;
+ }
+
TilingData& tiling() { return tiling_; }
bool is_solid_color() const { return is_solid_color_; }
@@ -44,10 +62,10 @@ class FakePicturePile : public PicturePile {
void SetPixelRecordDistance(int d) { pixel_record_distance_ = d; }
- typedef PicturePile::PictureInfo PictureInfo;
- typedef PicturePile::PictureMapKey PictureMapKey;
- typedef PicturePile::PictureMap PictureMap;
+ private:
+ base::WaitableEvent* playback_allowed_event_;
};
+
} // namespace cc
#endif // CC_TEST_FAKE_PICTURE_PILE_H_
« no previous file with comments | « cc/test/fake_picture_layer_tiling_client.cc ('k') | cc/test/fake_picture_pile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698