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

Side by Side Diff: Source/WebCore/platform/graphics/chromium/cc/CCSchedulerStateMachine.h

Issue 10202004: Merge 114599 - [chromium] Add canBeginFrame state to CCSchedulerStateMachine to suppress initializa… (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 8 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 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 110
111 // Call this only in response to receiving an ACTION_BEGIN_FRAME 111 // Call this only in response to receiving an ACTION_BEGIN_FRAME
112 // from nextState. Indicates that all painting is complete and that 112 // from nextState. Indicates that all painting is complete and that
113 // updating of compositor resources can begin. 113 // updating of compositor resources can begin.
114 void beginFrameComplete(); 114 void beginFrameComplete();
115 115
116 // Call this only in response to receiving an ACTION_UPDATE_MORE_RESOURCES 116 // Call this only in response to receiving an ACTION_UPDATE_MORE_RESOURCES
117 // from nextState. Indicates that the specific update request completed. 117 // from nextState. Indicates that the specific update request completed.
118 void beginUpdateMoreResourcesComplete(bool morePending); 118 void beginUpdateMoreResourcesComplete(bool morePending);
119 119
120 // Indicates whether we can successfully begin a frame at this time.
121 void setCanBeginFrame(bool can) { m_canBeginFrame = can; }
122
120 // Indicates whether drawing would, at this time, make sense. 123 // Indicates whether drawing would, at this time, make sense.
121 // canDraw can be used to supress flashes or checkerboarding 124 // canDraw can be used to supress flashes or checkerboarding
122 // when such behavior would be undesirable. 125 // when such behavior would be undesirable.
123 void setCanDraw(bool can) { m_canDraw = can; } 126 void setCanDraw(bool can) { m_canDraw = can; }
124 127
125 void didLoseContext(); 128 void didLoseContext();
126 void didRecreateContext(); 129 void didRecreateContext();
127 130
128 protected: 131 protected:
129 bool shouldDrawForced() const; 132 bool shouldDrawForced() const;
130 bool shouldDraw() const; 133 bool shouldDraw() const;
131 bool hasDrawnThisFrame() const; 134 bool hasDrawnThisFrame() const;
132 135
133 CommitState m_commitState; 136 CommitState m_commitState;
134 137
135 int m_currentFrameNumber; 138 int m_currentFrameNumber;
136 int m_lastFrameNumberWhereDrawWasCalled; 139 int m_lastFrameNumberWhereDrawWasCalled;
137 bool m_needsRedraw; 140 bool m_needsRedraw;
138 bool m_needsForcedRedraw; 141 bool m_needsForcedRedraw;
139 bool m_needsCommit; 142 bool m_needsCommit;
140 bool m_needsForcedCommit; 143 bool m_needsForcedCommit;
141 bool m_updateMoreResourcesPending; 144 bool m_updateMoreResourcesPending;
142 bool m_insideVSync; 145 bool m_insideVSync;
143 bool m_visible; 146 bool m_visible;
147 bool m_canBeginFrame;
144 bool m_canDraw; 148 bool m_canDraw;
145 bool m_drawIfPossibleFailed; 149 bool m_drawIfPossibleFailed;
146 ContextState m_contextState; 150 ContextState m_contextState;
147 }; 151 };
148 152
149 } 153 }
150 154
151 #endif // CCSchedulerStateMachine_h 155 #endif // CCSchedulerStateMachine_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698