#include "platform/PlatformExport.h"
#include "platform/geometry/IntSize.h"
-#include "platform/graphics/GraphicsContext3D.h"
#include "platform/graphics/GraphicsTypes3D.h"
-
+#include "platform/graphics/gpu/WebGLImageConversion.h"
#include "public/platform/WebExternalTextureLayerClient.h"
#include "public/platform/WebExternalTextureMailbox.h"
#include "public/platform/WebGraphicsContext3D.h"
+#include "third_party/khronos/GLES2/gl2.h"
+#include "third_party/khronos/GLES2/gl2ext.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "wtf/Noncopyable.h"
#include "wtf/OwnPtr.h"
}
namespace WebCore {
-class GraphicsContext3D;
class ImageData;
+class ImageBuffer;
// Abstract interface to allow basic context eviction management
class PLATFORM_EXPORT ContextEvictionManager : public RefCounted<ContextEvictionManager> {
virtual bool prepareMailbox(blink::WebExternalTextureMailbox*, blink::WebExternalBitmap*) OVERRIDE;
virtual void mailboxReleased(const blink::WebExternalTextureMailbox&) OVERRIDE;
- bool copyToPlatformTexture(GraphicsContext3D&, Platform3DObject texture, GLenum internalFormat,
+ bool copyToPlatformTexture(blink::WebGraphicsContext3D*, Platform3DObject texture, GLenum internalFormat,
GLenum destType, GLint level, bool premultiplyAlpha, bool flipY);
void setPackAlignment(GLint param);
PassRefPtr<Uint8ClampedArray> paintRenderingResultsToImageData(int&, int&);
private:
- DrawingBuffer(blink::WebGraphicsContext3D*, GraphicsContext3D*, const IntSize&, bool multisampleExtensionSupported,
+ DrawingBuffer(blink::WebGraphicsContext3D*, const IntSize&, bool multisampleExtensionSupported,
bool packedDepthStencilExtensionSupported, PreserveDrawingBuffer, PassRefPtr<ContextEvictionManager>);
void initialize(const IntSize&);
// Helper function which does a readback from the currently-bound
// framebuffer into a buffer of a certain size with 4-byte pixels.
- void readBackFramebuffer(unsigned char* pixels, int width, int height, ReadbackOrder, GraphicsContext3D::AlphaOp);
+ void readBackFramebuffer(unsigned char* pixels, int width, int height, ReadbackOrder, WebGLImageConversion::AlphaOp);
// Helper function to flip a bitmap vertically.
void flipVertically(uint8_t* data, int width, int height);
GLenum m_activeTextureUnit;
blink::WebGraphicsContext3D* m_context;
- RefPtr<GraphicsContext3D> m_contextSupport;
IntSize m_size;
bool m_multisampleExtensionSupported;
bool m_packedDepthStencilExtensionSupported;