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

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.cpp

Issue 1962413002: Implement transferToImageBitmap() in WebGLRenderingContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/webgl/WebGLRenderingContext.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.cpp b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.cpp
index cc46e806bbfa070435ca4cde303a74fd5a772a27..8d079724ee0ac5f9944b921479e903fc89799608 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.cpp
@@ -85,6 +85,9 @@ static bool shouldCreateContext(WebGraphicsContext3DProvider* contextProvider)
CanvasRenderingContext* WebGLRenderingContext::Factory::create(ScriptState* scriptState, OffscreenCanvas* offscreenCanvas, const CanvasContextCreationAttributes& attrs)
{
WebGLContextAttributes attributes = toWebGLContextAttributes(attrs);
+ // transferToImageBitmap calls paintRenderingResultsToImageData, which
+ // requires this bit to be false;
+ attributes.setPremultipliedAlpha(false);
Ken Russell (switch to Gerrit) 2016/05/10 23:11:42 I don't think it's legal to just set this all the
xidachen 2016/05/11 00:17:52 I did hesitate when I added this statement. The on
Ken Russell (switch to Gerrit) 2016/05/11 01:00:41 It's likely that that code path has never been tes
xidachen 2016/05/11 01:07:08 Yeah, it makes more sense to implement this using
OwnPtr<WebGraphicsContext3DProvider> contextProvider(createWebGraphicsContext3DProvider(scriptState, attributes, 1));
if (!shouldCreateContext(contextProvider.get()))
return nullptr;
@@ -147,8 +150,7 @@ void WebGLRenderingContext::setOffscreenCanvasGetContextResult(OffscreenRenderin
ImageBitmap* WebGLRenderingContext::transferToImageBitmap(ExceptionState& exceptionState)
{
- NOTIMPLEMENTED();
- return nullptr;
+ return transferToImageBitmapBase();
}
void WebGLRenderingContext::registerContextExtensions()

Powered by Google App Engine
This is Rietveld 408576698