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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 | 181 |
182 // Signals swap has aborted (e.g. lost context). | 182 // Signals swap has aborted (e.g. lost context). |
183 void OnSwapBuffersAborted(); | 183 void OnSwapBuffersAborted(); |
184 | 184 |
185 // WebLayerTreeViewClient implementation. | 185 // WebLayerTreeViewClient implementation. |
186 virtual void updateAnimations(double frameBeginTime); | 186 virtual void updateAnimations(double frameBeginTime); |
187 virtual void layout(); | 187 virtual void layout(); |
188 virtual void applyScrollAndScale(const WebKit::WebSize& scrollDelta, | 188 virtual void applyScrollAndScale(const WebKit::WebSize& scrollDelta, |
189 float scaleFactor); | 189 float scaleFactor); |
190 virtual WebKit::WebGraphicsContext3D* createContext3D(); | 190 virtual WebKit::WebGraphicsContext3D* createContext3D(); |
| 191 virtual void didRebindGraphicsContext(bool success); |
| 192 virtual void didCommitAndDrawFrame(); |
191 virtual void didCompleteSwapBuffers(); | 193 virtual void didCompleteSwapBuffers(); |
192 virtual void didRebindGraphicsContext(bool success); | |
193 virtual void scheduleComposite(); | 194 virtual void scheduleComposite(); |
194 | 195 |
195 private: | 196 private: |
196 // When reading back pixel data we often get RGBA rather than BGRA pixels and | 197 // When reading back pixel data we often get RGBA rather than BGRA pixels and |
197 // and the image often needs to be flipped vertically. | 198 // and the image often needs to be flipped vertically. |
198 static void SwizzleRGBAToBGRAAndFlip(unsigned char* pixels, | 199 static void SwizzleRGBAToBGRAAndFlip(unsigned char* pixels, |
199 const gfx::Size& image_size); | 200 const gfx::Size& image_size); |
200 | 201 |
201 // Notifies the compositor that compositing is complete. | 202 // Notifies the compositor that compositing is complete. |
202 void NotifyEnd(); | 203 void NotifyEnd(); |
(...skipping 13 matching lines...) Expand all Loading... |
216 // This is set to true when the swap buffers has been posted and we're waiting | 217 // This is set to true when the swap buffers has been posted and we're waiting |
217 // for completion. | 218 // for completion. |
218 bool swap_posted_; | 219 bool swap_posted_; |
219 | 220 |
220 friend class base::RefCounted<Compositor>; | 221 friend class base::RefCounted<Compositor>; |
221 }; | 222 }; |
222 | 223 |
223 } // namespace ui | 224 } // namespace ui |
224 | 225 |
225 #endif // UI_GFX_COMPOSITOR_COMPOSITOR_H_ | 226 #endif // UI_GFX_COMPOSITOR_COMPOSITOR_H_ |
OLD | NEW |