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

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

Issue 2515413002: Revert workaround due to perf regression (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « third_party/WebKit/Source/core/frame/Settings.in ('k') | third_party/WebKit/Source/web/WebSettingsImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
index 896056569e8b63c617b29734b1aefaa53d39effb..3cdccdcae65eafae28a4856602bb7a1d2da46304 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
@@ -5033,16 +5033,9 @@ void WebGLRenderingContextBase::texImageHelperHTMLCanvasElement(
// float/integer/sRGB internal format.
// TODO(crbug.com/622958): relax the constrains if copyTextureCHROMIUM is
// upgraded to handle more formats.
- bool forceSoftwareReadbackFrom2DCanvas =
- this->canvas() && this->canvas()->document().settings() &&
- this->canvas()
- ->document()
- .settings()
- ->forceSoftwareReadbackFrom2DCanvas();
- CanvasRenderingContext* sourceContext = canvas->renderingContext();
- if (!sourceContext || !sourceContext->isAccelerated() ||
- !canUseTexImageByGPU(functionID, internalformat, type) ||
- (forceSoftwareReadbackFrom2DCanvas && sourceContext->is2d())) {
+ if (!canvas->renderingContext() ||
+ !canvas->renderingContext()->isAccelerated() ||
+ !canUseTexImageByGPU(functionID, internalformat, type)) {
// 2D canvas has only FrontBuffer.
texImageImpl(functionID, target, level, internalformat, xoffset, yoffset,
zoffset, format, type,
« no previous file with comments | « third_party/WebKit/Source/core/frame/Settings.in ('k') | third_party/WebKit/Source/web/WebSettingsImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698