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

Side by Side Diff: cc/resources/picture_layer_tiling.cc

Issue 14301021: cc: Don't pass simple well-defined classes by reference. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « cc/resources/picture_layer_tiling.h ('k') | cc/resources/picture_pile_base.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/resources/picture_layer_tiling.h" 5 #include "cc/resources/picture_layer_tiling.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 gfx::Rect tile_rect = tiling_data_.TileBoundsWithBorder(i, j); 60 gfx::Rect tile_rect = tiling_data_.TileBoundsWithBorder(i, j);
61 tile_rect.set_size(tiling_data_.max_texture_size()); 61 tile_rect.set_size(tiling_data_.max_texture_size());
62 TileMapKey key(i, j); 62 TileMapKey key(i, j);
63 DCHECK(tiles_.find(key) == tiles_.end()); 63 DCHECK(tiles_.find(key) == tiles_.end());
64 scoped_refptr<Tile> tile = client_->CreateTile(this, tile_rect); 64 scoped_refptr<Tile> tile = client_->CreateTile(this, tile_rect);
65 if (tile) 65 if (tile)
66 tiles_[key] = tile; 66 tiles_[key] = tile;
67 } 67 }
68 68
69 Region PictureLayerTiling::OpaqueRegionInContentRect( 69 Region PictureLayerTiling::OpaqueRegionInContentRect(
70 const gfx::Rect& content_rect) const { 70 gfx::Rect content_rect) const {
71 Region opaque_region; 71 Region opaque_region;
72 // TODO(enne): implement me 72 // TODO(enne): implement me
73 return opaque_region; 73 return opaque_region;
74 } 74 }
75 75
76 void PictureLayerTiling::SetLayerBounds(gfx::Size layer_bounds) { 76 void PictureLayerTiling::SetLayerBounds(gfx::Size layer_bounds) {
77 if (layer_bounds_ == layer_bounds) 77 if (layer_bounds_ == layer_bounds)
78 return; 78 return;
79 79
80 gfx::Size old_layer_bounds = layer_bounds_; 80 gfx::Size old_layer_bounds = layer_bounds_;
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 653
654 // If our delta is less then our event distance, we're done. 654 // If our delta is less then our event distance, we're done.
655 if (delta < event.distance) 655 if (delta < event.distance)
656 break; 656 break;
657 } 657 }
658 658
659 return gfx::Rect(origin_x, origin_y, width, height); 659 return gfx::Rect(origin_x, origin_y, width, height);
660 } 660 }
661 661
662 } // namespace cc 662 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/picture_layer_tiling.h ('k') | cc/resources/picture_pile_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698