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

Side by Side Diff: cc/picture_layer.cc

Issue 11516022: cc: Resize picture layer tiling set during commit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | cc/picture_layer_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/picture_layer.h" 5 #include "cc/picture_layer.h"
6 #include "cc/picture_layer_impl.h" 6 #include "cc/picture_layer_impl.h"
7 #include "ui/gfx/rect_conversions.h" 7 #include "ui/gfx/rect_conversions.h"
8 8
9 namespace cc { 9 namespace cc {
10 10
(...skipping 12 matching lines...) Expand all
23 return Layer::drawsContent() && client_; 23 return Layer::drawsContent() && client_;
24 } 24 }
25 25
26 scoped_ptr<LayerImpl> PictureLayer::createLayerImpl(LayerTreeHostImpl* host) { 26 scoped_ptr<LayerImpl> PictureLayer::createLayerImpl(LayerTreeHostImpl* host) {
27 return PictureLayerImpl::create(host, id()).PassAs<LayerImpl>(); 27 return PictureLayerImpl::create(host, id()).PassAs<LayerImpl>();
28 } 28 }
29 29
30 void PictureLayer::pushPropertiesTo(LayerImpl* base_layer) { 30 void PictureLayer::pushPropertiesTo(LayerImpl* base_layer) {
31 Layer::pushPropertiesTo(base_layer); 31 Layer::pushPropertiesTo(base_layer);
32 PictureLayerImpl* layer_impl = static_cast<PictureLayerImpl*>(base_layer); 32 PictureLayerImpl* layer_impl = static_cast<PictureLayerImpl*>(base_layer);
33 layer_impl->didUpdateBounds();
33 pile_.PushPropertiesTo(layer_impl->pile_); 34 pile_.PushPropertiesTo(layer_impl->pile_);
34 35
35 // TODO(enne): Once we have two trees on the impl side, we need to 36 // TODO(enne): Once we have two trees on the impl side, we need to
36 // sync the active layer's tiles prior to this Invalidate call since it 37 // sync the active layer's tiles prior to this Invalidate call since it
37 // will make new tiles for anything intersecting the invalidation. 38 // will make new tiles for anything intersecting the invalidation.
38 layer_impl->tilings_.Invalidate(pile_invalidation_); 39 layer_impl->tilings_.Invalidate(pile_invalidation_);
39 pile_invalidation_.Clear(); 40 pile_invalidation_.Clear();
40 } 41 }
41 42
42 void PictureLayer::setNeedsDisplayRect(const gfx::RectF& layer_rect) { 43 void PictureLayer::setNeedsDisplayRect(const gfx::RectF& layer_rect) {
(...skipping 11 matching lines...) Expand all
54 55
55 // Calling paint in WebKit can sometimes cause invalidations, so save 56 // Calling paint in WebKit can sometimes cause invalidations, so save
56 // off the invalidation prior to calling update. 57 // off the invalidation prior to calling update.
57 pile_invalidation_.Swap(pending_invalidation_); 58 pile_invalidation_.Swap(pending_invalidation_);
58 pending_invalidation_.Clear(); 59 pending_invalidation_.Clear();
59 60
60 pile_.Update(client_, pile_invalidation_, stats); 61 pile_.Update(client_, pile_invalidation_, stats);
61 } 62 }
62 63
63 } // namespace cc 64 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/picture_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698