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

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

Issue 2757953002: DisplayCompositor should enforce invariant that frame size and device scale factor are fixed (Closed)
Patch Set: Created 3 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
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 <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 10
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 SurfaceManager* manager() { return manager_; } 80 SurfaceManager* manager() { return manager_; }
81 81
82 Surface* current_surface_for_testing() { return current_surface_.get(); } 82 Surface* current_surface_for_testing() { return current_surface_.get(); }
83 83
84 // This can be set to false if resources from this SurfaceFactory don't need 84 // This can be set to false if resources from this SurfaceFactory don't need
85 // to have sync points set on them when returned from the Display, for 85 // to have sync points set on them when returned from the Display, for
86 // example if the Display shares a context with the creator. 86 // example if the Display shares a context with the creator.
87 bool needs_sync_points() const { return needs_sync_points_; } 87 bool needs_sync_points() const { return needs_sync_points_; }
88 void set_needs_sync_points(bool needs) { needs_sync_points_ = needs; } 88 void set_needs_sync_points(bool needs) { needs_sync_points_ = needs; }
89 89
90 void OnBadFrameReceived();
91
90 private: 92 private:
91 // PendingFrameObserver implementation. 93 // PendingFrameObserver implementation.
92 void OnReferencedSurfacesChanged( 94 void OnReferencedSurfacesChanged(
93 Surface* surface, 95 Surface* surface,
94 const std::vector<SurfaceId>* active_referenced_surfaces, 96 const std::vector<SurfaceId>* active_referenced_surfaces,
95 const std::vector<SurfaceId>* pending_referenced_surfaces) override; 97 const std::vector<SurfaceId>* pending_referenced_surfaces) override;
96 void OnSurfaceActivated(Surface* surface) override; 98 void OnSurfaceActivated(Surface* surface) override;
97 void OnSurfaceDependenciesChanged( 99 void OnSurfaceDependenciesChanged(
98 Surface* surface, 100 Surface* surface,
99 const SurfaceDependencies& added_dependencies, 101 const SurfaceDependencies& added_dependencies,
(...skipping 11 matching lines...) Expand all
111 bool seen_first_frame_activation_ = false; 113 bool seen_first_frame_activation_ = false;
112 std::unique_ptr<Surface> current_surface_; 114 std::unique_ptr<Surface> current_surface_;
113 base::WeakPtrFactory<SurfaceFactory> weak_factory_; 115 base::WeakPtrFactory<SurfaceFactory> weak_factory_;
114 116
115 DISALLOW_COPY_AND_ASSIGN(SurfaceFactory); 117 DISALLOW_COPY_AND_ASSIGN(SurfaceFactory);
116 }; 118 };
117 119
118 } // namespace cc 120 } // namespace cc
119 121
120 #endif // CC_SURFACES_SURFACE_FACTORY_H_ 122 #endif // CC_SURFACES_SURFACE_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698