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

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

Issue 83883002: cc: Allow TEXTURE_RECTANGLE_ARB to be used for tile textures. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review feedback Created 7 years 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/pixel_buffer_raster_worker_pool.cc ('k') | cc/resources/raster_worker_pool.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/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 440
441 PrioritizedResource::Backing* PrioritizedResourceManager::CreateBacking( 441 PrioritizedResource::Backing* PrioritizedResourceManager::CreateBacking(
442 gfx::Size size, 442 gfx::Size size,
443 ResourceFormat format, 443 ResourceFormat format,
444 ResourceProvider* resource_provider) { 444 ResourceProvider* resource_provider) {
445 DCHECK(proxy_->IsImplThread() && proxy_->IsMainThreadBlocked()); 445 DCHECK(proxy_->IsImplThread() && proxy_->IsMainThreadBlocked());
446 DCHECK(resource_provider); 446 DCHECK(resource_provider);
447 ResourceProvider::ResourceId resource_id = 447 ResourceProvider::ResourceId resource_id =
448 resource_provider->CreateManagedResource( 448 resource_provider->CreateManagedResource(
449 size, 449 size,
450 GL_TEXTURE_2D,
450 GL_CLAMP_TO_EDGE, 451 GL_CLAMP_TO_EDGE,
451 ResourceProvider::TextureUsageAny, 452 ResourceProvider::TextureUsageAny,
452 format); 453 format);
453 PrioritizedResource::Backing* backing = new PrioritizedResource::Backing( 454 PrioritizedResource::Backing* backing = new PrioritizedResource::Backing(
454 resource_id, resource_provider, size, format); 455 resource_id, resource_provider, size, format);
455 memory_use_bytes_ += backing->bytes(); 456 memory_use_bytes_ += backing->bytes();
456 return backing; 457 return backing;
457 } 458 }
458 459
459 void PrioritizedResourceManager::EvictFirstBackingResource( 460 void PrioritizedResourceManager::EvictFirstBackingResource(
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 previous_backing = backing; 536 previous_backing = backing;
536 } 537 }
537 #endif 538 #endif
538 } 539 }
539 540
540 const Proxy* PrioritizedResourceManager::ProxyForDebug() const { 541 const Proxy* PrioritizedResourceManager::ProxyForDebug() const {
541 return proxy_; 542 return proxy_;
542 } 543 }
543 544
544 } // namespace cc 545 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/pixel_buffer_raster_worker_pool.cc ('k') | cc/resources/raster_worker_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698