OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/pepper/ppb_graphics_3d_impl.h" | 5 #include "content/renderer/pepper/ppb_graphics_3d_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/feature_list.h" | 9 #include "base/feature_list.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 gpu::CommandBuffer::State PPB_Graphics3D_Impl::WaitForGetOffsetInRange( | 114 gpu::CommandBuffer::State PPB_Graphics3D_Impl::WaitForGetOffsetInRange( |
115 int32_t start, | 115 int32_t start, |
116 int32_t end) { | 116 int32_t end) { |
117 return GetCommandBuffer()->WaitForGetOffsetInRange(start, end); | 117 return GetCommandBuffer()->WaitForGetOffsetInRange(start, end); |
118 } | 118 } |
119 | 119 |
120 void PPB_Graphics3D_Impl::EnsureWorkVisible() { | 120 void PPB_Graphics3D_Impl::EnsureWorkVisible() { |
121 command_buffer_->EnsureWorkVisible(); | 121 command_buffer_->EnsureWorkVisible(); |
122 } | 122 } |
123 | 123 |
| 124 void PPB_Graphics3D_Impl::EnsureWorkVisibleAsync() {} |
| 125 |
124 void PPB_Graphics3D_Impl::TakeFrontBuffer() { | 126 void PPB_Graphics3D_Impl::TakeFrontBuffer() { |
125 if (!taken_front_buffer_.IsZero()) { | 127 if (!taken_front_buffer_.IsZero()) { |
126 DLOG(ERROR) | 128 DLOG(ERROR) |
127 << "TakeFrontBuffer should only be called once before DoSwapBuffers"; | 129 << "TakeFrontBuffer should only be called once before DoSwapBuffers"; |
128 return; | 130 return; |
129 } | 131 } |
130 taken_front_buffer_ = GenerateMailbox(); | 132 taken_front_buffer_ = GenerateMailbox(); |
131 command_buffer_->TakeFrontBuffer(taken_front_buffer_); | 133 command_buffer_->TakeFrontBuffer(taken_front_buffer_); |
132 } | 134 } |
133 | 135 |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 if (!mailboxes_to_reuse_.empty()) { | 354 if (!mailboxes_to_reuse_.empty()) { |
353 gpu::Mailbox mailbox = mailboxes_to_reuse_.back(); | 355 gpu::Mailbox mailbox = mailboxes_to_reuse_.back(); |
354 mailboxes_to_reuse_.pop_back(); | 356 mailboxes_to_reuse_.pop_back(); |
355 return mailbox; | 357 return mailbox; |
356 } | 358 } |
357 | 359 |
358 return gpu::Mailbox::Generate(); | 360 return gpu::Mailbox::Generate(); |
359 } | 361 } |
360 | 362 |
361 } // namespace content | 363 } // namespace content |
OLD | NEW |