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

Unified Diff: third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h

Issue 2868323003: Canvas2D on WebGL texture (Closed)
Patch Set: Created 3 years, 7 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: third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h
diff --git a/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h b/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h
index 23a04d958e3543112f4c5b8ce69e2e801acb4e59..8c768cbf4604dc80cc12b5b61252bbd28f145fd8 100644
--- a/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h
+++ b/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h
@@ -5,11 +5,12 @@
#ifndef OffscreenCanvasRenderingContext2D_h
#define OffscreenCanvasRenderingContext2D_h
+#include <memory>
#include "core/html/canvas/CanvasContextCreationAttributes.h"
#include "core/html/canvas/CanvasRenderingContext.h"
#include "core/html/canvas/CanvasRenderingContextFactory.h"
#include "modules/canvas2d/BaseRenderingContext2D.h"
-#include <memory>
+#include "modules/webgl/WebGLTexture.h"
namespace blink {
@@ -74,6 +75,8 @@ class MODULES_EXPORT OffscreenCanvasRenderingContext2D final
bool HasImageBuffer() const final;
ImageBuffer* GetImageBuffer() const final;
+ ImageBuffer* CreateTextureImageBuffer();
+
bool ParseColorOrCurrentColor(Color&, const String& color_string) const final;
PaintCanvas* DrawingCanvas() const final;
@@ -117,6 +120,9 @@ class MODULES_EXPORT OffscreenCanvasRenderingContext2D final
CanvasColorSpace ColorSpace() const override;
String ColorSpaceAsString() const override;
CanvasPixelFormat PixelFormat() const override;
+
+ Member<WebGLTexture> webgl_texture_;
+ std::unique_ptr<ImageBuffer> texture_image_buffer_;
};
DEFINE_TYPE_CASTS(OffscreenCanvasRenderingContext2D,

Powered by Google App Engine
This is Rietveld 408576698