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

Side by Side Diff: chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc

Issue 4320003: Disable accelerated 2D canvas on DX9 by not initializing GraphicsContext3D if it can be lost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if defined(ENABLE_GPU) 5 #if defined(ENABLE_GPU)
6 6
7 #include "chrome/renderer/webgraphicscontext3d_command_buffer_impl.h" 7 #include "chrome/renderer/webgraphicscontext3d_command_buffer_impl.h"
8 8
9 #include <GLES2/gl2.h> 9 #include <GLES2/gl2.h>
10 #ifndef GL_GLEXT_PROTOTYPES 10 #ifndef GL_GLEXT_PROTOTYPES
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 const int sample_buffers = attributes.antialias ? 1 : 0; 80 const int sample_buffers = attributes.antialias ? 1 : 0;
81 const int32 attribs[] = { 81 const int32 attribs[] = {
82 ggl::GGL_ALPHA_SIZE, alpha_size, 82 ggl::GGL_ALPHA_SIZE, alpha_size,
83 ggl::GGL_DEPTH_SIZE, depth_size, 83 ggl::GGL_DEPTH_SIZE, depth_size,
84 ggl::GGL_STENCIL_SIZE, stencil_size, 84 ggl::GGL_STENCIL_SIZE, stencil_size,
85 ggl::GGL_SAMPLES, samples, 85 ggl::GGL_SAMPLES, samples,
86 ggl::GGL_SAMPLE_BUFFERS, sample_buffers, 86 ggl::GGL_SAMPLE_BUFFERS, sample_buffers,
87 ggl::GGL_NONE, 87 ggl::GGL_NONE,
88 }; 88 };
89 89
90 if (attributes.canRecoverFromContextLoss == false) {
jamesr 2010/11/10 21:22:01 nit: if (!attributes.canRecoverFromContextLoss)
91 GPUInfo gpu_info = host->gpu_info();
92 if (gpu_info.can_lose_context())
93 return false;
94 }
95
90 if (render_directly_to_web_view) { 96 if (render_directly_to_web_view) {
91 RenderView* renderview = RenderView::FromWebView(web_view); 97 RenderView* renderview = RenderView::FromWebView(web_view);
92 if (!renderview) 98 if (!renderview)
93 return false; 99 return false;
94 gfx::NativeViewId view_id; 100 gfx::NativeViewId view_id;
95 #if !defined(OS_MACOSX) 101 #if !defined(OS_MACOSX)
96 view_id = renderview->host_window(); 102 view_id = renderview->host_window();
97 #else 103 #else
98 plugin_handle_ = renderview->AllocateFakePluginWindowHandle( 104 plugin_handle_ = renderview->AllocateFakePluginWindowHandle(
99 /*opaque=*/true, /*root=*/true); 105 /*opaque=*/true, /*root=*/true);
(...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after
1021 } 1027 }
1022 1028
1023 void WebGraphicsContext3DCommandBufferImpl::copyTextureToCompositor( 1029 void WebGraphicsContext3DCommandBufferImpl::copyTextureToCompositor(
1024 unsigned texture, unsigned parentTexture) { 1030 unsigned texture, unsigned parentTexture) {
1025 makeContextCurrent(); 1031 makeContextCurrent();
1026 glCopyTextureToParentTexture(texture, parentTexture); 1032 glCopyTextureToParentTexture(texture, parentTexture);
1027 glFlush(); 1033 glFlush();
1028 } 1034 }
1029 1035
1030 #endif // defined(ENABLE_GPU) 1036 #endif // defined(ENABLE_GPU)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698