| 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 CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_ | 6 #define CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "content/common/content_export.h" |
| 9 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
| 10 #include "ui/gfx/rect.h" | 11 #include "ui/gfx/rect.h" |
| 11 #include "ui/gfx/size.h" | 12 #include "ui/gfx/size.h" |
| 12 | 13 |
| 13 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" | 14 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" |
| 14 | 15 |
| 15 namespace gfx { | 16 namespace gfx { |
| 16 class JavaBitmap; | 17 class JavaBitmap; |
| 17 } | 18 } |
| 18 | 19 |
| 19 namespace WebKit { | 20 namespace WebKit { |
| 20 class WebLayer; | 21 class WebLayer; |
| 21 } | 22 } |
| 22 | 23 |
| 23 namespace content { | 24 namespace content { |
| 24 | 25 |
| 25 // An interface to the browser-side compositor. | 26 // An interface to the browser-side compositor. |
| 26 class Compositor { | 27 class CONTENT_EXPORT Compositor { |
| 27 public: | 28 public: |
| 28 class Client { | 29 class Client { |
| 29 public: | 30 public: |
| 30 // Tells the client that it should schedule a composite. | 31 // Tells the client that it should schedule a composite. |
| 31 virtual void ScheduleComposite() = 0; | 32 virtual void ScheduleComposite() = 0; |
| 32 | 33 |
| 33 // The compositor has completed swapping a frame. | 34 // The compositor has completed swapping a frame. |
| 34 virtual void OnSwapBuffersCompleted() {} | 35 virtual void OnSwapBuffersCompleted() {} |
| 35 }; | 36 }; |
| 36 | 37 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 // done. It is assumed that the texture size matches that of the bitmap. | 78 // done. It is assumed that the texture size matches that of the bitmap. |
| 78 virtual void CopyTextureToBitmap(WebKit::WebGLId texture_id, | 79 virtual void CopyTextureToBitmap(WebKit::WebGLId texture_id, |
| 79 gfx::JavaBitmap& bitmap) = 0; | 80 gfx::JavaBitmap& bitmap) = 0; |
| 80 protected: | 81 protected: |
| 81 Compositor() {} | 82 Compositor() {} |
| 82 }; | 83 }; |
| 83 | 84 |
| 84 } // namespace content | 85 } // namespace content |
| 85 | 86 |
| 86 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_ | 87 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_ |
| OLD | NEW |