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

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

Issue 13947038: Retry tree activation if raster tasks finish during first half of vsync interval (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/tile_manager.h ('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 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 } 452 }
453 453
454 void TileManager::DidFinishDispatchingWorkerPoolCompletionCallbacks() { 454 void TileManager::DidFinishDispatchingWorkerPoolCompletionCallbacks() {
455 // If a flush is needed, do it now before starting to dispatch more tasks. 455 // If a flush is needed, do it now before starting to dispatch more tasks.
456 if (has_performed_uploads_since_last_flush_) { 456 if (has_performed_uploads_since_last_flush_) {
457 resource_pool_->resource_provider()->ShallowFlushIfSupported(); 457 resource_pool_->resource_provider()->ShallowFlushIfSupported();
458 has_performed_uploads_since_last_flush_ = false; 458 has_performed_uploads_since_last_flush_ = false;
459 } 459 }
460 460
461 DispatchMoreTasks(); 461 DispatchMoreTasks();
462 if (!pending_tasks_)
463 client_->DidFinishTileRasterTasks();
462 } 464 }
463 465
464 void TileManager::AssignGpuMemoryToTiles() { 466 void TileManager::AssignGpuMemoryToTiles() {
465 TRACE_EVENT0("cc", "TileManager::AssignGpuMemoryToTiles"); 467 TRACE_EVENT0("cc", "TileManager::AssignGpuMemoryToTiles");
466 size_t unreleasable_bytes = 0; 468 size_t unreleasable_bytes = 0;
467 469
468 // Now give memory out to the tiles until we're out, and build 470 // Now give memory out to the tiles until we're out, and build
469 // the needs-to-be-rasterized queue. 471 // the needs-to-be-rasterized queue.
470 tiles_that_need_to_be_rasterized_.clear(); 472 tiles_that_need_to_be_rasterized_.clear();
471 473
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
976 skia::LazyPixelRef* pixel_ref, 978 skia::LazyPixelRef* pixel_ref,
977 RenderingStatsInstrumentation* stats_instrumentation) { 979 RenderingStatsInstrumentation* stats_instrumentation) {
978 TRACE_EVENT0("cc", "TileManager::RunImageDecodeTask"); 980 TRACE_EVENT0("cc", "TileManager::RunImageDecodeTask");
979 base::TimeTicks start_time = stats_instrumentation->StartRecording(); 981 base::TimeTicks start_time = stats_instrumentation->StartRecording();
980 pixel_ref->Decode(); 982 pixel_ref->Decode();
981 base::TimeDelta duration = stats_instrumentation->EndRecording(start_time); 983 base::TimeDelta duration = stats_instrumentation->EndRecording(start_time);
982 stats_instrumentation->AddDeferredImageDecode(duration); 984 stats_instrumentation->AddDeferredImageDecode(duration);
983 } 985 }
984 986
985 } // namespace cc 987 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/tile_manager.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698