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

Side by Side Diff: cc/layers/picture_layer_impl.cc

Issue 13665003: cc: Moved contents_swizzled out of TileManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed unittest compile Created 7 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | cc/resources/managed_tile_state.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/layers/picture_layer_impl.h" 5 #include "cc/layers/picture_layer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "cc/base/math_util.h" 10 #include "cc/base/math_util.h"
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 352
353 scoped_refptr<Tile> PictureLayerImpl::CreateTile(PictureLayerTiling* tiling, 353 scoped_refptr<Tile> PictureLayerImpl::CreateTile(PictureLayerTiling* tiling,
354 gfx::Rect content_rect) { 354 gfx::Rect content_rect) {
355 if (!pile_->CanRaster(tiling->contents_scale(), content_rect)) 355 if (!pile_->CanRaster(tiling->contents_scale(), content_rect))
356 return scoped_refptr<Tile>(); 356 return scoped_refptr<Tile>();
357 357
358 return make_scoped_refptr(new Tile( 358 return make_scoped_refptr(new Tile(
359 layer_tree_impl()->tile_manager(), 359 layer_tree_impl()->tile_manager(),
360 pile_.get(), 360 pile_.get(),
361 content_rect.size(), 361 content_rect.size(),
362 GL_RGBA,
363 content_rect, 362 content_rect,
364 contents_opaque() ? content_rect : gfx::Rect(), 363 contents_opaque() ? content_rect : gfx::Rect(),
365 tiling->contents_scale(), 364 tiling->contents_scale(),
366 id())); 365 id()));
367 } 366 }
368 367
369 void PictureLayerImpl::UpdatePile(Tile* tile) { 368 void PictureLayerImpl::UpdatePile(Tile* tile) {
370 tile->set_picture_pile(pile_); 369 tile->set_picture_pile(pile_);
371 } 370 }
372 371
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 scoped_ptr<base::Value> PictureLayerImpl::AsValue() const { 876 scoped_ptr<base::Value> PictureLayerImpl::AsValue() const {
878 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); 877 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue());
879 LayerImpl::AsValueInto(state.get()); 878 LayerImpl::AsValueInto(state.get());
880 879
881 state->SetDouble("ideal_contents_scale", ideal_contents_scale_); 880 state->SetDouble("ideal_contents_scale", ideal_contents_scale_);
882 state->Set("tilings", tilings_->AsValue().release()); 881 state->Set("tilings", tilings_->AsValue().release());
883 return state.PassAs<base::Value>(); 882 return state.PassAs<base::Value>();
884 } 883 }
885 884
886 } // namespace cc 885 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/resources/managed_tile_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698