| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2011 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_PLUGINS_NPAPI_WEBPLUGIN_ACCELERATED_SURFACE_MAC_H_ | |
| 6 #define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_ACCELERATED_SURFACE_MAC_H_ | |
| 7 | |
| 8 #include "ui/gfx/native_widget_types.h" | |
| 9 #include "ui/gfx/size.h" | |
| 10 | |
| 11 // Avoid having to include OpenGL headers here. | |
| 12 typedef struct _CGLContextObject* CGLContextObj; | |
| 13 | |
| 14 namespace webkit { | |
| 15 namespace npapi { | |
| 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 size of the surface. | |
| 24 virtual void SetSize(const gfx::Size& size) = 0; | |
| 25 | |
| 26 // Returns the context used to draw into this surface. | |
| 27 // If initializing the surface failed, this will be NULL. | |
| 28 virtual CGLContextObj context() = 0; | |
| 29 | |
| 30 // Readies the surface for drawing. Must be called before any drawing session. | |
| 31 virtual void StartDrawing() = 0; | |
| 32 | |
| 33 // Ends a drawing session. Changes to the surface may not be reflected until | |
| 34 // this is called. | |
| 35 virtual void EndDrawing() = 0; | |
| 36 }; | |
| 37 | |
| 38 } // namespace npapi | |
| 39 } // namespace webkit | |
| 40 | |
| 41 #endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_ACCELERATED_SURFACE_MAC_H_ | |
| OLD | NEW |