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

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

Issue 219963005: cc: Add support for partial swaps when using impl-side painting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: resolve cc_unittests build error Created 6 years, 7 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 | « cc/resources/tile_manager.h ('k') | cc/resources/tile_manager_perftest.cc » ('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/tile_manager.h" 5 #include "cc/resources/tile_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <string> 9 #include <string>
10 10
(...skipping 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after
1192 tile_version.set_solid_color(analysis.solid_color); 1192 tile_version.set_solid_color(analysis.solid_color);
1193 resource_pool_->ReleaseResource(resource.Pass()); 1193 resource_pool_->ReleaseResource(resource.Pass());
1194 } else { 1194 } else {
1195 tile_version.set_use_resource(); 1195 tile_version.set_use_resource();
1196 tile_version.resource_ = resource.Pass(); 1196 tile_version.resource_ = resource.Pass();
1197 1197
1198 bytes_releasable_ += BytesConsumedIfAllocated(tile); 1198 bytes_releasable_ += BytesConsumedIfAllocated(tile);
1199 ++resources_releasable_; 1199 ++resources_releasable_;
1200 } 1200 }
1201 1201
1202 client_->NotifyTileInitialized(tile);
1203
1202 FreeUnusedResourcesForTile(tile); 1204 FreeUnusedResourcesForTile(tile);
1203 if (tile->priority(ACTIVE_TREE).distance_to_visible == 0.f) 1205 if (tile->priority(ACTIVE_TREE).distance_to_visible == 0.f)
1204 did_initialize_visible_tile_ = true; 1206 did_initialize_visible_tile_ = true;
1205 } 1207 }
1206 1208
1207 scoped_refptr<Tile> TileManager::CreateTile(PicturePileImpl* picture_pile, 1209 scoped_refptr<Tile> TileManager::CreateTile(PicturePileImpl* picture_pile,
1208 const gfx::Size& tile_size, 1210 const gfx::Size& tile_size,
1209 const gfx::Rect& content_rect, 1211 const gfx::Rect& content_rect,
1210 const gfx::Rect& opaque_rect, 1212 const gfx::Rect& opaque_rect,
1211 float contents_scale, 1213 float contents_scale,
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
1624 1626
1625 if (b_priority.resolution != a_priority.resolution) { 1627 if (b_priority.resolution != a_priority.resolution) {
1626 return (prioritize_low_res && b_priority.resolution == LOW_RESOLUTION) || 1628 return (prioritize_low_res && b_priority.resolution == LOW_RESOLUTION) ||
1627 (!prioritize_low_res && b_priority.resolution == HIGH_RESOLUTION) || 1629 (!prioritize_low_res && b_priority.resolution == HIGH_RESOLUTION) ||
1628 (a_priority.resolution == NON_IDEAL_RESOLUTION); 1630 (a_priority.resolution == NON_IDEAL_RESOLUTION);
1629 } 1631 }
1630 return a_priority.IsHigherPriorityThan(b_priority); 1632 return a_priority.IsHigherPriorityThan(b_priority);
1631 } 1633 }
1632 1634
1633 } // namespace cc 1635 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/tile_manager.h ('k') | cc/resources/tile_manager_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698