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

Side by Side Diff: cc/prioritized_texture_manager.cc

Issue 11266030: Use gfx:: Geometry types for the resource provider and layer updater classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: uint8 Created 8 years, 1 month 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/prioritized_texture_manager.h ('k') | cc/prioritized_texture_unittest.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 "config.h" 5 #include "config.h"
6 6
7 #include "cc/prioritized_texture_manager.h" 7 #include "cc/prioritized_texture_manager.h"
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 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 texture->setAbovePriorityCutoff(false); 387 texture->setAbovePriorityCutoff(false);
388 } 388 }
389 389
390 void PrioritizedTextureManager::returnBackingTexture(PrioritizedTexture* texture ) 390 void PrioritizedTextureManager::returnBackingTexture(PrioritizedTexture* texture )
391 { 391 {
392 DCHECK(Proxy::isMainThread() || (Proxy::isImplThread() && Proxy::isMainThrea dBlocked())); 392 DCHECK(Proxy::isMainThread() || (Proxy::isImplThread() && Proxy::isMainThrea dBlocked()));
393 if (texture->backing()) 393 if (texture->backing())
394 texture->unlink(); 394 texture->unlink();
395 } 395 }
396 396
397 PrioritizedTexture::Backing* PrioritizedTextureManager::createBacking(IntSize si ze, GLenum format, ResourceProvider* resourceProvider) 397 PrioritizedTexture::Backing* PrioritizedTextureManager::createBacking(gfx::Size size, GLenum format, ResourceProvider* resourceProvider)
398 { 398 {
399 DCHECK(Proxy::isImplThread() && Proxy::isMainThreadBlocked()); 399 DCHECK(Proxy::isImplThread() && Proxy::isMainThreadBlocked());
400 DCHECK(resourceProvider); 400 DCHECK(resourceProvider);
401 ResourceProvider::ResourceId resourceId = resourceProvider->createResource(m _pool, size, format, ResourceProvider::TextureUsageAny); 401 ResourceProvider::ResourceId resourceId = resourceProvider->createResource(m _pool, size, format, ResourceProvider::TextureUsageAny);
402 PrioritizedTexture::Backing* backing = new PrioritizedTexture::Backing(resou rceId, resourceProvider, size, format); 402 PrioritizedTexture::Backing* backing = new PrioritizedTexture::Backing(resou rceId, resourceProvider, size, format);
403 m_memoryUseBytes += backing->bytes(); 403 m_memoryUseBytes += backing->bytes();
404 return backing; 404 return backing;
405 } 405 }
406 406
407 void PrioritizedTextureManager::evictFirstBackingResource(ResourceProvider* reso urceProvider) 407 void PrioritizedTextureManager::evictFirstBackingResource(ResourceProvider* reso urceProvider)
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 if (reachedUnrecyclable) 466 if (reachedUnrecyclable)
467 DCHECK(!backing->canBeRecycled()); 467 DCHECK(!backing->canBeRecycled());
468 else 468 else
469 DCHECK(backing->canBeRecycled()); 469 DCHECK(backing->canBeRecycled());
470 previous_backing = backing; 470 previous_backing = backing;
471 } 471 }
472 #endif 472 #endif
473 } 473 }
474 474
475 } // namespace cc 475 } // namespace cc
OLDNEW
« no previous file with comments | « cc/prioritized_texture_manager.h ('k') | cc/prioritized_texture_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698