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

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

Issue 2383373002: Reduce SurfaceIdAllocator usage and tie SurfaceFactory to a single FrameSinkId (Closed)
Patch Set: Rebased Created 4 years, 2 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 | « cc/test/test_compositor_frame_sink.cc ('k') | components/exo/surface.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_SURFACE_H_ 5 #ifndef COMPONENTS_EXO_SURFACE_H_
6 #define COMPONENTS_EXO_SURFACE_H_ 6 #define COMPONENTS_EXO_SURFACE_H_
7 7
8 #include <list> 8 #include <list>
9 #include <memory> 9 #include <memory>
10 #include <set> 10 #include <set>
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 private: 74 private:
75 friend class base::RefCounted<SurfaceFactoryOwner>; 75 friend class base::RefCounted<SurfaceFactoryOwner>;
76 friend class Surface; 76 friend class Surface;
77 77
78 ~SurfaceFactoryOwner() override; 78 ~SurfaceFactoryOwner() override;
79 79
80 std::map<int, 80 std::map<int,
81 std::pair<scoped_refptr<SurfaceFactoryOwner>, 81 std::pair<scoped_refptr<SurfaceFactoryOwner>,
82 std::unique_ptr<cc::SingleReleaseCallback>>> 82 std::unique_ptr<cc::SingleReleaseCallback>>>
83 release_callbacks_; 83 release_callbacks_;
84 cc::FrameSinkId frame_sink_id_;
84 std::unique_ptr<cc::SurfaceIdAllocator> id_allocator_; 85 std::unique_ptr<cc::SurfaceIdAllocator> id_allocator_;
85 std::unique_ptr<cc::SurfaceFactory> surface_factory_; 86 std::unique_ptr<cc::SurfaceFactory> surface_factory_;
86 Surface* surface_ = nullptr; 87 Surface* surface_ = nullptr;
87 }; 88 };
88 89
89 // This class represents a rectangular area that is displayed on the screen. 90 // This class represents a rectangular area that is displayed on the screen.
90 // It has a location, size and pixel contents. 91 // It has a location, size and pixel contents.
91 class Surface : public ui::LayerOwnerDelegate, 92 class Surface : public ui::LayerOwnerDelegate,
92 public ui::ContextFactoryObserver { 93 public ui::ContextFactoryObserver {
93 public: 94 public:
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 400
400 // Surface observer list. Surface does not own the observers. 401 // Surface observer list. Surface does not own the observers.
401 base::ObserverList<SurfaceObserver, true> observers_; 402 base::ObserverList<SurfaceObserver, true> observers_;
402 403
403 DISALLOW_COPY_AND_ASSIGN(Surface); 404 DISALLOW_COPY_AND_ASSIGN(Surface);
404 }; 405 };
405 406
406 } // namespace exo 407 } // namespace exo
407 408
408 #endif // COMPONENTS_EXO_SURFACE_H_ 409 #endif // COMPONENTS_EXO_SURFACE_H_
OLDNEW
« no previous file with comments | « cc/test/test_compositor_frame_sink.cc ('k') | components/exo/surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698