| Index: webkit/plugins/ppapi/ppb_surface_3d_impl.h
|
| ===================================================================
|
| --- webkit/plugins/ppapi/ppb_surface_3d_impl.h (revision 0)
|
| +++ webkit/plugins/ppapi/ppb_surface_3d_impl.h (revision 0)
|
| @@ -0,0 +1,71 @@
|
| +// Copyright (c) 2010 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef WEBKIT_PLUGINS_PPAPI_PPB_SURFACE_3D_IMPL_H_
|
| +#define WEBKIT_PLUGINS_PPAPI_PPB_SURFACE_3D_IMPL_H_
|
| +
|
| +#include "base/callback.h"
|
| +#include "ppapi/c/dev/ppb_surface_3d_dev.h"
|
| +#include "webkit/plugins/ppapi/plugin_delegate.h"
|
| +#include "webkit/plugins/ppapi/resource.h"
|
| +
|
| +namespace gfx {
|
| +class Size;
|
| +}
|
| +
|
| +namespace webkit {
|
| +namespace ppapi {
|
| +
|
| +class PPB_Surface3D_Impl : public Resource {
|
| + public:
|
| + explicit PPB_Surface3D_Impl(PluginInstance* instance);
|
| + virtual ~PPB_Surface3D_Impl();
|
| +
|
| + static const PPB_Surface3D_Dev* GetInterface();
|
| +
|
| + // Resource override.
|
| + virtual PPB_Surface3D_Impl* AsPPB_Surface3D_Impl();
|
| +
|
| + bool Init(PP_Config3D_Dev config,
|
| + const int32_t* attrib_list);
|
| +
|
| + PluginInstance* instance() const {
|
| + return instance_;
|
| + }
|
| + PluginDelegate::PlatformContext3D* context() const {
|
| + return context_;
|
| + }
|
| +
|
| + // Binds/unbinds the graphics of this surface with the associated instance.
|
| + // If the surface is bound, anything drawn on the surface appears on instance
|
| + // window. Returns true if binding/unbinding is successful.
|
| + bool BindToInstance(bool bind);
|
| +
|
| + // Binds the context such that all draw calls to context
|
| + // affect this surface. To unbind call this function will NULL context.
|
| + // Returns true if successful.
|
| + bool BindToContext(PluginDelegate::PlatformContext3D* context);
|
| +
|
| + unsigned int GetBackingTextureId();
|
| +
|
| + bool SwapBuffers();
|
| +
|
| + private:
|
| + // Called when SwapBuffers is complete.
|
| + void OnSwapBuffers();
|
| +
|
| + // Plugin instance this surface is associated with.
|
| + PluginInstance* instance_;
|
| + bool bound_to_instance_;
|
| +
|
| + // The context this surface is currently bound to.
|
| + PluginDelegate::PlatformContext3D* context_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(PPB_Surface3D_Impl);
|
| +};
|
| +
|
| +} // namespace ppapi
|
| +} // namespace webkit
|
| +
|
| +#endif // WEBKIT_PLUGINS_PPAPI_PPB_SURFACE_3D_IMPL_H_
|
|
|
| Property changes on: webkit\plugins\ppapi\ppb_surface_3d_impl.h
|
| ___________________________________________________________________
|
| Added: svn:eol-style
|
| + LF
|
|
|
|
|