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

Unified Diff: cc/picture_layer.cc

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_layer.cc
diff --git a/cc/picture_layer.cc b/cc/picture_layer.cc
index ff69a2c886953671125a9a9102aa7c07ff9c72ca..1b79a3e79c83343765b0c5af0ad9687acaef91ff 100644
--- a/cc/picture_layer.cc
+++ b/cc/picture_layer.cc
@@ -6,6 +6,7 @@
#include "cc/picture_layer.h"
#include "cc/picture_layer_impl.h"
+#include "ui/gfx/rect_conversions.h"
namespace cc {
@@ -28,9 +29,22 @@ scoped_ptr<LayerImpl> PictureLayer::createLayerImpl() {
return PictureLayerImpl::create(id()).PassAs<LayerImpl>();
}
-void PictureLayer::pushPropertiesTo(LayerImpl* baseLayerImpl) {
- PictureLayerImpl* layerImpl = static_cast<PictureLayerImpl*>(baseLayerImpl);
- pile_.pushPropertiesTo(layerImpl->pile_);
+void PictureLayer::pushPropertiesTo(LayerImpl* base_layer) {
+ PictureLayerImpl* layer_impl = static_cast<PictureLayerImpl*>(base_layer);
+ pile_.PushPropertiesTo(layer_impl->pile_);
+
+ // TODO(nduca): Need to invalidate tiles here from pile's invalidation info.
+}
+
+void PictureLayer::setNeedsDisplayRect(const gfx::RectF& layer_rect) {
+ gfx::Rect rect = gfx::ToEnclosedRect(layer_rect);
+ pile_.Invalidate(rect);
+}
+
+void PictureLayer::update(ResourceUpdateQueue&, const OcclusionTracker*,
+ RenderingStats& stats) {
+ pile_.Resize(bounds());
+ pile_.Update(client_, stats);
}
} // namespace cc
« cc/picture.cc ('K') | « cc/picture_layer.h ('k') | cc/picture_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698