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

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

Issue 1673783004: Hook up BeginFrameSource to SurfaceFactoryClient via SurfaceManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Register id namespace on Android Created 4 years, 9 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/surfaces/display_unittest.cc ('k') | cc/surfaces/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 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_H_ 5 #ifndef CC_SURFACES_SURFACE_H_
6 #define CC_SURFACES_SURFACE_H_ 6 #define CC_SURFACES_SURFACE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 return destruction_dependencies_.size(); 77 return destruction_dependencies_.size();
78 } 78 }
79 79
80 const std::vector<SurfaceId>& referenced_surfaces() const { 80 const std::vector<SurfaceId>& referenced_surfaces() const {
81 return referenced_surfaces_; 81 return referenced_surfaces_;
82 } 82 }
83 83
84 bool destroyed() const { return destroyed_; } 84 bool destroyed() const { return destroyed_; }
85 void set_destroyed(bool destroyed) { destroyed_ = destroyed; } 85 void set_destroyed(bool destroyed) { destroyed_ = destroyed; }
86 86
87 void AddBeginFrameSource(BeginFrameSource* begin_frame_source);
88 void RemoveBeginFrameSource(BeginFrameSource* begin_frame_source);
89
90 private: 87 private:
91 void ClearCopyRequests(); 88 void ClearCopyRequests();
92 void UpdatePrimaryBeginFrameSource();
93 89
94 SurfaceId surface_id_; 90 SurfaceId surface_id_;
95 base::WeakPtr<SurfaceFactory> factory_; 91 base::WeakPtr<SurfaceFactory> factory_;
96 // TODO(jamesr): Support multiple frames in flight. 92 // TODO(jamesr): Support multiple frames in flight.
97 scoped_ptr<CompositorFrame> current_frame_; 93 scoped_ptr<CompositorFrame> current_frame_;
98 int frame_index_; 94 int frame_index_;
99 bool destroyed_; 95 bool destroyed_;
100 std::vector<SurfaceSequence> destruction_dependencies_; 96 std::vector<SurfaceSequence> destruction_dependencies_;
101 97
102 // This surface may have multiple BeginFrameSources if it is 98 // This surface may have multiple BeginFrameSources if it is
103 // on multiple Displays. 99 // on multiple Displays.
104 std::set<BeginFrameSource*> begin_frame_sources_; 100 std::set<BeginFrameSource*> begin_frame_sources_;
105 101
106 std::vector<SurfaceId> referenced_surfaces_; 102 std::vector<SurfaceId> referenced_surfaces_;
107 103
108 DrawCallback draw_callback_; 104 DrawCallback draw_callback_;
109 105
110 DISALLOW_COPY_AND_ASSIGN(Surface); 106 DISALLOW_COPY_AND_ASSIGN(Surface);
111 }; 107 };
112 108
113 } // namespace cc 109 } // namespace cc
114 110
115 #endif // CC_SURFACES_SURFACE_H_ 111 #endif // CC_SURFACES_SURFACE_H_
OLDNEW
« no previous file with comments | « cc/surfaces/display_unittest.cc ('k') | cc/surfaces/surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698