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

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

Issue 13051003: cpplint.py pass on cc/(base|debug|quads|resources)/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix prioritized_resource_unittest Created 7 years, 9 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
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/prioritized_resource_manager.h" 5 #include "cc/resources/prioritized_resource_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 409
410 void PrioritizedResourceManager::RegisterTexture(PrioritizedResource* texture) { 410 void PrioritizedResourceManager::RegisterTexture(PrioritizedResource* texture) {
411 DCHECK(proxy_->IsMainThread()); 411 DCHECK(proxy_->IsMainThread());
412 DCHECK(texture); 412 DCHECK(texture);
413 DCHECK(!texture->resource_manager()); 413 DCHECK(!texture->resource_manager());
414 DCHECK(!texture->backing()); 414 DCHECK(!texture->backing());
415 DCHECK(!ContainsKey(textures_, texture)); 415 DCHECK(!ContainsKey(textures_, texture));
416 416
417 texture->set_manager_internal(this); 417 texture->set_manager_internal(this);
418 textures_.insert(texture); 418 textures_.insert(texture);
419
420 } 419 }
421 420
422 void PrioritizedResourceManager::UnregisterTexture( 421 void PrioritizedResourceManager::UnregisterTexture(
423 PrioritizedResource* texture) { 422 PrioritizedResource* texture) {
424 DCHECK(proxy_->IsMainThread() || 423 DCHECK(proxy_->IsMainThread() ||
425 (proxy_->IsImplThread() && proxy_->IsMainThreadBlocked())); 424 (proxy_->IsImplThread() && proxy_->IsMainThreadBlocked()));
426 DCHECK(texture); 425 DCHECK(texture);
427 DCHECK(ContainsKey(textures_, texture)); 426 DCHECK(ContainsKey(textures_, texture));
428 427
429 ReturnBackingTexture(texture); 428 ReturnBackingTexture(texture);
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 previous_backing = backing; 533 previous_backing = backing;
535 } 534 }
536 #endif 535 #endif
537 } 536 }
538 537
539 const Proxy* PrioritizedResourceManager::ProxyForDebug() const { 538 const Proxy* PrioritizedResourceManager::ProxyForDebug() const {
540 return proxy_; 539 return proxy_;
541 } 540 }
542 541
543 } // namespace cc 542 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/prioritized_resource_manager.h ('k') | cc/resources/prioritized_resource_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698