| Index: Source/platform/graphics/gpu/WebGLImageBufferSurface.h
|
| diff --git a/Source/platform/graphics/skia/GaneshUtils.h b/Source/platform/graphics/gpu/WebGLImageBufferSurface.h
|
| similarity index 66%
|
| copy from Source/platform/graphics/skia/GaneshUtils.h
|
| copy to Source/platform/graphics/gpu/WebGLImageBufferSurface.h
|
| index bc4c0cb6dae4f16484a510c29db5f98cc86045b3..0725ff271e2cc5f4f27e58e1c3832a1560b1441b 100644
|
| --- a/Source/platform/graphics/skia/GaneshUtils.h
|
| +++ b/Source/platform/graphics/gpu/WebGLImageBufferSurface.h
|
| @@ -28,18 +28,32 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#ifndef GaneshUtils_h
|
| -#define GaneshUtils_h
|
| +#ifndef WebGLImageBufferSurface_h
|
| +#define WebGLImageBufferSurface_h
|
|
|
| -#include "platform/PlatformExport.h"
|
| -#include "platform/geometry/IntSize.h"
|
| +#include "platform/graphics/ImageBufferSurface.h"
|
| #include "third_party/skia/include/core/SkBitmap.h"
|
| -#include "third_party/skia/include/gpu/GrContext.h"
|
|
|
| namespace WebCore {
|
|
|
| -bool PLATFORM_EXPORT ensureTextureBackedSkBitmap(GrContext*, SkBitmap&, const IntSize&, GrSurfaceOrigin, GrPixelConfig);
|
| +// This is a GPU backed surface that has no canvas or render target.
|
| +class PLATFORM_EXPORT WebGLImageBufferSurface : public ImageBufferSurface {
|
| + WTF_MAKE_NONCOPYABLE(WebGLImageBufferSurface); WTF_MAKE_FAST_ALLOCATED;
|
| +public:
|
| + WebGLImageBufferSurface(const IntSize&, OpacityMode = NonOpaque);
|
| + virtual ~WebGLImageBufferSurface() { }
|
| +
|
| + virtual SkCanvas* canvas() const OVERRIDE { return 0; }
|
| + virtual const SkBitmap& bitmap() const OVERRIDE { return m_bitmap; }
|
| + virtual bool isValid() const OVERRIDE { return m_bitmap.pixelRef(); }
|
| + virtual bool isAccelerated() const OVERRIDE { return true; }
|
| + virtual Platform3DObject getBackingTexture() const OVERRIDE;
|
| +
|
| +private:
|
| + SkBitmap m_bitmap;
|
| +};
|
| +
|
|
|
| } // namespace WebCore
|
|
|
| -#endif // GaneshUtils_h
|
| +#endif
|
|
|