OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010 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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 | 210 |
211 bool HTMLVideoElement::copyVideoTextureToPlatformTexture(gpu::gles2::GLES2Interf
ace* gl, GLuint texture, GLenum internalFormat, GLenum type, bool premultiplyAlp
ha, bool flipY) | 211 bool HTMLVideoElement::copyVideoTextureToPlatformTexture(gpu::gles2::GLES2Interf
ace* gl, GLuint texture, GLenum internalFormat, GLenum type, bool premultiplyAlp
ha, bool flipY) |
212 { | 212 { |
213 if (!webMediaPlayer()) | 213 if (!webMediaPlayer()) |
214 return false; | 214 return false; |
215 | 215 |
216 DCHECK(Extensions3DUtil::canUseCopyTextureCHROMIUM(GL_TEXTURE_2D, internalFo
rmat, type, 0)); | 216 DCHECK(Extensions3DUtil::canUseCopyTextureCHROMIUM(GL_TEXTURE_2D, internalFo
rmat, type, 0)); |
217 return webMediaPlayer()->copyVideoTextureToPlatformTexture(gl, texture, inte
rnalFormat, type, premultiplyAlpha, flipY); | 217 return webMediaPlayer()->copyVideoTextureToPlatformTexture(gl, texture, inte
rnalFormat, type, premultiplyAlpha, flipY); |
218 } | 218 } |
219 | 219 |
| 220 bool HTMLVideoElement::texImageImpl(const char* functionID, GLenum target, gpu::
gles2::GLES2Interface* gl, GLint level, GLint internalformat, GLenum format, GLe
num type, GLint xoffset, GLint yoffset, GLint zoffset, bool flipY, bool premulti
plyAlpha) |
| 221 { |
| 222 if (!webMediaPlayer()) |
| 223 return false; |
| 224 return webMediaPlayer()->texImageImpl(functionID, target, gl, level, interna
lformat, format, type, xoffset, yoffset, zoffset, flipY, premultiplyAlpha); |
| 225 } |
| 226 |
220 bool HTMLVideoElement::hasAvailableVideoFrame() const | 227 bool HTMLVideoElement::hasAvailableVideoFrame() const |
221 { | 228 { |
222 if (!webMediaPlayer()) | 229 if (!webMediaPlayer()) |
223 return false; | 230 return false; |
224 | 231 |
225 return webMediaPlayer()->hasVideo() && webMediaPlayer()->getReadyState() >=
WebMediaPlayer::ReadyStateHaveCurrentData; | 232 return webMediaPlayer()->hasVideo() && webMediaPlayer()->getReadyState() >=
WebMediaPlayer::ReadyStateHaveCurrentData; |
226 } | 233 } |
227 | 234 |
228 void HTMLVideoElement::webkitEnterFullscreen() | 235 void HTMLVideoElement::webkitEnterFullscreen() |
229 { | 236 { |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 return ScriptPromise(); | 346 return ScriptPromise(); |
340 } | 347 } |
341 if (!sw || !sh) { | 348 if (!sw || !sh) { |
342 exceptionState.throwDOMException(IndexSizeError, String::format("The sou
rce %s provided is 0.", sw ? "height" : "width")); | 349 exceptionState.throwDOMException(IndexSizeError, String::format("The sou
rce %s provided is 0.", sw ? "height" : "width")); |
343 return ScriptPromise(); | 350 return ScriptPromise(); |
344 } | 351 } |
345 return ImageBitmapSource::fulfillImageBitmap(scriptState, ImageBitmap::creat
e(this, IntRect(sx, sy, sw, sh), eventTarget.toLocalDOMWindow()->document(), opt
ions)); | 352 return ImageBitmapSource::fulfillImageBitmap(scriptState, ImageBitmap::creat
e(this, IntRect(sx, sy, sw, sh), eventTarget.toLocalDOMWindow()->document(), opt
ions)); |
346 } | 353 } |
347 | 354 |
348 } // namespace blink | 355 } // namespace blink |
OLD | NEW |