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

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: Fixed all existing tests! New tests pending... Created 7 years, 5 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 bool HasClient() { return !!client_; } 164 bool HasClient() { return !!client_; }
165 void SetNeedsRedrawRect(gfx::Rect damage_rect); 165 void SetNeedsRedrawRect(gfx::Rect damage_rect);
166 void BeginFrame(const BeginFrameArgs& args); 166 void BeginFrame(const BeginFrameArgs& args);
167 void DidSwapBuffers(); 167 void DidSwapBuffers();
168 void OnSwapBuffersComplete(const CompositorFrameAck* ack); 168 void OnSwapBuffersComplete(const CompositorFrameAck* ack);
169 void DidLoseOutputSurface(); 169 void DidLoseOutputSurface();
170 void SetExternalDrawConstraints(const gfx::Transform& transform, 170 void SetExternalDrawConstraints(const gfx::Transform& transform,
171 gfx::Rect viewport); 171 gfx::Rect viewport);
172 172
173 // virtual for testing. 173 // virtual for testing.
174 virtual base::TimeDelta RetroactiveBeginFramePeriod(); 174 virtual base::TimeTicks RetroactiveBeginFrameDeadline();
175 virtual void PostCheckForRetroactiveBeginFrame(); 175 virtual void PostCheckForRetroactiveBeginFrame();
176 void CheckForRetroactiveBeginFrame(); 176 void CheckForRetroactiveBeginFrame();
177 177
178 private: 178 private:
179 OutputSurfaceClient* client_; 179 OutputSurfaceClient* client_;
180 friend class OutputSurfaceCallbacks; 180 friend class OutputSurfaceCallbacks;
181 181
182 void SetContext3D(scoped_ptr<WebKit::WebGraphicsContext3D> context3d); 182 void SetContext3D(scoped_ptr<WebKit::WebGraphicsContext3D> context3d);
183 void ResetContext3D(); 183 void ResetContext3D();
184 void SetMemoryPolicy(const ManagedMemoryPolicy& policy, 184 void SetMemoryPolicy(const ManagedMemoryPolicy& policy,
185 bool discard_backbuffer_when_not_visible); 185 bool discard_backbuffer_when_not_visible);
186 186
187 // This stores a BeginFrame that we couldn't process immediately, but might 187 // This stores a BeginFrame that we couldn't process immediately, but might
188 // process retroactively in the near future. 188 // process retroactively in the near future.
189 BeginFrameArgs skipped_begin_frame_args_; 189 BeginFrameArgs skipped_begin_frame_args_;
190 190
191 // check_for_retroactive_begin_frame_pending_ is used to avoid posting 191 // check_for_retroactive_begin_frame_pending_ is used to avoid posting
192 // redundant checks for a retroactive BeginFrame. 192 // redundant checks for a retroactive BeginFrame.
193 bool check_for_retroactive_begin_frame_pending_; 193 bool check_for_retroactive_begin_frame_pending_;
194 194
195 DISALLOW_COPY_AND_ASSIGN(OutputSurface); 195 DISALLOW_COPY_AND_ASSIGN(OutputSurface);
196 }; 196 };
197 197
198 } // namespace cc 198 } // namespace cc
199 199
200 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ 200 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698