| 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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 mailbox_manager_->ProduceTexture(GL_TEXTURE_2D, back_mailbox_, texture); | 390 mailbox_manager_->ProduceTexture(GL_TEXTURE_2D, back_mailbox_, texture); |
| 391 } | 391 } |
| 392 | 392 |
| 393 { | 393 { |
| 394 gfx::ScopedTextureBinder texture_binder(GL_TEXTURE_2D, | 394 gfx::ScopedTextureBinder texture_binder(GL_TEXTURE_2D, |
| 395 backbuffer_->service_id()); | 395 backbuffer_->service_id()); |
| 396 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, | 396 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, |
| 397 current_size_.width(), current_size_.height(), 0, | 397 current_size_.width(), current_size_.height(), 0, |
| 398 GL_RGBA, GL_UNSIGNED_BYTE, NULL); | 398 GL_RGBA, GL_UNSIGNED_BYTE, NULL); |
| 399 gpu::gles2::ErrorState* error_state = decoder->GetErrorState(); | 399 gpu::gles2::ErrorState* error_state = decoder->GetErrorState(); |
| 400 texture_manager->SetParameter("Backbuffer", | 400 texture_manager->SetParameteri("Backbuffer", |
| 401 error_state, | 401 error_state, |
| 402 backbuffer_.get(), | 402 backbuffer_.get(), |
| 403 GL_TEXTURE_MIN_FILTER, | 403 GL_TEXTURE_MIN_FILTER, |
| 404 GL_LINEAR); | 404 GL_LINEAR); |
| 405 texture_manager->SetParameter("Backbuffer", | 405 texture_manager->SetParameteri("Backbuffer", |
| 406 error_state, | 406 error_state, |
| 407 backbuffer_.get(), | 407 backbuffer_.get(), |
| 408 GL_TEXTURE_MAG_FILTER, | 408 GL_TEXTURE_MAG_FILTER, |
| 409 GL_LINEAR); | 409 GL_LINEAR); |
| 410 texture_manager->SetParameter("Backbuffer", | 410 texture_manager->SetParameteri("Backbuffer", |
| 411 error_state, | 411 error_state, |
| 412 backbuffer_.get(), | 412 backbuffer_.get(), |
| 413 GL_TEXTURE_WRAP_S, | 413 GL_TEXTURE_WRAP_S, |
| 414 GL_CLAMP_TO_EDGE); | 414 GL_CLAMP_TO_EDGE); |
| 415 texture_manager->SetParameter("Backbuffer", | 415 texture_manager->SetParameteri("Backbuffer", |
| 416 error_state, | 416 error_state, |
| 417 backbuffer_.get(), | 417 backbuffer_.get(), |
| 418 GL_TEXTURE_WRAP_T, | 418 GL_TEXTURE_WRAP_T, |
| 419 GL_CLAMP_TO_EDGE); | 419 GL_CLAMP_TO_EDGE); |
| 420 texture_manager->SetLevelInfo(backbuffer_.get(), | 420 texture_manager->SetLevelInfo(backbuffer_.get(), |
| 421 GL_TEXTURE_2D, | 421 GL_TEXTURE_2D, |
| 422 0, | 422 0, |
| 423 GL_RGBA, | 423 GL_RGBA, |
| 424 current_size_.width(), | 424 current_size_.width(), |
| 425 current_size_.height(), | 425 current_size_.height(), |
| 426 1, | 426 1, |
| 427 0, | 427 0, |
| 428 GL_RGBA, | 428 GL_RGBA, |
| 429 GL_UNSIGNED_BYTE, | 429 GL_UNSIGNED_BYTE, |
| (...skipping 18 matching lines...) Expand all Loading... |
| 448 | 448 |
| 449 #ifndef NDEBUG | 449 #ifndef NDEBUG |
| 450 GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER); | 450 GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER); |
| 451 if (status != GL_FRAMEBUFFER_COMPLETE) { | 451 if (status != GL_FRAMEBUFFER_COMPLETE) { |
| 452 DLOG(FATAL) << "Framebuffer incomplete: " << status; | 452 DLOG(FATAL) << "Framebuffer incomplete: " << status; |
| 453 } | 453 } |
| 454 #endif | 454 #endif |
| 455 } | 455 } |
| 456 | 456 |
| 457 } // namespace content | 457 } // namespace content |
| OLD | NEW |