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