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

Unified Diff: Source/modules/webgl/WebGLRenderingContextBase.cpp

Issue 1307143005: Make 2D canvas smarter about chosing whether or not to use GPU acceleration (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 5 years, 3 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: Source/modules/webgl/WebGLRenderingContextBase.cpp
diff --git a/Source/modules/webgl/WebGLRenderingContextBase.cpp b/Source/modules/webgl/WebGLRenderingContextBase.cpp
index ec35ffe66e003d650d045794ccdd245a7077d029..5351486a49751ab578c3dbb923701ca462d7fc73 100644
--- a/Source/modules/webgl/WebGLRenderingContextBase.cpp
+++ b/Source/modules/webgl/WebGLRenderingContextBase.cpp
@@ -4290,7 +4290,7 @@ void WebGLRenderingContextBase::texImage2D(GLenum target, GLint level, GLenum in
bool isFloatType = type == GL_FLOAT || type == GL_HALF_FLOAT_OES;
if (!canvas->renderingContext() || !canvas->renderingContext()->isAccelerated() || isFloatType) {
// 2D canvas has only FrontBuffer.
- texImage2DImpl(target, level, internalformat, format, type, canvas->copiedImage(FrontBuffer).get(),
+ texImage2DImpl(target, level, internalformat, format, type, canvas->copiedImage(FrontBuffer, PreferAcceleration).get(),
WebGLImageConversion::HtmlDomCanvas, m_unpackFlipY, m_unpackPremultiplyAlpha);
return;
}
@@ -4538,7 +4538,7 @@ void WebGLRenderingContextBase::texSubImage2D(GLenum target, GLint level, GLint
bool isFloatType = type == GL_FLOAT || type == GL_HALF_FLOAT_OES;
if (!canvas->renderingContext() || !canvas->renderingContext()->isAccelerated() || isFloatType) {
// 2D canvas has only FrontBuffer.
- texSubImage2DImpl(target, level, xoffset, yoffset, format, type, canvas->copiedImage(FrontBuffer).get(),
+ texSubImage2DImpl(target, level, xoffset, yoffset, format, type, canvas->copiedImage(FrontBuffer, PreferAcceleration).get(),
WebGLImageConversion::HtmlDomCanvas, m_unpackFlipY, m_unpackPremultiplyAlpha);
return;
}

Powered by Google App Engine
This is Rietveld 408576698