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

Side by Side Diff: cc/surfaces/surface_factory.h

Issue 603703002: Fix SurfaceResourceHolder destruction order (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test Created 6 years, 3 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/surfaces/surface_factory_unittest.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_SURFACES_SURFACE_FACTORY_H_ 5 #ifndef CC_SURFACES_SURFACE_FACTORY_H_
6 #define CC_SURFACES_SURFACE_FACTORY_H_ 6 #define CC_SURFACES_SURFACE_FACTORY_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "base/containers/scoped_ptr_hash_map.h" 9 #include "base/containers/scoped_ptr_hash_map.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 SurfaceFactoryClient* client() { return client_; } 49 SurfaceFactoryClient* client() { return client_; }
50 50
51 void ReceiveFromChild(const TransferableResourceArray& resources); 51 void ReceiveFromChild(const TransferableResourceArray& resources);
52 void RefResources(const TransferableResourceArray& resources); 52 void RefResources(const TransferableResourceArray& resources);
53 void UnrefResources(const ReturnedResourceArray& resources); 53 void UnrefResources(const ReturnedResourceArray& resources);
54 54
55 private: 55 private:
56 SurfaceManager* manager_; 56 SurfaceManager* manager_;
57 SurfaceFactoryClient* client_; 57 SurfaceFactoryClient* client_;
58 SurfaceResourceHolder holder_;
59
58 typedef base::ScopedPtrHashMap<SurfaceId, Surface> OwningSurfaceMap; 60 typedef base::ScopedPtrHashMap<SurfaceId, Surface> OwningSurfaceMap;
59 base::ScopedPtrHashMap<SurfaceId, Surface> surface_map_; 61 base::ScopedPtrHashMap<SurfaceId, Surface> surface_map_;
60 62
61 SurfaceResourceHolder holder_;
62
63 DISALLOW_COPY_AND_ASSIGN(SurfaceFactory); 63 DISALLOW_COPY_AND_ASSIGN(SurfaceFactory);
64 }; 64 };
65 65
66 } // namespace cc 66 } // namespace cc
67 67
68 #endif // CC_SURFACES_SURFACE_FACTORY_H_ 68 #endif // CC_SURFACES_SURFACE_FACTORY_H_
OLDNEW
« no previous file with comments | « no previous file | cc/surfaces/surface_factory_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698