| Index: Source/core/platform/graphics/gpu/NonDrawableAcceleratedImageBufferSurface.h
|
| diff --git a/Source/core/platform/graphics/GaneshUtils.h b/Source/core/platform/graphics/gpu/NonDrawableAcceleratedImageBufferSurface.h
|
| similarity index 63%
|
| copy from Source/core/platform/graphics/GaneshUtils.h
|
| copy to Source/core/platform/graphics/gpu/NonDrawableAcceleratedImageBufferSurface.h
|
| index a86b0efb597435880efd77b9d991c2fa102fd756..c74bbb3e143366590b4b3006e74bdda99b21eb4f 100644
|
| --- a/Source/core/platform/graphics/GaneshUtils.h
|
| +++ b/Source/core/platform/graphics/gpu/NonDrawableAcceleratedImageBufferSurface.h
|
| @@ -28,17 +28,32 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#ifndef GaneshUtils_h
|
| -#define GaneshUtils_h
|
| +#ifndef NonDrawableAcceleratedImageBufferSurface_h
|
| +#define NonDrawableAcceleratedImageBufferSurface_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 ensureTextureBackedSkBitmap(GrContext*, SkBitmap&, const IntSize&, GrSurfaceOrigin, GrPixelConfig);
|
| +// This is a GPU backed surface that has no canvas or render target.
|
| +class NonDrawableAcceleratedImageBufferSurface : public ImageBufferSurface {
|
| + WTF_MAKE_NONCOPYABLE(NonDrawableAcceleratedImageBufferSurface); WTF_MAKE_FAST_ALLOCATED;
|
| +public:
|
| + NonDrawableAcceleratedImageBufferSurface(const IntSize&, OpacityMode = NonOpaque, float resolutionScale = 1.0f);
|
| + virtual ~NonDrawableAcceleratedImageBufferSurface() { }
|
| +
|
| + 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
|
|
|