OLD | NEW |
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/resource_provider.h" | 5 #include "cc/resource_provider.h" |
6 | 6 |
7 #include <limits.h> | 7 #include <limits.h> |
8 | 8 |
9 #include "base/debug/alias.h" | 9 #include "base/debug/alias.h" |
10 #include "base/hash_tables.h" | 10 #include "base/hash_tables.h" |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 } | 399 } |
400 | 400 |
401 void ResourceProvider::flushUploads() | 401 void ResourceProvider::flushUploads() |
402 { | 402 { |
403 if (!m_textureUploader) | 403 if (!m_textureUploader) |
404 return; | 404 return; |
405 | 405 |
406 m_textureUploader->flush(); | 406 m_textureUploader->flush(); |
407 } | 407 } |
408 | 408 |
| 409 void ResourceProvider::releaseCachedData() |
| 410 { |
| 411 if (!m_textureUploader) |
| 412 return; |
| 413 |
| 414 m_textureUploader->releaseCachedQueries(); |
| 415 } |
| 416 |
409 void ResourceProvider::flush() | 417 void ResourceProvider::flush() |
410 { | 418 { |
411 DCHECK(m_threadChecker.CalledOnValidThread()); | 419 DCHECK(m_threadChecker.CalledOnValidThread()); |
412 WebGraphicsContext3D* context3d = m_outputSurface->context3d(); | 420 WebGraphicsContext3D* context3d = m_outputSurface->context3d(); |
413 if (context3d) | 421 if (context3d) |
414 context3d->flush(); | 422 context3d->flush(); |
415 } | 423 } |
416 | 424 |
417 bool ResourceProvider::shallowFlushIfSupported() | 425 bool ResourceProvider::shallowFlushIfSupported() |
418 { | 426 { |
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1110 | 1118 |
1111 void ResourceProvider::enableReadLockFences(ResourceProvider::ResourceId id, boo
l enable) { | 1119 void ResourceProvider::enableReadLockFences(ResourceProvider::ResourceId id, boo
l enable) { |
1112 DCHECK(m_threadChecker.CalledOnValidThread()); | 1120 DCHECK(m_threadChecker.CalledOnValidThread()); |
1113 ResourceMap::iterator it = m_resources.find(id); | 1121 ResourceMap::iterator it = m_resources.find(id); |
1114 CHECK(it != m_resources.end()); | 1122 CHECK(it != m_resources.end()); |
1115 Resource* resource = &it->second; | 1123 Resource* resource = &it->second; |
1116 resource->enableReadLockFences = enable; | 1124 resource->enableReadLockFences = enable; |
1117 } | 1125 } |
1118 | 1126 |
1119 } // namespace cc | 1127 } // namespace cc |
OLD | NEW |