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 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
455 // value down to get the expected result. | 455 // value down to get the expected result. |
456 // flip_y==true means to reverse the video orientation while | 456 // flip_y==true means to reverse the video orientation while |
457 // flip_y==false means to keep the intrinsic orientation. | 457 // flip_y==false means to keep the intrinsic orientation. |
458 web_graphics_context->pixelStorei(GL_UNPACK_FLIP_Y_CHROMIUM, flip_y); | 458 web_graphics_context->pixelStorei(GL_UNPACK_FLIP_Y_CHROMIUM, flip_y); |
459 web_graphics_context->copyTextureCHROMIUM(GL_TEXTURE_2D, texture_id_, | 459 web_graphics_context->copyTextureCHROMIUM(GL_TEXTURE_2D, texture_id_, |
460 texture, level, internal_format, | 460 texture, level, internal_format, |
461 type); | 461 type); |
462 web_graphics_context->pixelStorei(GL_UNPACK_FLIP_Y_CHROMIUM, false); | 462 web_graphics_context->pixelStorei(GL_UNPACK_FLIP_Y_CHROMIUM, false); |
463 web_graphics_context->pixelStorei(GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM, | 463 web_graphics_context->pixelStorei(GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM, |
464 false); | 464 false); |
465 | |
466 web_graphics_context->bindTexture(GL_TEXTURE_EXTERNAL_OES, 0); | 465 web_graphics_context->bindTexture(GL_TEXTURE_EXTERNAL_OES, 0); |
466 web_graphics_context->flush(); | |
no sievers
2014/03/18 22:54:29
Actually, you don't need this flush either since y
junj
2014/03/19 07:47:37
My understanding is that the video contents associ
no sievers
2014/03/19 17:02:19
The contents for the StreamTexture are actually up
| |
467 return true; | 467 return true; |
468 } | 468 } |
469 | 469 |
470 bool WebMediaPlayerAndroid::hasSingleSecurityOrigin() const { | 470 bool WebMediaPlayerAndroid::hasSingleSecurityOrigin() const { |
471 if (info_loader_) | 471 if (info_loader_) |
472 return info_loader_->HasSingleOrigin(); | 472 return info_loader_->HasSingleOrigin(); |
473 // The info loader may have failed. | 473 // The info loader may have failed. |
474 if (player_type_ == MEDIA_PLAYER_TYPE_URL) | 474 if (player_type_ == MEDIA_PLAYER_TYPE_URL) |
475 return false; | 475 return false; |
476 return true; | 476 return true; |
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1431 | 1431 |
1432 void WebMediaPlayerAndroid::exitFullscreen() { | 1432 void WebMediaPlayerAndroid::exitFullscreen() { |
1433 manager_->ExitFullscreen(player_id_); | 1433 manager_->ExitFullscreen(player_id_); |
1434 } | 1434 } |
1435 | 1435 |
1436 bool WebMediaPlayerAndroid::canEnterFullscreen() const { | 1436 bool WebMediaPlayerAndroid::canEnterFullscreen() const { |
1437 return manager_->CanEnterFullscreen(frame_); | 1437 return manager_->CanEnterFullscreen(frame_); |
1438 } | 1438 } |
1439 | 1439 |
1440 } // namespace content | 1440 } // namespace content |
OLD | NEW |