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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 level_infos[0][0] = info; | 462 level_infos[0][0] = info; |
463 return new TextureDefinition( | 463 return new TextureDefinition( |
464 GL_TEXTURE_2D, | 464 GL_TEXTURE_2D, |
465 service_id, | 465 service_id, |
466 GL_LINEAR, | 466 GL_LINEAR, |
467 GL_LINEAR, | 467 GL_LINEAR, |
468 GL_CLAMP_TO_EDGE, | 468 GL_CLAMP_TO_EDGE, |
469 GL_CLAMP_TO_EDGE, | 469 GL_CLAMP_TO_EDGE, |
470 GL_NONE, | 470 GL_NONE, |
471 true, | 471 true, |
| 472 false, |
472 level_infos); | 473 level_infos); |
473 } | 474 } |
474 | 475 |
475 void TextureImageTransportSurface::ConsumeTexture() { | 476 void TextureImageTransportSurface::ConsumeTexture() { |
476 DCHECK(!backbuffer_->service_id()); | 477 DCHECK(!backbuffer_->service_id()); |
477 | 478 |
478 backbuffer_.reset(mailbox_manager_->ConsumeTexture( | 479 backbuffer_.reset(mailbox_manager_->ConsumeTexture( |
479 GL_TEXTURE_2D, mailbox_name_)); | 480 GL_TEXTURE_2D, mailbox_name_)); |
480 if (!backbuffer_) { | 481 if (!backbuffer_) { |
481 mailbox_name_ = MailboxName(); | 482 mailbox_name_ = MailboxName(); |
(...skipping 13 matching lines...) Expand all Loading... |
495 GL_TEXTURE_2D, | 496 GL_TEXTURE_2D, |
496 mailbox_name_, | 497 mailbox_name_, |
497 backbuffer_.release(), | 498 backbuffer_.release(), |
498 NULL); | 499 NULL); |
499 DCHECK(success); | 500 DCHECK(success); |
500 mailbox_name_ = MailboxName(); | 501 mailbox_name_ = MailboxName(); |
501 backbuffer_.reset(CreateTextureDefinition(gfx::Size(), 0)); | 502 backbuffer_.reset(CreateTextureDefinition(gfx::Size(), 0)); |
502 } | 503 } |
503 | 504 |
504 } // namespace content | 505 } // namespace content |
OLD | NEW |