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/common/gpu/texture_image_transport_surface.h" | 5 #include "content/common/gpu/texture_image_transport_surface.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 } | 168 } |
169 | 169 |
170 return true; | 170 return true; |
171 } | 171 } |
172 | 172 |
173 unsigned int TextureImageTransportSurface::GetBackingFrameBufferObject() { | 173 unsigned int TextureImageTransportSurface::GetBackingFrameBufferObject() { |
174 return fbo_id_; | 174 return fbo_id_; |
175 } | 175 } |
176 | 176 |
177 void TextureImageTransportSurface::SetBackbufferAllocation(bool allocation) { | 177 void TextureImageTransportSurface::SetBackbufferAllocation(bool allocation) { |
| 178 DCHECK(!is_swap_buffers_pending_); |
178 if (backbuffer_suggested_allocation_ == allocation) | 179 if (backbuffer_suggested_allocation_ == allocation) |
179 return; | 180 return; |
180 backbuffer_suggested_allocation_ = allocation; | 181 backbuffer_suggested_allocation_ = allocation; |
181 | 182 |
182 if (!helper_->MakeCurrent()) | 183 if (!helper_->MakeCurrent()) |
183 return; | 184 return; |
184 | 185 |
185 if (backbuffer_suggested_allocation_) { | 186 if (backbuffer_suggested_allocation_) { |
186 DCHECK(!textures_[back()].info->service_id() || | 187 DCHECK(!textures_[back()].info->service_id() || |
187 !textures_[back()].sent_to_client); | 188 !textures_[back()].sent_to_client); |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
561 if (!texture.sent_to_client) | 562 if (!texture.sent_to_client) |
562 continue; | 563 continue; |
563 GpuHostMsg_AcceleratedSurfaceRelease_Params params; | 564 GpuHostMsg_AcceleratedSurfaceRelease_Params params; |
564 params.identifier = texture.client_id; | 565 params.identifier = texture.client_id; |
565 helper_->SendAcceleratedSurfaceRelease(params); | 566 helper_->SendAcceleratedSurfaceRelease(params); |
566 } | 567 } |
567 parent_stub_ = NULL; | 568 parent_stub_ = NULL; |
568 } | 569 } |
569 | 570 |
570 } // namespace content | 571 } // namespace content |
OLD | NEW |