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

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

Issue 162523002: Fix video in android webview (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
« 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/in_process_command_buffer.h" 5 #include "gpu/command_buffer/service/in_process_command_buffer.h"
6 6
7 #include <queue> 7 #include <queue>
8 #include <utility> 8 #include <utility>
9 9
10 #include <GLES2/gl2.h> 10 #include <GLES2/gl2.h>
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 uint32 InProcessCommandBuffer::CreateStreamTexture(uint32 texture_id) { 699 uint32 InProcessCommandBuffer::CreateStreamTexture(uint32 texture_id) {
700 base::WaitableEvent completion(true, false); 700 base::WaitableEvent completion(true, false);
701 uint32 stream_id = 0; 701 uint32 stream_id = 0;
702 base::Callback<uint32(void)> task = 702 base::Callback<uint32(void)> task =
703 base::Bind(&InProcessCommandBuffer::CreateStreamTextureOnGpuThread, 703 base::Bind(&InProcessCommandBuffer::CreateStreamTextureOnGpuThread,
704 base::Unretained(this), 704 base::Unretained(this),
705 texture_id); 705 texture_id);
706 QueueTask( 706 QueueTask(
707 base::Bind(&RunTaskWithResult<uint32>, task, &stream_id, &completion)); 707 base::Bind(&RunTaskWithResult<uint32>, task, &stream_id, &completion));
708 completion.Wait(); 708 completion.Wait();
709 return 0; 709 return stream_id;
710 } 710 }
711 711
712 uint32 InProcessCommandBuffer::CreateStreamTextureOnGpuThread( 712 uint32 InProcessCommandBuffer::CreateStreamTextureOnGpuThread(
713 uint32 client_texture_id) { 713 uint32 client_texture_id) {
714 #if defined(OS_ANDROID) 714 #if defined(OS_ANDROID)
715 return stream_texture_manager_->CreateStreamTexture( 715 return stream_texture_manager_->CreateStreamTexture(
716 client_texture_id, decoder_->GetContextGroup()->texture_manager()); 716 client_texture_id, decoder_->GetContextGroup()->texture_manager());
717 #else 717 #else
718 return 0; 718 return 0;
719 #endif 719 #endif
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 g_gpu_queue.Get().RunTasks(); 800 g_gpu_queue.Get().RunTasks();
801 } 801 }
802 802
803 // static 803 // static
804 void InProcessCommandBuffer::SetGpuMemoryBufferFactory( 804 void InProcessCommandBuffer::SetGpuMemoryBufferFactory(
805 GpuMemoryBufferFactory* factory) { 805 GpuMemoryBufferFactory* factory) {
806 g_gpu_memory_buffer_factory = factory; 806 g_gpu_memory_buffer_factory = factory;
807 } 807 }
808 808
809 } // namespace gpu 809 } // 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