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

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

Issue 14061028: cc: Set tile manager memory policy in initializeRenderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Explicit set to USING_RELEASABLE_MEMORY Created 7 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 | Annotate | Revision Log
« no previous file with comments | « cc/base/worker_pool.cc ('k') | cc/trees/layer_tree_host_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/resources/tile_manager.h" 5 #include "cc/resources/tile_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 354
355 void TileManager::AbortPendingTileUploads() { 355 void TileManager::AbortPendingTileUploads() {
356 while (!tiles_with_pending_upload_.empty()) { 356 while (!tiles_with_pending_upload_.empty()) {
357 Tile* tile = tiles_with_pending_upload_.front(); 357 Tile* tile = tiles_with_pending_upload_.front();
358 DCHECK(tile->drawing_info().resource_); 358 DCHECK(tile->drawing_info().resource_);
359 359
360 resource_pool_->resource_provider()->AbortSetPixels( 360 resource_pool_->resource_provider()->AbortSetPixels(
361 tile->drawing_info().resource_->id()); 361 tile->drawing_info().resource_->id());
362 resource_pool_->resource_provider()->ReleasePixelBuffer( 362 resource_pool_->resource_provider()->ReleasePixelBuffer(
363 tile->drawing_info().resource_->id()); 363 tile->drawing_info().resource_->id());
364 tile->drawing_info().memory_state_ = USING_RELEASABLE_MEMORY;
364 365
365 FreeResourcesForTile(tile); 366 FreeResourcesForTile(tile);
366 367
367 bytes_pending_upload_ -= tile->bytes_consumed_if_allocated(); 368 bytes_pending_upload_ -= tile->bytes_consumed_if_allocated();
368 tiles_with_pending_upload_.pop(); 369 tiles_with_pending_upload_.pop();
369 } 370 }
370 } 371 }
371 372
372 void TileManager::ForceTileUploadToComplete(Tile* tile) { 373 void TileManager::ForceTileUploadToComplete(Tile* tile) {
373 DCHECK(tile); 374 DCHECK(tile);
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 skia::LazyPixelRef* pixel_ref, 980 skia::LazyPixelRef* pixel_ref,
980 RenderingStatsInstrumentation* stats_instrumentation) { 981 RenderingStatsInstrumentation* stats_instrumentation) {
981 TRACE_EVENT0("cc", "TileManager::RunImageDecodeTask"); 982 TRACE_EVENT0("cc", "TileManager::RunImageDecodeTask");
982 base::TimeTicks start_time = stats_instrumentation->StartRecording(); 983 base::TimeTicks start_time = stats_instrumentation->StartRecording();
983 pixel_ref->Decode(); 984 pixel_ref->Decode();
984 base::TimeDelta duration = stats_instrumentation->EndRecording(start_time); 985 base::TimeDelta duration = stats_instrumentation->EndRecording(start_time);
985 stats_instrumentation->AddDeferredImageDecode(duration); 986 stats_instrumentation->AddDeferredImageDecode(duration);
986 } 987 }
987 988
988 } // namespace cc 989 } // namespace cc
OLDNEW
« no previous file with comments | « cc/base/worker_pool.cc ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698