Chromium Code Reviews| 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 #ifndef CC_RESOURCES_RESOURCE_PROVIDER_H_ | 5 #ifndef CC_RESOURCES_RESOURCE_PROVIDER_H_ |
| 6 #define CC_RESOURCES_RESOURCE_PROVIDER_H_ | 6 #define CC_RESOURCES_RESOURCE_PROVIDER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 530 Resource* InsertResource(ResourceId id, const Resource& resource); | 530 Resource* InsertResource(ResourceId id, const Resource& resource); |
| 531 Resource* GetResource(ResourceId id); | 531 Resource* GetResource(ResourceId id); |
| 532 const Resource* LockForRead(ResourceId id); | 532 const Resource* LockForRead(ResourceId id); |
| 533 void UnlockForRead(ResourceId id); | 533 void UnlockForRead(ResourceId id); |
| 534 Resource* LockForWrite(ResourceId id); | 534 Resource* LockForWrite(ResourceId id); |
| 535 void UnlockForWrite(Resource* resource); | 535 void UnlockForWrite(Resource* resource); |
| 536 | 536 |
| 537 static void PopulateSkBitmapWithResource(SkBitmap* sk_bitmap, | 537 static void PopulateSkBitmapWithResource(SkBitmap* sk_bitmap, |
| 538 const Resource* resource); | 538 const Resource* resource); |
| 539 | 539 |
| 540 bool CreateMailboxAndBindResource(gpu::gles2::GLES2Interface* gl, | |
|
piman
2016/02/04 19:27:02
nit: maybe document what the return value is meant
David Yen
2016/02/04 19:40:16
Done.
| |
| 541 Resource* resource); | |
| 540 void TransferResource(gpu::gles2::GLES2Interface* gl, | 542 void TransferResource(gpu::gles2::GLES2Interface* gl, |
| 541 ResourceId id, | 543 ResourceId id, |
| 542 TransferableResource* resource); | 544 TransferableResource* resource); |
| 543 enum DeleteStyle { | 545 enum DeleteStyle { |
| 544 NORMAL, | 546 NORMAL, |
| 545 FOR_SHUTDOWN, | 547 FOR_SHUTDOWN, |
| 546 }; | 548 }; |
| 547 void DeleteResourceInternal(ResourceMap::iterator it, DeleteStyle style); | 549 void DeleteResourceInternal(ResourceMap::iterator it, DeleteStyle style); |
| 548 void DeleteAndReturnUnusedResourcesToChild(ChildMap::iterator child_it, | 550 void DeleteAndReturnUnusedResourcesToChild(ChildMap::iterator child_it, |
| 549 DeleteStyle style, | 551 DeleteStyle style, |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 599 // A process-unique ID used for disambiguating memory dumps from different | 601 // A process-unique ID used for disambiguating memory dumps from different |
| 600 // resource providers. | 602 // resource providers. |
| 601 int tracing_id_; | 603 int tracing_id_; |
| 602 | 604 |
| 603 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); | 605 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); |
| 604 }; | 606 }; |
| 605 | 607 |
| 606 } // namespace cc | 608 } // namespace cc |
| 607 | 609 |
| 608 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ | 610 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ |
| OLD | NEW |