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

Side by Side Diff: gpu/command_buffer/service/stream_texture_manager_in_process_android.cc

Issue 632863002: Remove implicit conversions from scoped_refptr to T* in gpu/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
« 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/command_buffer/service/stream_texture_manager_in_process_android.h " 5 #include "gpu/command_buffer/service/stream_texture_manager_in_process_android.h "
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "gpu/command_buffer/service/texture_manager.h" 9 #include "gpu/command_buffer/service/texture_manager.h"
10 #include "ui/gfx/size.h" 10 #include "ui/gfx/size.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 GL_TEXTURE_EXTERNAL_OES, 130 GL_TEXTURE_EXTERNAL_OES,
131 0, 131 0,
132 GL_RGBA, 132 GL_RGBA,
133 size.width(), 133 size.width(),
134 size.height(), 134 size.height(),
135 1, 135 1,
136 0, 136 0,
137 GL_RGBA, 137 GL_RGBA,
138 GL_UNSIGNED_BYTE, 138 GL_UNSIGNED_BYTE,
139 true); 139 true);
140 texture_manager->SetLevelImage(texture, GL_TEXTURE_EXTERNAL_OES, 0, gl_image); 140 texture_manager->SetLevelImage(
141 texture, GL_TEXTURE_EXTERNAL_OES, 0, gl_image.get());
141 142
142 { 143 {
143 base::AutoLock lock(map_lock_); 144 base::AutoLock lock(map_lock_);
144 textures_[stream_id] = surface_texture; 145 textures_[stream_id] = surface_texture;
145 } 146 }
146 147
147 if (next_id_ == 0) 148 if (next_id_ == 0)
148 next_id_++; 149 next_id_++;
149 150
150 return stream_id; 151 return stream_id;
(...skipping 10 matching lines...) Expand all
161 StreamTextureManagerInProcess::GetSurfaceTexture(uint32 stream_id) { 162 StreamTextureManagerInProcess::GetSurfaceTexture(uint32 stream_id) {
162 base::AutoLock lock(map_lock_); 163 base::AutoLock lock(map_lock_);
163 TextureMap::const_iterator it = textures_.find(stream_id); 164 TextureMap::const_iterator it = textures_.find(stream_id);
164 if (it != textures_.end()) 165 if (it != textures_.end())
165 return it->second; 166 return it->second;
166 167
167 return NULL; 168 return NULL;
168 } 169 }
169 170
170 } // namespace gpu 171 } // namespace 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