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

Side by Side Diff: ui/gfx/compositor/compositor.h

Issue 10227004: RenderWidget's scheduleComposite should return a bool. (true iff a prompt composite will come). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 UI_GFX_COMPOSITOR_COMPOSITOR_H_ 5 #ifndef UI_GFX_COMPOSITOR_COMPOSITOR_H_
6 #define UI_GFX_COMPOSITOR_COMPOSITOR_H_ 6 #define UI_GFX_COMPOSITOR_COMPOSITOR_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/hash_tables.h" 9 #include "base/hash_tables.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 203
204 // WebLayerTreeViewClient implementation. 204 // WebLayerTreeViewClient implementation.
205 virtual void updateAnimations(double frameBeginTime); 205 virtual void updateAnimations(double frameBeginTime);
206 virtual void layout(); 206 virtual void layout();
207 virtual void applyScrollAndScale(const WebKit::WebSize& scrollDelta, 207 virtual void applyScrollAndScale(const WebKit::WebSize& scrollDelta,
208 float scaleFactor); 208 float scaleFactor);
209 virtual WebKit::WebGraphicsContext3D* createContext3D(); 209 virtual WebKit::WebGraphicsContext3D* createContext3D();
210 virtual void didRebindGraphicsContext(bool success); 210 virtual void didRebindGraphicsContext(bool success);
211 virtual void didCommitAndDrawFrame(); 211 virtual void didCommitAndDrawFrame();
212 virtual void didCompleteSwapBuffers(); 212 virtual void didCompleteSwapBuffers();
213
214 #if defined(WEBLAYERTREEVIEWCLIENT_SCHEDULECOMPOSITE_RETURNS_BOOL)
215 virtual bool scheduleComposite();
216 #else
213 virtual void scheduleComposite(); 217 virtual void scheduleComposite();
218 #endif
214 219
215 private: 220 private:
216 // When reading back pixel data we often get RGBA rather than BGRA pixels and 221 // When reading back pixel data we often get RGBA rather than BGRA pixels and
217 // and the image often needs to be flipped vertically. 222 // and the image often needs to be flipped vertically.
218 static void SwizzleRGBAToBGRAAndFlip(unsigned char* pixels, 223 static void SwizzleRGBAToBGRAAndFlip(unsigned char* pixels,
219 const gfx::Size& image_size); 224 const gfx::Size& image_size);
220 225
221 // Notifies the compositor that compositing is complete. 226 // Notifies the compositor that compositing is complete.
222 void NotifyEnd(); 227 void NotifyEnd();
223 228
(...skipping 12 matching lines...) Expand all
236 // This is set to true when the swap buffers has been posted and we're waiting 241 // This is set to true when the swap buffers has been posted and we're waiting
237 // for completion. 242 // for completion.
238 bool swap_posted_; 243 bool swap_posted_;
239 244
240 friend class base::RefCounted<Compositor>; 245 friend class base::RefCounted<Compositor>;
241 }; 246 };
242 247
243 } // namespace ui 248 } // namespace ui
244 249
245 #endif // UI_GFX_COMPOSITOR_COMPOSITOR_H_ 250 #endif // UI_GFX_COMPOSITOR_COMPOSITOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698