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

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

Issue 693943003: Update from https://crrev.com/302630 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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
« no previous file with comments | « cc/resources/tile_manager_perftest.cc ('k') | cc/surfaces/surface_factory.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 <set>
9
8 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
9 #include "base/containers/scoped_ptr_hash_map.h" 11 #include "base/containers/scoped_ptr_hash_map.h"
10 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
11 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
12 #include "cc/surfaces/surface_id.h" 14 #include "cc/surfaces/surface_id.h"
13 #include "cc/surfaces/surface_resource_holder.h" 15 #include "cc/surfaces/surface_resource_holder.h"
14 #include "cc/surfaces/surface_sequence.h" 16 #include "cc/surfaces/surface_sequence.h"
15 #include "cc/surfaces/surfaces_export.h" 17 #include "cc/surfaces/surfaces_export.h"
16 18
17 namespace gfx { 19 namespace gfx {
(...skipping 15 matching lines...) Expand all
33 class CC_SURFACES_EXPORT SurfaceFactory 35 class CC_SURFACES_EXPORT SurfaceFactory
34 : public base::SupportsWeakPtr<SurfaceFactory> { 36 : public base::SupportsWeakPtr<SurfaceFactory> {
35 public: 37 public:
36 SurfaceFactory(SurfaceManager* manager, SurfaceFactoryClient* client); 38 SurfaceFactory(SurfaceManager* manager, SurfaceFactoryClient* client);
37 ~SurfaceFactory(); 39 ~SurfaceFactory();
38 40
39 void Create(SurfaceId surface_id, const gfx::Size& size); 41 void Create(SurfaceId surface_id, const gfx::Size& size);
40 void Destroy(SurfaceId surface_id); 42 void Destroy(SurfaceId surface_id);
41 void DestroyOnSequence(SurfaceId surface_id, 43 void DestroyOnSequence(SurfaceId surface_id,
42 const std::set<SurfaceSequence>& dependency_set); 44 const std::set<SurfaceSequence>& dependency_set);
45 void DestroyAll();
43 // A frame can only be submitted to a surface created by this factory, 46 // A frame can only be submitted to a surface created by this factory,
44 // although the frame may reference surfaces created by other factories. 47 // although the frame may reference surfaces created by other factories.
45 // The callback is called the first time this frame is used to draw. 48 // The callback is called the first time this frame is used to draw.
46 void SubmitFrame(SurfaceId surface_id, 49 void SubmitFrame(SurfaceId surface_id,
47 scoped_ptr<CompositorFrame> frame, 50 scoped_ptr<CompositorFrame> frame,
48 const base::Closure& callback); 51 const base::Closure& callback);
49 void RequestCopyOfSurface(SurfaceId surface_id, 52 void RequestCopyOfSurface(SurfaceId surface_id,
50 scoped_ptr<CopyOutputRequest> copy_request); 53 scoped_ptr<CopyOutputRequest> copy_request);
51 54
52 SurfaceFactoryClient* client() { return client_; } 55 SurfaceFactoryClient* client() { return client_; }
(...skipping 11 matching lines...) Expand all
64 67
65 typedef base::ScopedPtrHashMap<SurfaceId, Surface> OwningSurfaceMap; 68 typedef base::ScopedPtrHashMap<SurfaceId, Surface> OwningSurfaceMap;
66 base::ScopedPtrHashMap<SurfaceId, Surface> surface_map_; 69 base::ScopedPtrHashMap<SurfaceId, Surface> surface_map_;
67 70
68 DISALLOW_COPY_AND_ASSIGN(SurfaceFactory); 71 DISALLOW_COPY_AND_ASSIGN(SurfaceFactory);
69 }; 72 };
70 73
71 } // namespace cc 74 } // namespace cc
72 75
73 #endif // CC_SURFACES_SURFACE_FACTORY_H_ 76 #endif // CC_SURFACES_SURFACE_FACTORY_H_
OLDNEW
« no previous file with comments | « cc/resources/tile_manager_perftest.cc ('k') | cc/surfaces/surface_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698