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

Unified Diff: cc/layers/picture_layer_impl.cc

Issue 12865017: Makes tile-creation lazy (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 months 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/layers/picture_layer_impl.cc
diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
index fd4a85ae1caa3b84baf979acd5d26efc89d90fb5..cb986fef900ab06e5d933c08a28d81c67566b888 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -81,7 +81,6 @@ void PictureLayerImpl::PushPropertiesTo(LayerImpl* base_layer) {
layer_impl->raster_source_scale_ = raster_source_scale_;
}
-
void PictureLayerImpl::AppendQuads(QuadSink* quadSink,
AppendQuadsData* appendQuadsData) {
const gfx::Rect& rect = visible_content_rect();
@@ -320,7 +319,8 @@ skia::RefPtr<SkPicture> PictureLayerImpl::GetPicture() {
}
scoped_refptr<Tile> PictureLayerImpl::CreateTile(PictureLayerTiling* tiling,
- gfx::Rect content_rect) {
+ const gfx::Rect& content_rect,
enne (OOO) 2013/03/27 16:16:27 No. Please stay consistent with passing rect by v
whunt 2013/03/27 17:42:02 I'll switch it back but the policy needs to be cha
enne (OOO) 2013/03/27 18:03:20 I'm aware of your doc. This is outside the scope
+ const gfx::Rect& paint_rect) {
if (!pile_->CanRaster(tiling->contents_scale(), content_rect))
return scoped_refptr<Tile>();
@@ -330,6 +330,7 @@ scoped_refptr<Tile> PictureLayerImpl::CreateTile(PictureLayerTiling* tiling,
content_rect.size(),
GL_RGBA,
content_rect,
+ paint_rect,
contents_opaque() ? content_rect : gfx::Rect(),
tiling->contents_scale(),
id()));
@@ -339,6 +340,24 @@ void PictureLayerImpl::UpdatePile(Tile* tile) {
tile->set_picture_pile(pile_);
}
+const Region* PictureLayerImpl::GetInvalidation() {
+ return &invalidation_;
+}
+
+const PictureLayerTiling* PictureLayerImpl::GetSibling(
+ const PictureLayerTiling* tiling) {
+
+ const PictureLayerImpl* other_layer = layer_tree_impl()->IsActiveTree() ?
+ PendingTwin() : ActiveTwin();
+ if (!other_layer)
+ return NULL;
+ for (size_t i = 0; i < other_layer->tilings_->num_tilings(); ++i)
+ if (other_layer->tilings_->tiling_at(i)->contents_scale() ==
+ tiling->contents_scale())
+ return other_layer->tilings_->tiling_at(i);
+ return NULL;
+}
+
gfx::Size PictureLayerImpl::CalculateTileSize(
gfx::Size current_tile_size,
gfx::Size content_bounds) {

Powered by Google App Engine
This is Rietveld 408576698