Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / cc / resources / picture_pile_base.h
index 102d798..1067c3e 100644 (file)
@@ -30,7 +30,6 @@ class CC_EXPORT PicturePileBase : public base::RefCounted<PicturePileBase> {
  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<PicturePileBase> {
   // 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<PicturePileBase> {
 
     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();
@@ -85,7 +89,7 @@ class CC_EXPORT PicturePileBase : public base::RefCounted<PicturePileBase> {
     float GetInvalidationFrequency() const;
 
     int last_frame_number_;
-    scoped_refptr<Picture> picture_;
+    scoped_refptr<const Picture> picture_;
     std::bitset<INVALIDATION_FRAMES_TRACKED> invalidation_history_;
   };
 
@@ -97,8 +101,8 @@ class CC_EXPORT PicturePileBase : public base::RefCounted<PicturePileBase> {
   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<PicturePileBase> {
   // 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);