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

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

Issue 896723008: Add OrderingBarrierCHROMIUM API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed nits. Created 5 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
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 <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 if (last_put_offset_ == put_offset) 624 if (last_put_offset_ == put_offset)
625 return; 625 return;
626 626
627 last_put_offset_ = put_offset; 627 last_put_offset_ = put_offset;
628 base::Closure task = base::Bind(&InProcessCommandBuffer::FlushOnGpuThread, 628 base::Closure task = base::Bind(&InProcessCommandBuffer::FlushOnGpuThread,
629 gpu_thread_weak_ptr_, 629 gpu_thread_weak_ptr_,
630 put_offset); 630 put_offset);
631 QueueTask(task); 631 QueueTask(task);
632 } 632 }
633 633
634 void InProcessCommandBuffer::OrderingBarrier(int32 put_offset) {
635 Flush(put_offset);
636 }
637
634 void InProcessCommandBuffer::WaitForTokenInRange(int32 start, int32 end) { 638 void InProcessCommandBuffer::WaitForTokenInRange(int32 start, int32 end) {
635 CheckSequencedThread(); 639 CheckSequencedThread();
636 while (!InRange(start, end, GetLastToken()) && 640 while (!InRange(start, end, GetLastToken()) &&
637 last_state_.error == gpu::error::kNoError) 641 last_state_.error == gpu::error::kNoError)
638 flush_event_.Wait(); 642 flush_event_.Wait();
639 } 643 }
640 644
641 void InProcessCommandBuffer::WaitForGetOffsetInRange(int32 start, int32 end) { 645 void InProcessCommandBuffer::WaitForGetOffsetInRange(int32 start, int32 end) {
642 CheckSequencedThread(); 646 CheckSequencedThread();
643 647
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
957 961
958 #if defined(OS_ANDROID) 962 #if defined(OS_ANDROID)
959 scoped_refptr<gfx::SurfaceTexture> 963 scoped_refptr<gfx::SurfaceTexture>
960 InProcessCommandBuffer::GetSurfaceTexture(uint32 stream_id) { 964 InProcessCommandBuffer::GetSurfaceTexture(uint32 stream_id) {
961 DCHECK(stream_texture_manager_); 965 DCHECK(stream_texture_manager_);
962 return stream_texture_manager_->GetSurfaceTexture(stream_id); 966 return stream_texture_manager_->GetSurfaceTexture(stream_id);
963 } 967 }
964 #endif 968 #endif
965 969
966 } // namespace gpu 970 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/in_process_command_buffer.h ('k') | ppapi/proxy/ppapi_command_buffer_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698