| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/renderer/media/android/webmediaplayer_android.h" | 5 #include "content/renderer/media/android/webmediaplayer_android.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
| (...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 web_graphics_context->pixelStorei(GL_UNPACK_FLIP_Y_CHROMIUM, flip_y); | 465 web_graphics_context->pixelStorei(GL_UNPACK_FLIP_Y_CHROMIUM, flip_y); |
| 466 web_graphics_context->copyTextureCHROMIUM(GL_TEXTURE_2D, source_texture, | 466 web_graphics_context->copyTextureCHROMIUM(GL_TEXTURE_2D, source_texture, |
| 467 texture, level, internal_format, | 467 texture, level, internal_format, |
| 468 type); | 468 type); |
| 469 web_graphics_context->pixelStorei(GL_UNPACK_FLIP_Y_CHROMIUM, false); | 469 web_graphics_context->pixelStorei(GL_UNPACK_FLIP_Y_CHROMIUM, false); |
| 470 web_graphics_context->pixelStorei(GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM, | 470 web_graphics_context->pixelStorei(GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM, |
| 471 false); | 471 false); |
| 472 | 472 |
| 473 web_graphics_context->bindTexture(GL_TEXTURE_EXTERNAL_OES, 0); | 473 web_graphics_context->bindTexture(GL_TEXTURE_EXTERNAL_OES, 0); |
| 474 web_graphics_context->deleteTexture(source_texture); | 474 web_graphics_context->deleteTexture(source_texture); |
| 475 web_graphics_context->flush(); |
| 475 return true; | 476 return true; |
| 476 } | 477 } |
| 477 | 478 |
| 478 bool WebMediaPlayerAndroid::hasSingleSecurityOrigin() const { | 479 bool WebMediaPlayerAndroid::hasSingleSecurityOrigin() const { |
| 479 if (info_loader_) | 480 if (info_loader_) |
| 480 return info_loader_->HasSingleOrigin(); | 481 return info_loader_->HasSingleOrigin(); |
| 481 // The info loader may have failed. | 482 // The info loader may have failed. |
| 482 if (player_type_ == MEDIA_PLAYER_TYPE_URL) | 483 if (player_type_ == MEDIA_PLAYER_TYPE_URL) |
| 483 return false; | 484 return false; |
| 484 return true; | 485 return true; |
| (...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1439 | 1440 |
| 1440 void WebMediaPlayerAndroid::exitFullscreen() { | 1441 void WebMediaPlayerAndroid::exitFullscreen() { |
| 1441 manager_->ExitFullscreen(player_id_); | 1442 manager_->ExitFullscreen(player_id_); |
| 1442 } | 1443 } |
| 1443 | 1444 |
| 1444 bool WebMediaPlayerAndroid::canEnterFullscreen() const { | 1445 bool WebMediaPlayerAndroid::canEnterFullscreen() const { |
| 1445 return manager_->CanEnterFullscreen(frame_); | 1446 return manager_->CanEnterFullscreen(frame_); |
| 1446 } | 1447 } |
| 1447 | 1448 |
| 1448 } // namespace content | 1449 } // namespace content |
| OLD | NEW |