| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2006-2009 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 WEBKIT_GLUE_WEBPLUGIN_ACCELERATED_SURFACE_MAC_H_ | |
| 6 #define WEBKIT_GLUE_WEBPLUGIN_ACCELERATED_SURFACE_MAC_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include "gfx/native_widget_types.h" | |
| 10 #include "gfx/size.h" | |
| 11 | |
| 12 // Avoid having to include OpenGL headers here. | |
| 13 typedef struct _CGLContextObject* CGLContextObj; | |
| 14 | |
| 15 namespace webkit_glue { | |
| 16 | |
| 17 // Interface class for interacting with an accelerated plugin surface, used | |
| 18 // for the Core Animation flavors of plugin drawing on the Mac. | |
| 19 class WebPluginAcceleratedSurface { | |
| 20 public: | |
| 21 virtual ~WebPluginAcceleratedSurface() {} | |
| 22 | |
| 23 // Sets the window handle used throughout the browser to identify this | |
| 24 // surface. | |
| 25 virtual void SetWindowHandle(gfx::PluginWindowHandle window) = 0; | |
| 26 | |
| 27 // Sets the size of the surface. | |
| 28 virtual void SetSize(const gfx::Size& size) = 0; | |
| 29 | |
| 30 // Returns the context used to draw into this surface. | |
| 31 // If initializing the surface failed, this will be NULL. | |
| 32 virtual CGLContextObj context() = 0; | |
| 33 | |
| 34 // Readies the surface for drawing. Must be called before any drawing session. | |
| 35 virtual void StartDrawing() = 0; | |
| 36 | |
| 37 // Ends a drawing session. Changes to the surface may not be reflected until | |
| 38 // this is called. | |
| 39 virtual void EndDrawing() = 0; | |
| 40 }; | |
| 41 | |
| 42 } // namespace webkit_glue | |
| 43 | |
| 44 #endif // WEBKIT_GLUE_WEBPLUGIN_ACCELERATED_SURFACE_MAC_H_ | |
| OLD | NEW |