public:
PicturePileBase();
explicit PicturePileBase(const PicturePileBase* other);
- PicturePileBase(const PicturePileBase* other, unsigned thread_index);
gfx::Size tiling_size() const { return tiling_.tiling_size(); }
void SetMinContentsScale(float min_contents_scale);
// If this pile contains any valid recordings. May have false positives.
bool HasRecordings() const { return has_any_recordings_; }
+ // If this pile has ever contained any recordings with text.
+ bool has_text() const { return has_text_; }
+
+ 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_; }
bool Invalidate(int frame_number);
bool NeedsRecording(int frame_number, int distance_to_visible);
- PictureInfo CloneForThread(int thread_index) const;
void SetPicture(scoped_refptr<Picture> picture);
- Picture* GetPicture() const;
+ const Picture* GetPicture() const;
float GetInvalidationFrequencyForTesting() const {
return GetInvalidationFrequency();
float GetInvalidationFrequency() const;
int last_frame_number_;
- scoped_refptr<Picture> picture_;
+ scoped_refptr<const Picture> picture_;
std::bitset<INVALIDATION_FRAMES_TRACKED> invalidation_history_;
};
int buffer_pixels() const { return tiling_.border_texels(); }
void Clear();
- gfx::Rect PaddedRect(const PictureMapKey& key);
- gfx::Rect PadRect(const gfx::Rect& rect);
+ 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.
// A hint about whether there are any recordings. This may be a false
// positive.
bool has_any_recordings_;
+ bool has_text_;
bool is_mask_;
+ bool is_solid_color_;
+ SkColor solid_color_;
private:
void SetBufferPixels(int buffer_pixels);