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

Side by Side Diff: cc/resources/resource_provider.h

Issue 1666203003: Separate out resource mailbox creation and fix synchronization issue. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months 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
« no previous file with comments | « no previous file | cc/resources/resource_provider.cc » ('j') | cc/resources/resource_provider.cc » ('J')
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 #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
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
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_
OLDNEW
« no previous file with comments | « no previous file | cc/resources/resource_provider.cc » ('j') | cc/resources/resource_provider.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698