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

Side by Side Diff: cc/layers/delegated_frame_resource_collection.h

Issue 69343011: cc: Rationalize sync points and lost status for returned resources (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | « no previous file | cc/layers/delegated_frame_resource_collection.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_LAYERS_DELEGATED_FRAME_RESOURCE_COLLECTION_H_ 5 #ifndef CC_LAYERS_DELEGATED_FRAME_RESOURCE_COLLECTION_H_
6 #define CC_LAYERS_DELEGATED_FRAME_RESOURCE_COLLECTION_H_ 6 #define CC_LAYERS_DELEGATED_FRAME_RESOURCE_COLLECTION_H_
7 7
8 #include "base/containers/hash_tables.h" 8 #include "base/containers/hash_tables.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 friend class base::RefCounted<DelegatedFrameResourceCollection>; 47 friend class base::RefCounted<DelegatedFrameResourceCollection>;
48 ~DelegatedFrameResourceCollection(); 48 ~DelegatedFrameResourceCollection();
49 49
50 DelegatedFrameResourceCollectionClient* client_; 50 DelegatedFrameResourceCollectionClient* client_;
51 scoped_refptr<BlockingTaskRunner> main_thread_runner_; 51 scoped_refptr<BlockingTaskRunner> main_thread_runner_;
52 52
53 ReturnedResourceArray returned_resources_for_child_compositor_; 53 ReturnedResourceArray returned_resources_for_child_compositor_;
54 bool lost_all_resources_; 54 bool lost_all_resources_;
55 55
56 struct RefCount { 56 struct RefCount {
57 RefCount()
58 : refs_to_return(0), refs_to_wait_for(0), sync_point(0), lost(false) {}
57 int refs_to_return; 59 int refs_to_return;
58 int refs_to_wait_for; 60 int refs_to_wait_for;
61 unsigned int sync_point;
62 bool lost;
59 }; 63 };
60 typedef base::hash_map<unsigned, RefCount> ResourceIdRefCountMap; 64 typedef base::hash_map<unsigned, RefCount> ResourceIdRefCountMap;
61 ResourceIdRefCountMap resource_id_ref_count_map_; 65 ResourceIdRefCountMap resource_id_ref_count_map_;
62 66
63 base::ThreadChecker main_thread_checker_; 67 base::ThreadChecker main_thread_checker_;
64 base::WeakPtrFactory<DelegatedFrameResourceCollection> weak_ptr_factory_; 68 base::WeakPtrFactory<DelegatedFrameResourceCollection> weak_ptr_factory_;
65 69
66 DISALLOW_COPY_AND_ASSIGN(DelegatedFrameResourceCollection); 70 DISALLOW_COPY_AND_ASSIGN(DelegatedFrameResourceCollection);
67 }; 71 };
68 72
69 } // namespace cc 73 } // namespace cc
70 74
71 #endif // CC_LAYERS_DELEGATED_FRAME_RESOURCE_COLLECTION_H_ 75 #endif // CC_LAYERS_DELEGATED_FRAME_RESOURCE_COLLECTION_H_
OLDNEW
« no previous file with comments | « no previous file | cc/layers/delegated_frame_resource_collection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698