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

Side by Side Diff: cc/output/output_surface.h

Issue 817603002: cc: Make scheduling be driven by vsync for android webview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix misc bugs introduced in last two patches Created 5 years, 10 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_OUTPUT_OUTPUT_SURFACE_H_ 5 #ifndef CC_OUTPUT_OUTPUT_SURFACE_H_
6 #define CC_OUTPUT_OUTPUT_SURFACE_H_ 6 #define CC_OUTPUT_OUTPUT_SURFACE_H_
7 7
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 bool HasClient() { return !!client_; } 136 bool HasClient() { return !!client_; }
137 137
138 // Get the class capable of informing cc of hardware overlay capability. 138 // Get the class capable of informing cc of hardware overlay capability.
139 OverlayCandidateValidator* overlay_candidate_validator() const { 139 OverlayCandidateValidator* overlay_candidate_validator() const {
140 return overlay_candidate_validator_.get(); 140 return overlay_candidate_validator_.get();
141 } 141 }
142 142
143 void DidLoseOutputSurface(); 143 void DidLoseOutputSurface();
144 void SetMemoryPolicy(const ManagedMemoryPolicy& policy); 144 void SetMemoryPolicy(const ManagedMemoryPolicy& policy);
145 145
146 // Support for a pull-model where draws are requested by the output surface.
147 //
148 // OutputSurface::Invalidate is called by the compositor to notify that
149 // there's new content.
150 virtual void Invalidate() {}
151
146 protected: 152 protected:
147 OutputSurfaceClient* client_; 153 OutputSurfaceClient* client_;
148 154
149 // Synchronously initialize context3d and enter hardware mode. 155 // Synchronously initialize context3d and enter hardware mode.
150 // This can only supported in threaded compositing mode. 156 // This can only supported in threaded compositing mode.
151 bool InitializeAndSetContext3d( 157 bool InitializeAndSetContext3d(
152 scoped_refptr<ContextProvider> context_provider); 158 scoped_refptr<ContextProvider> context_provider);
153 void ReleaseGL(); 159 void ReleaseGL();
154 160
155 void PostSwapBuffersComplete(); 161 void PostSwapBuffersComplete();
(...skipping 26 matching lines...) Expand all
182 bool external_stencil_test_enabled_; 188 bool external_stencil_test_enabled_;
183 189
184 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_; 190 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_;
185 191
186 DISALLOW_COPY_AND_ASSIGN(OutputSurface); 192 DISALLOW_COPY_AND_ASSIGN(OutputSurface);
187 }; 193 };
188 194
189 } // namespace cc 195 } // namespace cc
190 196
191 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ 197 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698