OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 | 327 |
328 bool hasClosedCaptions() const; | 328 bool hasClosedCaptions() const; |
329 void setClosedCaptionsVisible(bool closedCaptionsVisible); | 329 void setClosedCaptionsVisible(bool closedCaptionsVisible); |
330 | 330 |
331 bool autoplay() const; | 331 bool autoplay() const; |
332 void setAutoplay(bool); | 332 void setAutoplay(bool); |
333 | 333 |
334 void paint(GraphicsContext*, const IntRect&); | 334 void paint(GraphicsContext*, const IntRect&); |
335 void paintCurrentFrameInContext(GraphicsContext*, const IntRect&); | 335 void paintCurrentFrameInContext(GraphicsContext*, const IntRect&); |
336 | 336 |
| 337 // copyVideoTextureToCanvas() is a hardware accelerated version of paintCurr
entFrameInContext when video is hardware decoded. |
| 338 // It is used to do a GPU-GPU textures copy without readback to system memor
y if possible. When the Canvas is hardware accelerated, it |
| 339 // will copy the video texture to the canvas texture. But when the Canvas is
software based, it will still readback the video |
| 340 // texture to system memory, then draw it onto the Canvas. |
| 341 |
| 342 // Each platform port can have its own implementation on this function. The
default implementation for it is a single "return false" in MediaPlayerPrivate.h
. |
| 343 // In chromium, the implementation is based on GL_CHROMIUM_copy_texture exte
nsion which is documented at |
| 344 // http://src.chromium.org/viewvc/chrome/trunk/src/gpu/GLES2/extensions/CHRO
MIUM/CHROMIUM_copy_texture.txt and implemented at |
| 345 // http://src.chromium.org/viewvc/chrome/trunk/src/gpu/command_buffer/servic
e/gles2_cmd_copy_texture_chromium.cc via shaders. |
| 346 bool copyVideoTextureToCanvas(GraphicsContext*, GraphicsContext3D*); |
| 347 |
337 // copyVideoTextureToPlatformTexture() is used to do the GPU-GPU textures co
py without a readback to system memory. | 348 // copyVideoTextureToPlatformTexture() is used to do the GPU-GPU textures co
py without a readback to system memory. |
338 // The first five parameters denote the corresponding GraphicsContext, desti
nation texture, requested level, requested type and the required internalFormat
for destination texture. | 349 // The first five parameters denote the corresponding GraphicsContext, desti
nation texture, requested level, requested type and the required internalFormat
for destination texture. |
339 // The last two parameters premultiplyAlpha and flipY denote whether addtion
al premultiplyAlpha and flip operation are required during the copy. | 350 // The last two parameters premultiplyAlpha and flipY denote whether addtion
al premultiplyAlpha and flip operation are required during the copy. |
340 // It returns true on success and false on failure. | 351 // It returns true on success and false on failure. |
341 | 352 |
342 // In the GPU-GPU textures copy, the source texture(Video texture) should ha
ve valid target, internalFormat and size, etc. | 353 // In the GPU-GPU textures copy, the source texture(Video texture) should ha
ve valid target, internalFormat and size, etc. |
343 // The destination texture may need to be resized to to the dimensions of th
e source texture or re-defined to the required internalFormat. | 354 // The destination texture may need to be resized to to the dimensions of th
e source texture or re-defined to the required internalFormat. |
344 // The current restrictions require that format shoud be RGB or RGBA, type s
hould be UNSIGNED_BYTE and level should be 0. It may be lifted in the future. | 355 // The current restrictions require that format shoud be RGB or RGBA, type s
hould be UNSIGNED_BYTE and level should be 0. It may be lifted in the future. |
345 | 356 |
346 // Each platform port can have its own implementation on this function. The
default implementation for it is a single "return false" in MediaPlayerPrivate.h
. | 357 // Each platform port can have its own implementation on this function. The
default implementation for it is a single "return false" in MediaPlayerPrivate.h
. |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
513 typedef void (*MediaEngineClearMediaCacheForSite)(const String&); | 524 typedef void (*MediaEngineClearMediaCacheForSite)(const String&); |
514 | 525 |
515 typedef void (*MediaEngineRegistrar)(CreateMediaEnginePlayer, MediaEngineSupport
edTypes, MediaEngineSupportsType, | 526 typedef void (*MediaEngineRegistrar)(CreateMediaEnginePlayer, MediaEngineSupport
edTypes, MediaEngineSupportsType, |
516 MediaEngineGetSitesInMediaCache, MediaEngineClearMediaCache, MediaEngineClea
rMediaCacheForSite); | 527 MediaEngineGetSitesInMediaCache, MediaEngineClearMediaCache, MediaEngineClea
rMediaCacheForSite); |
517 | 528 |
518 } | 529 } |
519 | 530 |
520 #endif // ENABLE(VIDEO) | 531 #endif // ENABLE(VIDEO) |
521 | 532 |
522 #endif | 533 #endif |
OLD | NEW |