Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(454)

Side by Side Diff: webkit/plugins/npapi/webplugin_accelerated_surface_mac.h

Issue 8678037: Render Core Animation plugins through WebKit's compositor rather than (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_ACCELERATED_SURFACE_MAC_H_ 5 #ifndef WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_ACCELERATED_SURFACE_MAC_H_
6 #define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_ACCELERATED_SURFACE_MAC_H_ 6 #define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_ACCELERATED_SURFACE_MAC_H_
7 #pragma once 7 #pragma once
8 8
9 #include "ui/gfx/native_widget_types.h" 9 #include "ui/gfx/native_widget_types.h"
10 #include "ui/gfx/size.h" 10 #include "ui/gfx/size.h"
11 11
12 // Avoid having to include OpenGL headers here. 12 // Avoid having to include OpenGL headers here.
13 typedef struct _CGLContextObject* CGLContextObj; 13 typedef struct _CGLContextObject* CGLContextObj;
14 14
15 namespace webkit { 15 namespace webkit {
16 namespace npapi { 16 namespace npapi {
17 17
18 // Interface class for interacting with an accelerated plugin surface, used 18 // Interface class for interacting with an accelerated plugin surface, used
19 // for the Core Animation flavors of plugin drawing on the Mac. 19 // for the Core Animation flavors of plugin drawing on the Mac.
20 class WebPluginAcceleratedSurface { 20 class WebPluginAcceleratedSurface {
21 public: 21 public:
22 virtual ~WebPluginAcceleratedSurface() {} 22 virtual ~WebPluginAcceleratedSurface() {}
23 23
24 // Sets the window handle used throughout the browser to identify this 24 // Sets the window handle used throughout the browser to identify this
25 // surface. 25 // surface.
26 virtual void SetWindowHandle(gfx::PluginWindowHandle window) = 0; 26 virtual void SetWindowHandle(gfx::PluginWindowHandle window) = 0;
27 27
28 // Indicates whether the new code path which renders the plugins via
29 // the compositor should be used.
30 virtual bool IsComposited() = 0;
31
28 // Sets the size of the surface. 32 // Sets the size of the surface.
29 virtual void SetSize(const gfx::Size& size) = 0; 33 virtual void SetSize(const gfx::Size& size) = 0;
30 34
31 // Returns the context used to draw into this surface. 35 // Returns the context used to draw into this surface.
32 // If initializing the surface failed, this will be NULL. 36 // If initializing the surface failed, this will be NULL.
33 virtual CGLContextObj context() = 0; 37 virtual CGLContextObj context() = 0;
34 38
35 // Readies the surface for drawing. Must be called before any drawing session. 39 // Readies the surface for drawing. Must be called before any drawing session.
36 virtual void StartDrawing() = 0; 40 virtual void StartDrawing() = 0;
37 41
38 // Ends a drawing session. Changes to the surface may not be reflected until 42 // Ends a drawing session. Changes to the surface may not be reflected until
39 // this is called. 43 // this is called.
40 virtual void EndDrawing() = 0; 44 virtual void EndDrawing() = 0;
41 }; 45 };
42 46
43 } // namespace npapi 47 } // namespace npapi
44 } // namespace webkit 48 } // namespace webkit
45 49
46 #endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_ACCELERATED_SURFACE_MAC_H_ 50 #endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_ACCELERATED_SURFACE_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698