| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_BROWSER_ANDROID_GRAPHICS_CONTEXT_H_ |
| 6 #define CONTENT_BROWSER_ANDROID_GRAPHICS_CONTEXT_H_ |
| 7 |
| 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "ui/gfx/native_widget_types.h" |
| 10 |
| 11 class WebGraphicsContext3DCommandBufferImpl; |
| 12 struct ANativeWindow; |
| 13 |
| 14 namespace WebKit { |
| 15 class WebGraphicsContext3D; |
| 16 } |
| 17 |
| 18 namespace content { |
| 19 |
| 20 class GraphicsContext { |
| 21 public: |
| 22 ~GraphicsContext(); |
| 23 |
| 24 // Create and returns a graphics context on the caller's thread and |
| 25 // also creates an image transport surface associated with the given |
| 26 // parent window. |
| 27 static GraphicsContext* CreateForUI(ANativeWindow* ui_window); |
| 28 |
| 29 uint32 InsertSyncPoint(); |
| 30 int GetSurfaceID(); |
| 31 |
| 32 private: |
| 33 GraphicsContext(WebGraphicsContext3DCommandBufferImpl* context, |
| 34 int surface_id, |
| 35 ANativeWindow* window, |
| 36 int texture_id1, |
| 37 int texture_id2); |
| 38 |
| 39 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context_; |
| 40 int surface_id_; |
| 41 ANativeWindow* window_; |
| 42 int texture_id_[2]; |
| 43 }; |
| 44 |
| 45 } // namespace content |
| 46 |
| 47 #endif // CONTENT_BROWSER_ANDROID_GRAPHICS_CONTEXT_H_ |
| OLD | NEW |