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

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

Issue 17891002: cc: Reset tile priority before deleting tiling. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 6 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 | no next file » | 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 gfx::ScaleSize(layer_bounds, contents_scale)).IsEmpty()) << 49 gfx::ScaleSize(layer_bounds, contents_scale)).IsEmpty()) <<
50 "Tiling created with scale too small as contents become empty." << 50 "Tiling created with scale too small as contents become empty." <<
51 " Layer bounds: " << layer_bounds.ToString() << 51 " Layer bounds: " << layer_bounds.ToString() <<
52 " Contents scale: " << contents_scale; 52 " Contents scale: " << contents_scale;
53 53
54 tiling_data_.SetTotalSize(content_bounds); 54 tiling_data_.SetTotalSize(content_bounds);
55 tiling_data_.SetMaxTextureSize(tile_size); 55 tiling_data_.SetMaxTextureSize(tile_size);
56 } 56 }
57 57
58 PictureLayerTiling::~PictureLayerTiling() { 58 PictureLayerTiling::~PictureLayerTiling() {
59 for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it) {
60 it->second->SetPriority(ACTIVE_TREE, TilePriority());
enne (OOO) 2013/06/26 15:39:27 This tiling is only on one tree, so you shouldn't
61 it->second->SetPriority(PENDING_TREE, TilePriority());
62 }
59 } 63 }
60 64
61 void PictureLayerTiling::SetClient(PictureLayerTilingClient* client) { 65 void PictureLayerTiling::SetClient(PictureLayerTilingClient* client) {
62 client_ = client; 66 client_ = client;
63 } 67 }
64 68
65 gfx::Rect PictureLayerTiling::ContentRect() const { 69 gfx::Rect PictureLayerTiling::ContentRect() const {
66 return gfx::Rect(tiling_data_.total_size()); 70 return gfx::Rect(tiling_data_.total_size());
67 } 71 }
68 72
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 631
628 // If our delta is less then our event distance, we're done. 632 // If our delta is less then our event distance, we're done.
629 if (delta < event.distance) 633 if (delta < event.distance)
630 break; 634 break;
631 } 635 }
632 636
633 return gfx::Rect(origin_x, origin_y, width, height); 637 return gfx::Rect(origin_x, origin_y, width, height);
634 } 638 }
635 639
636 } // namespace cc 640 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698