summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorscheib@google.com <scheib@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-10 23:53:39 +0000
committerscheib@google.com <scheib@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-10 23:53:39 +0000
commit24b46c41c910b4981594b2488eb319ba4acd3bf6 (patch)
tree9e4e047c27a826f8ea58028a57c9364d5290ed5a
parentd0b2afe6eeae8b04bc2b21b6503a2aaa5c9b38ab (diff)
downloadchromium_src-24b46c41c910b4981594b2488eb319ba4acd3bf6.zip
chromium_src-24b46c41c910b4981594b2488eb319ba4acd3bf6.tar.gz
chromium_src-24b46c41c910b4981594b2488eb319ba4acd3bf6.tar.bz2
Disable accelerated 2D canvas on DX9 by not initializing GraphicsContext3D if it can be lost.
BUG=52689 TEST=http://www.corp.google.com/~scheib/no_crawl/canvas2dtests/minupload1.html. Jitters/popping in texture are a side-effect of NON GPU accelerated rendering. Smooth rotation will occur only with GPU acceleration. On Windows XP even with --enable-accelerated-2d-canvas, only software rendering should appear. On Vista and later the flag should result in smooth rotation. Review URL: http://codereview.chromium.org/4320003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65732 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc b/chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc
index f8725af..484fb5a 100644
--- a/chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc
+++ b/chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc
@@ -89,6 +89,12 @@ bool WebGraphicsContext3DCommandBufferImpl::initialize(
ggl::GGL_NONE,
};
+ if (attributes.canRecoverFromContextLoss == false) {
+ GPUInfo gpu_info = host->gpu_info();
+ if (gpu_info.can_lose_context())
+ return false;
+ }
+
if (render_directly_to_web_view) {
RenderView* renderview = RenderView::FromWebView(web_view);
if (!renderview)