OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "mojo/gles2/command_buffer_client_impl.h" | 5 #include "mojo/gles2/command_buffer_client_impl.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/process/process_handle.h" | 10 #include "base/process/process_handle.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 TryUpdateState(); | 84 TryUpdateState(); |
85 while (!InRange(start, end, last_state_.token) && | 85 while (!InRange(start, end, last_state_.token) && |
86 last_state_.error == gpu::error::kNoError) { | 86 last_state_.error == gpu::error::kNoError) { |
87 MakeProgressAndUpdateState(); | 87 MakeProgressAndUpdateState(); |
88 TryUpdateState(); | 88 TryUpdateState(); |
89 } | 89 } |
90 } | 90 } |
91 | 91 |
92 void CommandBufferClientImpl::WaitForGetOffsetInRange(int32 start, int32 end) { | 92 void CommandBufferClientImpl::WaitForGetOffsetInRange(int32 start, int32 end) { |
93 TryUpdateState(); | 93 TryUpdateState(); |
94 while (!InRange(start, end, last_state_.token) && | 94 while (!InRange(start, end, last_state_.get_offset) && |
95 last_state_.error == gpu::error::kNoError) { | 95 last_state_.error == gpu::error::kNoError) { |
96 MakeProgressAndUpdateState(); | 96 MakeProgressAndUpdateState(); |
97 TryUpdateState(); | 97 TryUpdateState(); |
98 } | 98 } |
99 } | 99 } |
100 | 100 |
101 void CommandBufferClientImpl::SetGetBuffer(int32 shm_id) { | 101 void CommandBufferClientImpl::SetGetBuffer(int32 shm_id) { |
102 command_buffer_->SetGetBuffer(shm_id); | 102 command_buffer_->SetGetBuffer(shm_id); |
103 last_put_offset_ = -1; | 103 last_put_offset_ = -1; |
104 } | 104 } |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 return; | 276 return; |
277 } | 277 } |
278 } | 278 } |
279 | 279 |
280 void CommandBufferClientImpl::DrawAnimationFrame() { | 280 void CommandBufferClientImpl::DrawAnimationFrame() { |
281 delegate_->DrawAnimationFrame(); | 281 delegate_->DrawAnimationFrame(); |
282 } | 282 } |
283 | 283 |
284 } // namespace gles2 | 284 } // namespace gles2 |
285 } // namespace mojo | 285 } // namespace mojo |
OLD | NEW |