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

Side by Side Diff: components/exo/layer_tree_frame_sink_holder.h

Issue 2944523002: Improving flat containers interface. (Closed)
Patch Set: Other platforms compilation 2. Created 3 years, 5 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 COMPONENTS_EXO_LAYER_TREE_FRAME_SINK_HOLDER_H_ 5 #ifndef COMPONENTS_EXO_LAYER_TREE_FRAME_SINK_HOLDER_H_
6 #define COMPONENTS_EXO_LAYER_TREE_FRAME_SINK_HOLDER_H_ 6 #define COMPONENTS_EXO_LAYER_TREE_FRAME_SINK_HOLDER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/containers/flat_map.h" 10 #include "base/containers/flat_map.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 void SetMemoryPolicy(const cc::ManagedMemoryPolicy& policy) override {} 51 void SetMemoryPolicy(const cc::ManagedMemoryPolicy& policy) override {}
52 void SetExternalTilePriorityConstraints( 52 void SetExternalTilePriorityConstraints(
53 const gfx::Rect& viewport_rect, 53 const gfx::Rect& viewport_rect,
54 const gfx::Transform& transform) override {} 54 const gfx::Transform& transform) override {}
55 55
56 // Overridden from SurfaceObserver: 56 // Overridden from SurfaceObserver:
57 void OnSurfaceDestroying(Surface* surface) override; 57 void OnSurfaceDestroying(Surface* surface) override;
58 58
59 private: 59 private:
60 // A collection of callbacks used to release resources. 60 // A collection of callbacks used to release resources.
61 using ResourceReleaseCallbackMap = base::flat_map<int, cc::ReleaseCallback>; 61 using ResourceReleaseCallbackMap =
62 base::flat_map<cc::ResourceId, cc::ReleaseCallback>;
62 ResourceReleaseCallbackMap release_callbacks_; 63 ResourceReleaseCallbackMap release_callbacks_;
63 64
64 Surface* surface_; 65 Surface* surface_;
65 std::unique_ptr<cc::LayerTreeFrameSink> frame_sink_; 66 std::unique_ptr<cc::LayerTreeFrameSink> frame_sink_;
66 67
67 // The next resource id the buffer is attached to. 68 // The next resource id the buffer is attached to.
68 int next_resource_id_ = 1; 69 int next_resource_id_ = 1;
69 70
70 base::WeakPtrFactory<LayerTreeFrameSinkHolder> weak_factory_; 71 base::WeakPtrFactory<LayerTreeFrameSinkHolder> weak_factory_;
71 72
72 DISALLOW_COPY_AND_ASSIGN(LayerTreeFrameSinkHolder); 73 DISALLOW_COPY_AND_ASSIGN(LayerTreeFrameSinkHolder);
73 }; 74 };
74 75
75 } // namespace exo 76 } // namespace exo
76 77
77 #endif // COMPONENTS_EXO_LAYER_TREE_FRAME_SINK_HOLDER_H_ 78 #endif // COMPONENTS_EXO_LAYER_TREE_FRAME_SINK_HOLDER_H_
OLDNEW
« no previous file with comments | « cc/tiles/checker_image_tracker_unittest.cc ('k') | components/viz/service/display/surface_aggregator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698