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

Side by Side Diff: content/renderer/media/android/stream_texture_factory_android_synchronous_impl.cc

Issue 63253002: Rename WebKit namespace to blink (part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 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 "content/renderer/media/android/stream_texture_factory_android_synchron ous_impl.h" 5 #include "content/renderer/media/android/stream_texture_factory_android_synchron ous_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 player_id); 147 player_id);
148 } 148 }
149 } 149 }
150 150
151 unsigned StreamTextureFactorySynchronousImpl::CreateStreamTexture( 151 unsigned StreamTextureFactorySynchronousImpl::CreateStreamTexture(
152 unsigned texture_target, 152 unsigned texture_target,
153 unsigned* texture_id, 153 unsigned* texture_id,
154 gpu::Mailbox* texture_mailbox, 154 gpu::Mailbox* texture_mailbox,
155 unsigned* texture_mailbox_sync_point) { 155 unsigned* texture_mailbox_sync_point) {
156 DCHECK(context_provider_); 156 DCHECK(context_provider_);
157 WebKit::WebGraphicsContext3D* context = context_provider_->Context3d(); 157 blink::WebGraphicsContext3D* context = context_provider_->Context3d();
158 unsigned stream_id = 0; 158 unsigned stream_id = 0;
159 if (context->makeContextCurrent()) { 159 if (context->makeContextCurrent()) {
160 *texture_id = context->createTexture(); 160 *texture_id = context->createTexture();
161 stream_id = context->createStreamTextureCHROMIUM(*texture_id); 161 stream_id = context->createStreamTextureCHROMIUM(*texture_id);
162 162
163 context->genMailboxCHROMIUM(texture_mailbox->name); 163 context->genMailboxCHROMIUM(texture_mailbox->name);
164 context->bindTexture(texture_target, *texture_id); 164 context->bindTexture(texture_target, *texture_id);
165 context->produceTextureCHROMIUM(texture_target, texture_mailbox->name); 165 context->produceTextureCHROMIUM(texture_target, texture_mailbox->name);
166 166
167 context->flush(); 167 context->flush();
168 *texture_mailbox_sync_point = context->insertSyncPoint(); 168 *texture_mailbox_sync_point = context->insertSyncPoint();
169 } 169 }
170 return stream_id; 170 return stream_id;
171 } 171 }
172 172
173 void StreamTextureFactorySynchronousImpl::DestroyStreamTexture( 173 void StreamTextureFactorySynchronousImpl::DestroyStreamTexture(
174 unsigned texture_id) { 174 unsigned texture_id) {
175 DCHECK(context_provider_); 175 DCHECK(context_provider_);
176 WebKit::WebGraphicsContext3D* context = context_provider_->Context3d(); 176 blink::WebGraphicsContext3D* context = context_provider_->Context3d();
177 if (context->makeContextCurrent()) { 177 if (context->makeContextCurrent()) {
178 context->destroyStreamTextureCHROMIUM(texture_id); 178 context->destroyStreamTextureCHROMIUM(texture_id);
179 context->deleteTexture(texture_id); 179 context->deleteTexture(texture_id);
180 context->flush(); 180 context->flush();
181 } 181 }
182 } 182 }
183 183
184 void StreamTextureFactorySynchronousImpl::SetStreamTextureSize( 184 void StreamTextureFactorySynchronousImpl::SetStreamTextureSize(
185 int32 stream_id, 185 int32 stream_id,
186 const gfx::Size& size) {} 186 const gfx::Size& size) {}
187 187
188 WebKit::WebGraphicsContext3D* 188 blink::WebGraphicsContext3D*
189 StreamTextureFactorySynchronousImpl::Context3d() { 189 StreamTextureFactorySynchronousImpl::Context3d() {
190 DCHECK(context_provider_); 190 DCHECK(context_provider_);
191 return context_provider_->Context3d(); 191 return context_provider_->Context3d();
192 } 192 }
193 193
194 } // namespace content 194 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698