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

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

Issue 23796002: cc: Implement deadine scheduling disabled by default (Closed) Base URL: http://git.chromium.org/chromium/src.git@schedReadback4
Patch Set: disable by default everywhere Created 7 years, 3 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 void OnVSyncParametersChanged(base::TimeTicks timebase, 158 void OnVSyncParametersChanged(base::TimeTicks timebase,
159 base::TimeDelta interval); 159 base::TimeDelta interval);
160 virtual void FrameRateControllerTick(bool throttled, 160 virtual void FrameRateControllerTick(bool throttled,
161 const BeginFrameArgs& args) OVERRIDE; 161 const BeginFrameArgs& args) OVERRIDE;
162 scoped_ptr<FrameRateController> frame_rate_controller_; 162 scoped_ptr<FrameRateController> frame_rate_controller_;
163 int max_frames_pending_; 163 int max_frames_pending_;
164 int pending_swap_buffers_; 164 int pending_swap_buffers_;
165 bool needs_begin_frame_; 165 bool needs_begin_frame_;
166 bool client_ready_for_begin_frame_; 166 bool client_ready_for_begin_frame_;
167 167
168 // This stores a BeginFrame that we couldn't process immediately, but might
169 // process retroactively in the near future.
170 BeginFrameArgs skipped_begin_frame_args_;
171
168 // Forwarded to OutputSurfaceClient but threaded through OutputSurface 172 // Forwarded to OutputSurfaceClient but threaded through OutputSurface
169 // first so OutputSurface has a chance to update the FrameRateController 173 // first so OutputSurface has a chance to update the FrameRateController
170 void SetNeedsRedrawRect(gfx::Rect damage_rect); 174 void SetNeedsRedrawRect(gfx::Rect damage_rect);
171 void BeginFrame(const BeginFrameArgs& args); 175 void BeginFrame(const BeginFrameArgs& args);
172 void DidSwapBuffers(); 176 void DidSwapBuffers();
173 void OnSwapBuffersComplete(const CompositorFrameAck* ack); 177 void OnSwapBuffersComplete(const CompositorFrameAck* ack);
174 void DidLoseOutputSurface(); 178 void DidLoseOutputSurface();
175 void SetExternalStencilTest(bool enabled); 179 void SetExternalStencilTest(bool enabled);
176 void SetExternalDrawConstraints(const gfx::Transform& transform, 180 void SetExternalDrawConstraints(const gfx::Transform& transform,
177 gfx::Rect viewport, 181 gfx::Rect viewport,
178 gfx::Rect clip, 182 gfx::Rect clip,
179 bool valid_for_tile_management); 183 bool valid_for_tile_management);
180 184
181 // virtual for testing. 185 // virtual for testing.
182 virtual base::TimeDelta AlternateRetroactiveBeginFramePeriod(); 186 virtual base::TimeTicks RetroactiveBeginFrameDeadline();
183 virtual void PostCheckForRetroactiveBeginFrame(); 187 virtual void PostCheckForRetroactiveBeginFrame();
184 void CheckForRetroactiveBeginFrame(); 188 void CheckForRetroactiveBeginFrame();
185 189
186 private: 190 private:
187 OutputSurfaceClient* client_; 191 OutputSurfaceClient* client_;
188 friend class OutputSurfaceCallbacks; 192 friend class OutputSurfaceCallbacks;
189 193
190 void SetUpContext3d(); 194 void SetUpContext3d();
191 void ResetContext3d(); 195 void ResetContext3d();
192 void SetMemoryPolicy(const ManagedMemoryPolicy& policy, 196 void SetMemoryPolicy(const ManagedMemoryPolicy& policy,
193 bool discard_backbuffer_when_not_visible); 197 bool discard_backbuffer_when_not_visible);
194 198
195 // This stores a BeginFrame that we couldn't process immediately, but might
196 // process retroactively in the near future.
197 BeginFrameArgs skipped_begin_frame_args_;
198
199 // check_for_retroactive_begin_frame_pending_ is used to avoid posting 199 // check_for_retroactive_begin_frame_pending_ is used to avoid posting
200 // redundant checks for a retroactive BeginFrame. 200 // redundant checks for a retroactive BeginFrame.
201 bool check_for_retroactive_begin_frame_pending_; 201 bool check_for_retroactive_begin_frame_pending_;
202 202
203 bool external_stencil_test_enabled_; 203 bool external_stencil_test_enabled_;
204 204
205 DISALLOW_COPY_AND_ASSIGN(OutputSurface); 205 DISALLOW_COPY_AND_ASSIGN(OutputSurface);
206 }; 206 };
207 207
208 } // namespace cc 208 } // namespace cc
209 209
210 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ 210 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698