diff options
Diffstat (limited to 'cc/resources/picture_pile_base.h')
-rw-r--r-- | cc/resources/picture_pile_base.h | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/cc/resources/picture_pile_base.h b/cc/resources/picture_pile_base.h index 71e5bad185..66d37d81b8 100644 --- a/cc/resources/picture_pile_base.h +++ b/cc/resources/picture_pile_base.h @@ -42,16 +42,11 @@ class CC_EXPORT PicturePileBase { int num_tiles_y() const { return tiling_.num_tiles_y(); } gfx::Rect tile_bounds(int x, int y) const { return tiling_.TileBounds(x, y); } bool HasRecordingAt(int x, int y); - bool CanRaster(float contents_scale, const gfx::Rect& content_rect) const; - - // If this pile contains any valid recordings. May have false positives. - bool HasRecordings() const { return has_any_recordings_; } bool is_solid_color() const { return is_solid_color_; } SkColor solid_color() const { return solid_color_; } void set_is_mask(bool is_mask) { is_mask_ = is_mask; } - bool is_mask() const { return is_mask_; } static void ComputeTileGridInfo(const gfx::Size& tile_grid_size, SkTileGridFactory::TileGridInfo* info); @@ -59,12 +54,17 @@ class CC_EXPORT PicturePileBase { void SetTileGridSize(const gfx::Size& tile_grid_size); TilingData& tiling() { return tiling_; } - void AsValueInto(base::debug::TracedValue* array) const; - SkTileGridFactory::TileGridInfo GetTileGridInfoForTesting() const { return tile_grid_info_; } + void SetRecordedViewportForTesting(const gfx::Rect& viewport) { + recorded_viewport_ = viewport; + } + void SetHasAnyRecordingsForTesting(bool has_recordings) { + has_any_recordings_ = has_recordings; + } + protected: class CC_EXPORT PictureInfo { public: @@ -104,10 +104,6 @@ class CC_EXPORT PicturePileBase { gfx::Rect PaddedRect(const PictureMapKey& key) const; gfx::Rect PadRect(const gfx::Rect& rect) const; - // An internal CanRaster check that goes to the picture_map rather than - // using the recorded_viewport hint. - bool CanRasterSlowTileCheck(const gfx::Rect& layer_rect) const; - // A picture pile is a tiled set of pictures. The picture map is a map of tile // indices to picture infos. PictureMap picture_map_; @@ -129,6 +125,8 @@ class CC_EXPORT PicturePileBase { SkColor solid_color_; private: + friend class PicturePileImpl; + void SetBufferPixels(int buffer_pixels); DISALLOW_COPY_AND_ASSIGN(PicturePileBase); |