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

Unified Diff: cc/picture_pile.h

Issue 11293188: cc: Make Picture/PicturePile handle recording/raster (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix android_dbg Created 8 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
Index: cc/picture_pile.h
diff --git a/cc/picture_pile.h b/cc/picture_pile.h
index 5d5397430908fb291babfecff92766cdba7ed154..13a0b43cfd5922b684abeada8733a0057b8abd83 100644
--- a/cc/picture_pile.h
+++ b/cc/picture_pile.h
@@ -8,12 +8,15 @@
#include "base/basictypes.h"
#include "cc/cc_export.h"
#include "cc/picture.h"
+#include "cc/region.h"
#include "cc/scoped_ptr_vector.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/size.h"
namespace cc {
+struct RenderingStats;
+
class CC_EXPORT PicturePile {
public:
PicturePile();
@@ -21,27 +24,32 @@ public:
// Mark a portion of the PicturePile as invalid and needing to be re-recorded
// the next time update is called.
- void invalidate(gfx::Rect);
+ void Invalidate(gfx::Rect);
// Resize the PicturePile, invalidating / dropping recorded pictures as necessary.
- void resize(gfx::Size);
+ void Resize(gfx::Size);
- // Rerecord parts of the picture that are invalid.
- void update(ContentLayerClient* painter);
+ // Re-record parts of the picture that are invalid.
+ void Update(ContentLayerClient* painter, RenderingStats&);
// Update other with a shallow copy of this (main => compositor thread commit)
- void pushPropertiesTo(PicturePile& other);
+ void PushPropertiesTo(PicturePile& other);
// Clone a paint-safe version of this picture (with cloned PicturePileRecords)
- scoped_ptr<PicturePile> cloneForDrawing(gfx::Rect rect);
+ scoped_ptr<PicturePile> CloneForDrawing();
// Raster a subrect of this PicturePile into the given canvas.
// It's only safe to call paint on a cloned version.
- void paint(SkCanvas* canvas, gfx::Rect rect);
+ // It is assumed that contentsScale has already been applied to this canvas.
+ void Raster(SkCanvas* canvas, gfx::Rect rect);
+
+private:
+ void CopyAllButPile(PicturePile& from, PicturePile& to);
-protected:
std::vector<scoped_refptr<Picture> > pile_;
gfx::Size size_;
+ Region invalidation_;
+ Region prev_invalidation_;
DISALLOW_COPY_AND_ASSIGN(PicturePile);
};
« cc/picture.cc ('K') | « cc/picture_layer_impl.cc ('k') | cc/picture_pile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698