1 /* 2 * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. 3 */ 4 #ifndef ImageBufferDataJava_h 5 #define ImageBufferDataJava_h 6 7 #include "RQRef.h" 8 #include "GraphicsContext.h" 9 10 namespace WebCore { 11 class IntSize; 12 class FloatSize; 13 class ImageBuffer; 14 15 class ImageBufferData { 16 public: 17 ImageBufferData(const FloatSize &size, ImageBuffer &rq_holder); 18 JLObject getWCImage() const; 19 unsigned char *data() const; 20 void update(); 21 22 //we need to have RQRef here due to [deref] 23 //callback in destructor. Texture need to be released. 24 RefPtr<RQRef> m_image; //WCImage wrapper 25 ImageBuffer &m_rq_holder; //accessor to the RenderQueue 26 27 std::unique_ptr<GraphicsContext> m_context; //XXX: recheck other usages 28 //RenderQueue need to be processed before pixel buffer extraction. 29 }; 30 } // namespace WebCore 31 32 #endif //ImageBufferDataJava_h