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

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

Issue 486853002: cc: Use a normal texture for background texture. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nits in unittests Created 6 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/output/software_renderer_unittest.cc ('k') | cc/resources/raster_worker_pool_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/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 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 const gfx::Size& size, 448 const gfx::Size& size,
449 ResourceFormat format, 449 ResourceFormat format,
450 ResourceProvider* resource_provider) { 450 ResourceProvider* resource_provider) {
451 DCHECK(proxy_->IsImplThread() && proxy_->IsMainThreadBlocked()); 451 DCHECK(proxy_->IsImplThread() && proxy_->IsMainThreadBlocked());
452 DCHECK(resource_provider); 452 DCHECK(resource_provider);
453 ResourceProvider::ResourceId resource_id = 453 ResourceProvider::ResourceId resource_id =
454 resource_provider->CreateManagedResource( 454 resource_provider->CreateManagedResource(
455 size, 455 size,
456 GL_TEXTURE_2D, 456 GL_TEXTURE_2D,
457 GL_CLAMP_TO_EDGE, 457 GL_CLAMP_TO_EDGE,
458 ResourceProvider::TextureUsageAny, 458 ResourceProvider::TextureHintImmutable,
459 format); 459 format);
460 PrioritizedResource::Backing* backing = new PrioritizedResource::Backing( 460 PrioritizedResource::Backing* backing = new PrioritizedResource::Backing(
461 resource_id, resource_provider, size, format); 461 resource_id, resource_provider, size, format);
462 memory_use_bytes_ += backing->bytes(); 462 memory_use_bytes_ += backing->bytes();
463 return backing; 463 return backing;
464 } 464 }
465 465
466 void PrioritizedResourceManager::EvictFirstBackingResource( 466 void PrioritizedResourceManager::EvictFirstBackingResource(
467 ResourceProvider* resource_provider) { 467 ResourceProvider* resource_provider) {
468 DCHECK(proxy_->IsImplThread()); 468 DCHECK(proxy_->IsImplThread());
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 previous_backing = backing; 542 previous_backing = backing;
543 } 543 }
544 #endif // DCHECK_IS_ON 544 #endif // DCHECK_IS_ON
545 } 545 }
546 546
547 const Proxy* PrioritizedResourceManager::ProxyForDebug() const { 547 const Proxy* PrioritizedResourceManager::ProxyForDebug() const {
548 return proxy_; 548 return proxy_;
549 } 549 }
550 550
551 } // namespace cc 551 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/software_renderer_unittest.cc ('k') | cc/resources/raster_worker_pool_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698