Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Unified Diff: public/platform/WebExternalBitmap.h

Issue 17859003: Allow DrawingBuffer to present to a bitmap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: public/platform/WebExternalBitmap.h
diff --git a/public/web/WebDOMResourceProgressEvent.h b/public/platform/WebExternalBitmap.h
similarity index 74%
copy from public/web/WebDOMResourceProgressEvent.h
copy to public/platform/WebExternalBitmap.h
index b65d93c80e006d6e99c837e840eb38cb3a71055d..147081532b0f71d13f61d862d7df172890f8486a 100644
--- a/public/web/WebDOMResourceProgressEvent.h
+++ b/public/platform/WebExternalBitmap.h
@@ -28,21 +28,27 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebDOMResourceProgressEvent_h
-#define WebDOMResourceProgressEvent_h
+#ifndef WebExternalBitmap_h
+#define WebExternalBitmap_h
-#include "WebDOMProgressEvent.h"
+#include "WebSize.h"
namespace WebKit {
-class WebString;
-
-class WebDOMResourceProgressEvent : public WebDOMProgressEvent {
+class WebExternalBitmap {
public:
- WebDOMResourceProgressEvent() { }
- WEBKIT_EXPORT WebDOMResourceProgressEvent(const WebString& type, bool lengthIsComputable, unsigned long long loaded, unsigned long long total, const WebString& url);
+ virtual WebSize size() = 0;
+
+ // Sets the size of the bitmap. This may reallocate the bitmap and
+ // invalidate the pointer returned from pixels if the size changes.
+ virtual void setSize(WebSize) = 0;
+
+ // Returns the pixels for the bitmap. The buffer that's returned will
+ // contain size().width * size().height * 4 bytes and will use Skia's byte
+ // order.
+ virtual uint8* pixels() = 0;
};
} // namespace WebKit
-#endif
+#endif // WebExternalBitmap_h
« no previous file with comments | « Tools/DumpRenderTree/chromium/TestRunner/src/TestPlugin.h ('k') | public/platform/WebExternalTextureLayerClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698