X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fcc%2Fresources%2Fpicture_pile_base.h;h=1067c3ec36f88b3dd5b725d6dee53dd719b6b8ff;hb=3545e9f2671f595d2a2f3ee75ca0393b01e35ef6;hp=102d798a2a8d6234716d4c25c8ab6fe7bb812e52;hpb=7d210d4c7e9ba36e635eabc5b5780495f8a63292;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/cc/resources/picture_pile_base.h b/src/cc/resources/picture_pile_base.h index 102d798..1067c3e 100644 --- a/src/cc/resources/picture_pile_base.h +++ b/src/cc/resources/picture_pile_base.h @@ -30,7 +30,6 @@ class CC_EXPORT PicturePileBase : public base::RefCounted { 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); @@ -49,6 +48,12 @@ class CC_EXPORT PicturePileBase : public base::RefCounted { // 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_; } @@ -72,9 +77,8 @@ class CC_EXPORT PicturePileBase : public base::RefCounted { 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* GetPicture() const; + const Picture* GetPicture() const; float GetInvalidationFrequencyForTesting() const { return GetInvalidationFrequency(); @@ -85,7 +89,7 @@ class CC_EXPORT PicturePileBase : public base::RefCounted { float GetInvalidationFrequency() const; int last_frame_number_; - scoped_refptr picture_; + scoped_refptr picture_; std::bitset invalidation_history_; }; @@ -97,8 +101,8 @@ class CC_EXPORT PicturePileBase : public base::RefCounted { 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. @@ -120,7 +124,10 @@ class CC_EXPORT PicturePileBase : public base::RefCounted { // 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);