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

Unified Diff: gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.cc

Issue 1864373002: Remove unused features for in-process GL contexts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: inproclost: callback Created 4 years, 8 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: gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.cc
diff --git a/gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.cc b/gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.cc
index f8680781beff9246f84df2bf3e7f8de26f47858a..9a2a59689c6dba931b46885ea99c428cb8db0495 100644
--- a/gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.cc
+++ b/gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.cc
@@ -34,12 +34,11 @@ namespace gpu_blink {
// static
scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl>
WebGraphicsContext3DInProcessCommandBufferImpl::CreateOffscreenContext(
- const gpu::gles2::ContextCreationAttribHelper& attributes,
- bool share_resources) {
+ const gpu::gles2::ContextCreationAttribHelper& attributes) {
bool is_offscreen = true;
return make_scoped_ptr(new WebGraphicsContext3DInProcessCommandBufferImpl(
- scoped_ptr<::gpu::GLInProcessContext>(), attributes, share_resources,
- is_offscreen, gfx::kNullAcceleratedWidget));
+ scoped_ptr<::gpu::GLInProcessContext>(), attributes, is_offscreen,
+ gfx::kNullAcceleratedWidget));
}
scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl>
@@ -47,21 +46,18 @@ WebGraphicsContext3DInProcessCommandBufferImpl::WrapContext(
scoped_ptr<::gpu::GLInProcessContext> context,
const gpu::gles2::ContextCreationAttribHelper& attributes) {
bool is_offscreen = true; // Not used.
- bool share_resources = false; // Not used.
gfx::AcceleratedWidget window = gfx::kNullAcceleratedWidget; // Not used.
return make_scoped_ptr(new WebGraphicsContext3DInProcessCommandBufferImpl(
- std::move(context), attributes, share_resources, is_offscreen, window));
+ std::move(context), attributes, is_offscreen, window));
}
WebGraphicsContext3DInProcessCommandBufferImpl::
WebGraphicsContext3DInProcessCommandBufferImpl(
scoped_ptr<::gpu::GLInProcessContext> context,
const gpu::gles2::ContextCreationAttribHelper& attributes,
- bool share_resources,
bool is_offscreen,
gfx::AcceleratedWidget window)
: attributes_(attributes),
- share_resources_(share_resources),
is_offscreen_(is_offscreen),
window_(window),
context_(std::move(context)) {}
@@ -92,16 +88,11 @@ bool WebGraphicsContext3DInProcessCommandBufferImpl::MaybeInitializeGL() {
NULL, /* service */
NULL, /* surface */
is_offscreen_, window_, gfx::Size(1, 1), NULL, /* share_context */
- share_resources_, attributes_, gpu_preference,
+ attributes_, gpu_preference,
::gpu::GLInProcessContextSharedMemoryLimits(), nullptr, nullptr));
}
- if (context_) {
- base::Closure context_lost_callback = base::Bind(
- &WebGraphicsContext3DInProcessCommandBufferImpl::OnContextLost,
- base::Unretained(this));
- context_->SetContextLostCallback(context_lost_callback);
- } else {
+ if (!context_) {
initialize_failed_ = true;
return false;
}
@@ -134,10 +125,4 @@ WebGraphicsContext3DInProcessCommandBufferImpl::GetContextSupport() {
return real_gl_;
}
-void WebGraphicsContext3DInProcessCommandBufferImpl::OnContextLost() {
- if (context_lost_callback_) {
- context_lost_callback_->onContextLost();
- }
-}
-
} // namespace gpu_blink

Powered by Google App Engine
This is Rietveld 408576698