* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef ImageBuffer_h
#include "AffineTransform.h"
#include "ColorSpace.h"
#include "FloatRect.h"
+#if ENABLE(TIZEN_CANVAS_CAIRO_GLES_RENDERING) || ENABLE(TIZEN_CANVAS_SURFACE_LOCKING)
+#include "GLPlatformSurface.h"
+#endif
#include "GraphicsContext.h"
#if USE(ACCELERATED_COMPOSITING)
#include "PlatformLayer.h"
, AcceleratedMemorySaving
#endif
};
-
enum BackingStoreCopy {
CopyBackingStore, // Guarantee subsequent draws don't affect the copy.
DontCopyBackingStore // Subsequent draws may affect the copy.
PassRefPtr<Uint8ClampedArray> getPremultipliedImageData(const IntRect&, CoordinateSystem = LogicalCoordinateSystem) const;
void putByteArray(Multiply multiplied, Uint8ClampedArray*, const IntSize& sourceSize, const IntRect& sourceRect, const IntPoint& destPoint, CoordinateSystem = LogicalCoordinateSystem);
-
void convertToLuminanceMask();
-
String toDataURL(const String& mimeType, const double* quality = 0, CoordinateSystem = LogicalCoordinateSystem) const;
#if !USE(CG)
AffineTransform baseTransform() const { return AffineTransform(); }
bool copyToPlatformTexture(GraphicsContext3D&, Platform3DObject, GC3Denum, bool, bool);
#if ENABLE(TIZEN_CANVAS_CAIRO_GLES_RENDERING) || ENABLE(TIZEN_CANVAS_SURFACE_LOCKING)
- int getPlatformSurfaceID() const { return m_platformSurfaceID; }
+ PlatformBufferHandle getPlatformSurfaceID() const { return m_offScreenSurface->handle(); }
bool isLockable() const { return m_isLockable; }
void swapPlatformSurfaces();
#endif
// so that create() knows when it should return failure.
ImageBuffer(const IntSize&, float resolutionScale, ColorSpace, RenderingMode, DeferralMode, bool& success);
-#if ENABLE(TIZEN_CANVAS_CAIRO_GLES_RENDERING)
- bool setBindingTexture();
-
- unsigned m_bindingTexID;
- void* m_eglImage;
-#endif // ENABLE(TIZEN_CANVAS_CAIRO_GLES_RENDERING)
-
#if ENABLE(TIZEN_CANVAS_CAIRO_GLES_RENDERING) || ENABLE(TIZEN_CANVAS_SURFACE_LOCKING)
void initializeEGL();
+ void destroy();
bool lockSurface() const;
PassRefPtr<cairo_surface_t> querySurface() const;
bool unlockSurface() const;
-
- int m_platformSurfaceID;
- void* m_eglSurface;
bool m_isLockable;
+ OwnPtr<GLPlatformSurface> m_offScreenSurface;
#endif // ENABLE(TIZEN_CANVAS_CAIRO_GLES_RENDERING) || ENABLE(TIZEN_CANVAS_SURFACE_LOCKING)
};