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

Unified Diff: webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc

Issue 221783002: Revert of gpu: Raise GL_OUT_OF_MEMORY when BeginQueryEXT fails to allocate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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
« no previous file with comments | « webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
diff --git a/webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc b/webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
index 992bcb4ee01b72b6a7b141d139f1272536bdda48..3c6d608e316e4a58a10475229a2258ae19277b7b 100644
--- a/webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
+++ b/webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
@@ -73,29 +73,20 @@
scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl>
WebGraphicsContext3DInProcessCommandBufferImpl::CreateViewContext(
const blink::WebGraphicsContext3D::Attributes& attributes,
- bool lose_context_when_out_of_memory,
gfx::AcceleratedWidget window) {
DCHECK_NE(gfx::GetGLImplementation(), gfx::kGLImplementationNone);
- bool is_offscreen = false;
+ return make_scoped_ptr(new WebGraphicsContext3DInProcessCommandBufferImpl(
+ scoped_ptr< ::gpu::GLInProcessContext>(), attributes, false, window));
+}
+
+// static
+scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl>
+WebGraphicsContext3DInProcessCommandBufferImpl::CreateOffscreenContext(
+ const blink::WebGraphicsContext3D::Attributes& attributes) {
return make_scoped_ptr(new WebGraphicsContext3DInProcessCommandBufferImpl(
scoped_ptr< ::gpu::GLInProcessContext>(),
attributes,
- lose_context_when_out_of_memory,
- is_offscreen,
- window));
-}
-
-// static
-scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl>
-WebGraphicsContext3DInProcessCommandBufferImpl::CreateOffscreenContext(
- const blink::WebGraphicsContext3D::Attributes& attributes,
- bool lose_context_when_out_of_memory) {
- bool is_offscreen = true;
- return make_scoped_ptr(new WebGraphicsContext3DInProcessCommandBufferImpl(
- scoped_ptr< ::gpu::GLInProcessContext>(),
- attributes,
- lose_context_when_out_of_memory,
- is_offscreen,
+ true,
gfx::kNullAcceleratedWidget));
}
@@ -103,13 +94,10 @@
WebGraphicsContext3DInProcessCommandBufferImpl::WrapContext(
scoped_ptr< ::gpu::GLInProcessContext> context,
const blink::WebGraphicsContext3D::Attributes& attributes) {
- bool lose_context_when_out_of_memory = false; // Not used.
- bool is_offscreen = true; // Not used.
return make_scoped_ptr(new WebGraphicsContext3DInProcessCommandBufferImpl(
context.Pass(),
attributes,
- lose_context_when_out_of_memory,
- is_offscreen,
+ true /* is_offscreen. Not used. */,
gfx::kNullAcceleratedWidget /* window. Not used. */));
}
@@ -117,7 +105,6 @@
WebGraphicsContext3DInProcessCommandBufferImpl(
scoped_ptr< ::gpu::GLInProcessContext> context,
const blink::WebGraphicsContext3D::Attributes& attributes,
- bool lose_context_when_out_of_memory,
bool is_offscreen,
gfx::AcceleratedWidget window)
: is_offscreen_(is_offscreen),
@@ -129,8 +116,8 @@
context_lost_callback_(NULL),
context_lost_reason_(GL_NO_ERROR),
attributes_(attributes),
- lose_context_when_out_of_memory_(lose_context_when_out_of_memory),
- flush_id_(0) {}
+ flush_id_(0) {
+}
WebGraphicsContext3DInProcessCommandBufferImpl::
~WebGraphicsContext3DInProcessCommandBufferImpl() {
@@ -168,9 +155,7 @@
gfx::GpuPreference gpu_preference = gfx::PreferDiscreteGpu;
::gpu::GLInProcessContextAttribs attrib_struct;
- ConvertAttributes(attributes_, &attrib_struct);
- attrib_struct.lose_context_when_out_of_memory =
- lose_context_when_out_of_memory_;
+ ConvertAttributes(attributes_, &attrib_struct),
context_.reset(GLInProcessContext::CreateContext(
is_offscreen_,
« no previous file with comments | « webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698