| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #if defined(ENABLE_GPU) | 5 #if defined(ENABLE_GPU) |
| 6 | 6 |
| 7 #include "content/common/gpu/image_transport_surface.h" | 7 #include "content/common/gpu/image_transport_surface.h" |
| 8 | 8 |
| 9 #include "base/mac/scoped_cftyperef.h" | 9 #include "base/mac/scoped_cftyperef.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 | 194 |
| 195 if (made_current_) | 195 if (made_current_) |
| 196 return true; | 196 return true; |
| 197 | 197 |
| 198 glGenFramebuffersEXT(1, &fbo_id_); | 198 glGenFramebuffersEXT(1, &fbo_id_); |
| 199 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo_id_); | 199 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo_id_); |
| 200 OnResize(gfx::Size(1, 1)); | 200 OnResize(gfx::Size(1, 1)); |
| 201 | 201 |
| 202 GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT); | 202 GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT); |
| 203 if (status != GL_FRAMEBUFFER_COMPLETE) { | 203 if (status != GL_FRAMEBUFFER_COMPLETE) { |
| 204 LOG(ERROR) << "Framebuffer incomplete."; | 204 DLOG(ERROR) << "Framebuffer incomplete."; |
| 205 return false; | 205 return false; |
| 206 } | 206 } |
| 207 | 207 |
| 208 made_current_ = true; | 208 made_current_ = true; |
| 209 return true; | 209 return true; |
| 210 } | 210 } |
| 211 | 211 |
| 212 unsigned int IOSurfaceImageTransportSurface::GetBackingFrameBufferObject() { | 212 unsigned int IOSurfaceImageTransportSurface::GetBackingFrameBufferObject() { |
| 213 return fbo_id_; | 213 return fbo_id_; |
| 214 } | 214 } |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 bool TransportDIBImageTransportSurface::OnMakeCurrent(gfx::GLContext* context) { | 379 bool TransportDIBImageTransportSurface::OnMakeCurrent(gfx::GLContext* context) { |
| 380 if (made_current_) | 380 if (made_current_) |
| 381 return true; | 381 return true; |
| 382 | 382 |
| 383 glGenFramebuffersEXT(1, &fbo_id_); | 383 glGenFramebuffersEXT(1, &fbo_id_); |
| 384 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo_id_); | 384 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo_id_); |
| 385 OnResize(gfx::Size(1, 1)); | 385 OnResize(gfx::Size(1, 1)); |
| 386 | 386 |
| 387 GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT); | 387 GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT); |
| 388 if (status != GL_FRAMEBUFFER_COMPLETE) { | 388 if (status != GL_FRAMEBUFFER_COMPLETE) { |
| 389 LOG(ERROR) << "Framebuffer incomplete."; | 389 DLOG(ERROR) << "Framebuffer incomplete."; |
| 390 return false; | 390 return false; |
| 391 } | 391 } |
| 392 | 392 |
| 393 made_current_ = true; | 393 made_current_ = true; |
| 394 return true; | 394 return true; |
| 395 } | 395 } |
| 396 | 396 |
| 397 unsigned int TransportDIBImageTransportSurface::GetBackingFrameBufferObject() { | 397 unsigned int TransportDIBImageTransportSurface::GetBackingFrameBufferObject() { |
| 398 return fbo_id_; | 398 return fbo_id_; |
| 399 } | 399 } |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 NOTREACHED(); | 511 NOTREACHED(); |
| 512 return NULL; | 512 return NULL; |
| 513 } | 513 } |
| 514 if (surface->Initialize()) | 514 if (surface->Initialize()) |
| 515 return surface; | 515 return surface; |
| 516 else | 516 else |
| 517 return NULL; | 517 return NULL; |
| 518 } | 518 } |
| 519 | 519 |
| 520 #endif // defined(USE_GPU) | 520 #endif // defined(USE_GPU) |
| OLD | NEW |