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

Side by Side Diff: gpu/gles2_conform_support/egl/display.cc

Issue 8586048: base::Bind() conversion for remaining GPU files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "gpu/gles2_conform_support/egl/display.h" 5 #include "gpu/gles2_conform_support/egl/display.h"
6 6
7 #include <vector> 7 #include <vector>
8 #include "base/bind.h"
9 #include "base/bind_helpers.h"
8 #include "gpu/command_buffer/client/gles2_lib.h" 10 #include "gpu/command_buffer/client/gles2_lib.h"
9 #include "gpu/command_buffer/service/context_group.h" 11 #include "gpu/command_buffer/service/context_group.h"
10 #include "gpu/gles2_conform_support/egl/config.h" 12 #include "gpu/gles2_conform_support/egl/config.h"
11 #include "gpu/gles2_conform_support/egl/surface.h" 13 #include "gpu/gles2_conform_support/egl/surface.h"
12 14
13 namespace { 15 namespace {
14 const int32 kCommandBufferSize = 1024 * 1024; 16 const int32 kCommandBufferSize = 1024 * 1024;
15 const int32 kTransferBufferSize = 512 * 1024; 17 const int32 kTransferBufferSize = 512 * 1024;
16 } 18 }
17 19
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 if (!decoder_->Initialize(gl_surface_.get(), 129 if (!decoder_->Initialize(gl_surface_.get(),
128 gl_context_.get(), 130 gl_context_.get(),
129 gfx::Size(), 131 gfx::Size(),
130 gpu::gles2::DisallowedFeatures(), 132 gpu::gles2::DisallowedFeatures(),
131 NULL, 133 NULL,
132 attribs)) { 134 attribs)) {
133 return EGL_NO_SURFACE; 135 return EGL_NO_SURFACE;
134 } 136 }
135 137
136 command_buffer_->SetPutOffsetChangeCallback( 138 command_buffer_->SetPutOffsetChangeCallback(
137 NewCallback(gpu_scheduler_.get(), &gpu::GpuScheduler::PutChanged)); 139 base::Bind(&gpu::GpuScheduler::PutChanged,
140 base::Unretained(gpu_scheduler_.get())));
138 141
139 surface_.reset(new Surface(win)); 142 surface_.reset(new Surface(win));
140 143
141 return surface_.get(); 144 return surface_.get();
142 } 145 }
143 146
144 void Display::DestroySurface(EGLSurface surface) { 147 void Display::DestroySurface(EGLSurface surface) {
145 DCHECK(IsValidSurface(surface)); 148 DCHECK(IsValidSurface(surface));
146 gpu_scheduler_.reset(); 149 gpu_scheduler_.reset();
147 decoder_.reset(); 150 decoder_.reset();
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 } else { 200 } else {
198 DCHECK(IsValidSurface(draw)); 201 DCHECK(IsValidSurface(draw));
199 DCHECK(IsValidSurface(read)); 202 DCHECK(IsValidSurface(read));
200 DCHECK(IsValidContext(ctx)); 203 DCHECK(IsValidContext(ctx));
201 gles2::SetGLContext(context_.get()); 204 gles2::SetGLContext(context_.get());
202 } 205 }
203 return true; 206 return true;
204 } 207 }
205 208
206 } // namespace egl 209 } // namespace egl
OLDNEW
« no previous file with comments | « gpu/demos/framework/window.cc ('k') | webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698