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

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

Issue 951673002: Revert "Pull chromium at 2c3ffb2355a27c32f45e508ef861416b820c823b" (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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/resources/platform_color_unittest.cc ('k') | cc/resources/raster_source.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/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/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "cc/resources/prioritized_resource.h" 10 #include "cc/resources/prioritized_resource.h"
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 } 444 }
445 445
446 PrioritizedResource::Backing* PrioritizedResourceManager::CreateBacking( 446 PrioritizedResource::Backing* PrioritizedResourceManager::CreateBacking(
447 const gfx::Size& size, 447 const gfx::Size& size,
448 ResourceFormat format, 448 ResourceFormat format,
449 ResourceProvider* resource_provider) { 449 ResourceProvider* resource_provider) {
450 DCHECK(proxy_->IsImplThread() && proxy_->IsMainThreadBlocked()); 450 DCHECK(proxy_->IsImplThread() && proxy_->IsMainThreadBlocked());
451 DCHECK(resource_provider); 451 DCHECK(resource_provider);
452 ResourceProvider::ResourceId resource_id = 452 ResourceProvider::ResourceId resource_id =
453 resource_provider->CreateManagedResource( 453 resource_provider->CreateManagedResource(
454 size, GL_TEXTURE_2D, GL_CLAMP_TO_EDGE, 454 size,
455 ResourceProvider::TEXTURE_HINT_IMMUTABLE, format); 455 GL_TEXTURE_2D,
456 GL_CLAMP_TO_EDGE,
457 ResourceProvider::TextureHintImmutable,
458 format);
456 PrioritizedResource::Backing* backing = new PrioritizedResource::Backing( 459 PrioritizedResource::Backing* backing = new PrioritizedResource::Backing(
457 resource_id, resource_provider, size, format); 460 resource_id, resource_provider, size, format);
458 memory_use_bytes_ += backing->bytes(); 461 memory_use_bytes_ += backing->bytes();
459 return backing; 462 return backing;
460 } 463 }
461 464
462 void PrioritizedResourceManager::EvictFirstBackingResource( 465 void PrioritizedResourceManager::EvictFirstBackingResource(
463 ResourceProvider* resource_provider) { 466 ResourceProvider* resource_provider) {
464 DCHECK(proxy_->IsImplThread()); 467 DCHECK(proxy_->IsImplThread());
465 DCHECK(resource_provider); 468 DCHECK(resource_provider);
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 previous_backing = backing; 541 previous_backing = backing;
539 } 542 }
540 #endif // DCHECK_IS_ON() 543 #endif // DCHECK_IS_ON()
541 } 544 }
542 545
543 const Proxy* PrioritizedResourceManager::ProxyForDebug() const { 546 const Proxy* PrioritizedResourceManager::ProxyForDebug() const {
544 return proxy_; 547 return proxy_;
545 } 548 }
546 549
547 } // namespace cc 550 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/platform_color_unittest.cc ('k') | cc/resources/raster_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698