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

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

Issue 1273163004: Revert of cc: Use worker context for one-copy tile initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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/test/test_in_process_context_provider.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/tiles/tile_manager.h" 5 #include "cc/tiles/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 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 PrioritizedTileVector* tiles_that_need_to_be_rasterized) { 487 PrioritizedTileVector* tiles_that_need_to_be_rasterized) {
488 TRACE_EVENT_BEGIN0("cc", "TileManager::AssignGpuMemoryToTiles"); 488 TRACE_EVENT_BEGIN0("cc", "TileManager::AssignGpuMemoryToTiles");
489 489
490 DCHECK(resource_pool_); 490 DCHECK(resource_pool_);
491 DCHECK(tile_task_runner_); 491 DCHECK(tile_task_runner_);
492 492
493 // Maintain the list of released resources that can potentially be re-used 493 // Maintain the list of released resources that can potentially be re-used
494 // or deleted. If this operation becomes expensive too, only do this after 494 // or deleted. If this operation becomes expensive too, only do this after
495 // some resource(s) was returned. Note that in that case, one also need to 495 // some resource(s) was returned. Note that in that case, one also need to
496 // invalidate when releasing some resource from the pool. 496 // invalidate when releasing some resource from the pool.
497 resource_pool_->CheckBusyResources(); 497 resource_pool_->CheckBusyResources(false);
498 498
499 // Now give memory out to the tiles until we're out, and build 499 // Now give memory out to the tiles until we're out, and build
500 // the needs-to-be-rasterized queue. 500 // the needs-to-be-rasterized queue.
501 unsigned schedule_priority = 1u; 501 unsigned schedule_priority = 1u;
502 all_tiles_that_need_to_be_rasterized_are_scheduled_ = true; 502 all_tiles_that_need_to_be_rasterized_are_scheduled_ = true;
503 bool had_enough_memory_to_schedule_tiles_needed_now = true; 503 bool had_enough_memory_to_schedule_tiles_needed_now = true;
504 504
505 MemoryUsage hard_memory_limit(global_state_.hard_memory_limit_in_bytes, 505 MemoryUsage hard_memory_limit(global_state_.hard_memory_limit_in_bytes,
506 global_state_.num_resources_limit); 506 global_state_.num_resources_limit);
507 MemoryUsage soft_memory_limit(global_state_.soft_memory_limit_in_bytes, 507 MemoryUsage soft_memory_limit(global_state_.soft_memory_limit_in_bytes,
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
1004 void TileManager::Signals::reset() { 1004 void TileManager::Signals::reset() {
1005 ready_to_activate = false; 1005 ready_to_activate = false;
1006 did_notify_ready_to_activate = false; 1006 did_notify_ready_to_activate = false;
1007 ready_to_draw = false; 1007 ready_to_draw = false;
1008 did_notify_ready_to_draw = false; 1008 did_notify_ready_to_draw = false;
1009 all_tile_tasks_completed = false; 1009 all_tile_tasks_completed = false;
1010 did_notify_all_tile_tasks_completed = false; 1010 did_notify_all_tile_tasks_completed = false;
1011 } 1011 }
1012 1012
1013 } // namespace cc 1013 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/test_in_process_context_provider.cc ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698