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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 if (fbo_id_) { | 189 if (fbo_id_) { |
190 glDeleteFramebuffersEXT(1, &fbo_id_); | 190 glDeleteFramebuffersEXT(1, &fbo_id_); |
191 CHECK_GL_ERROR(); | 191 CHECK_GL_ERROR(); |
192 fbo_id_ = 0; | 192 fbo_id_ = 0; |
193 } | 193 } |
194 | 194 |
195 stub_destroyed_ = true; | 195 stub_destroyed_ = true; |
196 } | 196 } |
197 | 197 |
198 void TextureImageTransportSurface::SetLatencyInfo( | 198 void TextureImageTransportSurface::SetLatencyInfo( |
199 const cc::LatencyInfo& latency_info) { | 199 const ui::LatencyInfo& latency_info) { |
200 latency_info_ = latency_info; | 200 latency_info_ = latency_info; |
201 } | 201 } |
202 | 202 |
203 bool TextureImageTransportSurface::SwapBuffers() { | 203 bool TextureImageTransportSurface::SwapBuffers() { |
204 DCHECK(backbuffer_suggested_allocation_); | 204 DCHECK(backbuffer_suggested_allocation_); |
205 | 205 |
206 if (!frontbuffer_suggested_allocation_) | 206 if (!frontbuffer_suggested_allocation_) |
207 return true; | 207 return true; |
208 | 208 |
209 if (!backbuffer_->service_id()) { | 209 if (!backbuffer_->service_id()) { |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 GL_TEXTURE_2D, | 499 GL_TEXTURE_2D, |
500 mailbox_name_, | 500 mailbox_name_, |
501 backbuffer_.release(), | 501 backbuffer_.release(), |
502 NULL); | 502 NULL); |
503 DCHECK(success); | 503 DCHECK(success); |
504 mailbox_name_ = MailboxName(); | 504 mailbox_name_ = MailboxName(); |
505 backbuffer_.reset(CreateTextureDefinition(gfx::Size(), 0)); | 505 backbuffer_.reset(CreateTextureDefinition(gfx::Size(), 0)); |
506 } | 506 } |
507 | 507 |
508 } // namespace content | 508 } // namespace content |
OLD | NEW |