OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |