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

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

Issue 16871016: cc: Use BeginFrameArgs (Closed) Base URL: http://git.chromium.org/chromium/src.git@bfargs2
Patch Set: Add missing OVERRIDE Created 7 years, 4 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 "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 void SetNeedsRedrawRect(gfx::Rect damage_rect); 167 void SetNeedsRedrawRect(gfx::Rect damage_rect);
168 void BeginFrame(const BeginFrameArgs& args); 168 void BeginFrame(const BeginFrameArgs& args);
169 void DidSwapBuffers(); 169 void DidSwapBuffers();
170 void OnSwapBuffersComplete(const CompositorFrameAck* ack); 170 void OnSwapBuffersComplete(const CompositorFrameAck* ack);
171 void DidLoseOutputSurface(); 171 void DidLoseOutputSurface();
172 void SetExternalStencilTest(bool enabled); 172 void SetExternalStencilTest(bool enabled);
173 void SetExternalDrawConstraints(const gfx::Transform& transform, 173 void SetExternalDrawConstraints(const gfx::Transform& transform,
174 gfx::Rect viewport); 174 gfx::Rect viewport);
175 175
176 // virtual for testing. 176 // virtual for testing.
177 virtual base::TimeDelta RetroactiveBeginFramePeriod(); 177 virtual base::TimeTicks RetroactiveBeginFrameDeadline();
178 virtual void PostCheckForRetroactiveBeginFrame(); 178 virtual void PostCheckForRetroactiveBeginFrame();
179 void CheckForRetroactiveBeginFrame(); 179 void CheckForRetroactiveBeginFrame();
180 180
181 private: 181 private:
182 OutputSurfaceClient* client_; 182 OutputSurfaceClient* client_;
183 friend class OutputSurfaceCallbacks; 183 friend class OutputSurfaceCallbacks;
184 184
185 void SetContext3D(scoped_ptr<WebKit::WebGraphicsContext3D> context3d); 185 void SetContext3D(scoped_ptr<WebKit::WebGraphicsContext3D> context3d);
186 void ResetContext3D(); 186 void ResetContext3D();
187 void SetMemoryPolicy(const ManagedMemoryPolicy& policy, 187 void SetMemoryPolicy(const ManagedMemoryPolicy& policy,
188 bool discard_backbuffer_when_not_visible); 188 bool discard_backbuffer_when_not_visible);
189 189
190 // This stores a BeginFrame that we couldn't process immediately, but might 190 // This stores a BeginFrame that we couldn't process immediately, but might
191 // process retroactively in the near future. 191 // process retroactively in the near future.
192 BeginFrameArgs skipped_begin_frame_args_; 192 BeginFrameArgs skipped_begin_frame_args_;
193 193
194 // check_for_retroactive_begin_frame_pending_ is used to avoid posting 194 // check_for_retroactive_begin_frame_pending_ is used to avoid posting
195 // redundant checks for a retroactive BeginFrame. 195 // redundant checks for a retroactive BeginFrame.
196 bool check_for_retroactive_begin_frame_pending_; 196 bool check_for_retroactive_begin_frame_pending_;
197 197
198 DISALLOW_COPY_AND_ASSIGN(OutputSurface); 198 DISALLOW_COPY_AND_ASSIGN(OutputSurface);
199 }; 199 };
200 200
201 } // namespace cc 201 } // namespace cc
202 202
203 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ 203 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698