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/resources/resource_provider.h" | 5 #include "cc/resources/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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
297 DeleteResourceInternal(it, Normal); | 297 DeleteResourceInternal(it, Normal); |
298 } | 298 } |
299 } | 299 } |
300 | 300 |
301 void ResourceProvider::DeleteResourceInternal(ResourceMap::iterator it, | 301 void ResourceProvider::DeleteResourceInternal(ResourceMap::iterator it, |
302 DeleteStyle style) { | 302 DeleteStyle style) { |
303 Resource* resource = &it->second; | 303 Resource* resource = &it->second; |
304 bool lost_resource = lost_output_surface_; | 304 bool lost_resource = lost_output_surface_; |
305 | 305 |
306 DCHECK(!resource->exported || style != Normal); | 306 DCHECK(!resource->exported || style != Normal); |
307 if (style == ForShutdown && resource->exported) | 307 if (style == ForShutdown) |
danakj
2013/05/09 02:42:50
When the RP shuts down, it calls mailbox callbacks
danakj
2013/05/09 02:43:11
Oh, this we talked about and I reverted/fixed.
| |
308 lost_resource = true; | 308 lost_resource = true; |
309 | 309 |
310 if (resource->gl_id && !resource->external) { | 310 if (resource->gl_id && !resource->external) { |
311 WebGraphicsContext3D* context3d = output_surface_->context3d(); | 311 WebGraphicsContext3D* context3d = output_surface_->context3d(); |
312 DCHECK(context3d); | 312 DCHECK(context3d); |
313 GLC(context3d, context3d->deleteTexture(resource->gl_id)); | 313 GLC(context3d, context3d->deleteTexture(resource->gl_id)); |
314 } | 314 } |
315 if (resource->gl_upload_query_id) { | 315 if (resource->gl_upload_query_id) { |
316 WebGraphicsContext3D* context3d = output_surface_->context3d(); | 316 WebGraphicsContext3D* context3d = output_surface_->context3d(); |
317 DCHECK(context3d); | 317 DCHECK(context3d); |
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1236 void ResourceProvider::EnableReadLockFences(ResourceProvider::ResourceId id, | 1236 void ResourceProvider::EnableReadLockFences(ResourceProvider::ResourceId id, |
1237 bool enable) { | 1237 bool enable) { |
1238 DCHECK(thread_checker_.CalledOnValidThread()); | 1238 DCHECK(thread_checker_.CalledOnValidThread()); |
1239 ResourceMap::iterator it = resources_.find(id); | 1239 ResourceMap::iterator it = resources_.find(id); |
1240 CHECK(it != resources_.end()); | 1240 CHECK(it != resources_.end()); |
1241 Resource* resource = &it->second; | 1241 Resource* resource = &it->second; |
1242 resource->enable_read_lock_fences = enable; | 1242 resource->enable_read_lock_fences = enable; |
1243 } | 1243 } |
1244 | 1244 |
1245 } // namespace cc | 1245 } // namespace cc |
OLD | NEW |