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

Side by Side Diff: cc/picture_layer.cc

Issue 11417111: cc: Add PictureLayerTilingSet to manage PictureLayerTiling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix win_rel 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/picture_layer.h ('k') | 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 13 matching lines...) Expand all
24 } 24 }
25 25
26 scoped_ptr<LayerImpl> PictureLayer::createLayerImpl() { 26 scoped_ptr<LayerImpl> PictureLayer::createLayerImpl() {
27 return PictureLayerImpl::create(id()).PassAs<LayerImpl>(); 27 return PictureLayerImpl::create(id()).PassAs<LayerImpl>();
28 } 28 }
29 29
30 void PictureLayer::pushPropertiesTo(LayerImpl* base_layer) { 30 void PictureLayer::pushPropertiesTo(LayerImpl* base_layer) {
31 PictureLayerImpl* layer_impl = static_cast<PictureLayerImpl*>(base_layer); 31 PictureLayerImpl* layer_impl = static_cast<PictureLayerImpl*>(base_layer);
32 pile_.PushPropertiesTo(layer_impl->pile_); 32 pile_.PushPropertiesTo(layer_impl->pile_);
33 33
34 // TODO(enne): Need to sync tiling from active tree prior to this? 34 // TODO(enne): Need to sync tiling from active tree prior to this.
35 // TODO(nduca): Need to invalidate tiles here from pile's invalidation info. 35 layer_impl->tilings_.Invalidate(invalidation_);
36 invalidation_.Clear();
36 } 37 }
37 38
38 void PictureLayer::setNeedsDisplayRect(const gfx::RectF& layer_rect) { 39 void PictureLayer::setNeedsDisplayRect(const gfx::RectF& layer_rect) {
39 gfx::Rect rect = gfx::ToEnclosedRect(layer_rect); 40 gfx::Rect rect = gfx::ToEnclosedRect(layer_rect);
40 pile_.Invalidate(rect); 41 invalidation_.Union(rect);
41 } 42 }
42 43
43 void PictureLayer::update(ResourceUpdateQueue&, const OcclusionTracker*, 44 void PictureLayer::update(ResourceUpdateQueue&, const OcclusionTracker*,
44 RenderingStats& stats) { 45 RenderingStats& stats) {
45 pile_.Resize(bounds()); 46 pile_.Resize(bounds());
46 pile_.Update(client_, stats); 47 pile_.Update(client_, stats);
47 } 48 }
48 49
49 } // namespace cc 50 } // namespace cc
OLDNEW
« no previous file with comments | « 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