blob: f0e6d6f6268e2db4b58e3e20118bb298766f4d44 [file] [log] [blame]
// Copyright (c) 2011 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.
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/size.h"
// Avoid having to include OpenGL headers here.
typedef struct _CGLContextObject* CGLContextObj;
namespace content {
// Interface class for interacting with an accelerated plugin surface, used
// for the Core Animation flavors of plugin drawing on the Mac.
class WebPluginAcceleratedSurface {
virtual ~WebPluginAcceleratedSurface() {}
// Sets the size of the surface.
virtual void SetSize(const gfx::Size& size) = 0;
// Returns the context used to draw into this surface.
// If initializing the surface failed, this will be NULL.
virtual CGLContextObj context() = 0;
// Readies the surface for drawing. Must be called before any drawing session.
virtual void StartDrawing() = 0;
// Ends a drawing session. Changes to the surface may not be reflected until
// this is called.
virtual void EndDrawing() = 0;
} // namespace content