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

Side by Side Diff: content/common/gpu/image_transport_surface.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 #if defined(ENABLE_GPU) 5 #if defined(ENABLE_GPU)
6 6
7 #include "content/common/gpu/image_transport_surface.h" 7 #include "content/common/gpu/image_transport_surface.h"
8 8
9 #include "base/callback.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h"
10 #include "content/common/gpu/gpu_channel.h" 11 #include "content/common/gpu/gpu_channel.h"
11 #include "content/common/gpu/gpu_channel_manager.h" 12 #include "content/common/gpu/gpu_channel_manager.h"
12 #include "content/common/gpu/gpu_command_buffer_stub.h" 13 #include "content/common/gpu/gpu_command_buffer_stub.h"
13 #include "content/common/gpu/gpu_messages.h" 14 #include "content/common/gpu/gpu_messages.h"
14 #include "gpu/command_buffer/service/gpu_scheduler.h" 15 #include "gpu/command_buffer/service/gpu_scheduler.h"
15 16
16 ImageTransportHelper::ImageTransportHelper(ImageTransportSurface* surface, 17 ImageTransportHelper::ImageTransportHelper(ImageTransportSurface* surface,
17 GpuChannelManager* manager, 18 GpuChannelManager* manager,
18 int32 render_view_id, 19 int32 render_view_id,
19 int32 renderer_id, 20 int32 renderer_id,
(...skipping 13 matching lines...) Expand all
33 manager_->RemoveRoute(route_id_); 34 manager_->RemoveRoute(route_id_);
34 } 35 }
35 36
36 bool ImageTransportHelper::Initialize() { 37 bool ImageTransportHelper::Initialize() {
37 gpu::gles2::GLES2Decoder* decoder = Decoder(); 38 gpu::gles2::GLES2Decoder* decoder = Decoder();
38 39
39 if (!decoder) 40 if (!decoder)
40 return false; 41 return false;
41 42
42 decoder->SetResizeCallback( 43 decoder->SetResizeCallback(
43 NewCallback(this, &ImageTransportHelper::Resize)); 44 base::Bind(&ImageTransportHelper::Resize, base::Unretained(this)));
44 45
45 return true; 46 return true;
46 } 47 }
47 48
48 void ImageTransportHelper::Destroy() { 49 void ImageTransportHelper::Destroy() {
49 } 50 }
50 51
51 bool ImageTransportHelper::OnMessageReceived(const IPC::Message& message) { 52 bool ImageTransportHelper::OnMessageReceived(const IPC::Message& message) {
52 bool handled = true; 53 bool handled = true;
53 IPC_BEGIN_MESSAGE_MAP(ImageTransportHelper, message) 54 IPC_BEGIN_MESSAGE_MAP(ImageTransportHelper, message)
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 140
140 GpuCommandBufferStub* stub = 141 GpuCommandBufferStub* stub =
141 channel->LookupCommandBuffer(command_buffer_id_); 142 channel->LookupCommandBuffer(command_buffer_id_);
142 if (!stub) 143 if (!stub)
143 return NULL; 144 return NULL;
144 145
145 return stub->decoder(); 146 return stub->decoder();
146 } 147 }
147 148
148 #endif // defined(ENABLE_GPU) 149 #endif // defined(ENABLE_GPU)
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_command_buffer_stub.cc ('k') | gpu/command_buffer/client/cmd_buffer_helper_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698