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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 bool HTMLVideoElement::copyVideoTextureToPlatformTexture( | 215 bool HTMLVideoElement::copyVideoTextureToPlatformTexture( |
216 gpu::gles2::GLES2Interface* gl, | 216 gpu::gles2::GLES2Interface* gl, |
217 GLuint texture, | 217 GLuint texture, |
218 GLenum internalFormat, | 218 GLenum internalFormat, |
219 GLenum type, | 219 GLenum type, |
220 bool premultiplyAlpha, | 220 bool premultiplyAlpha, |
221 bool flipY) { | 221 bool flipY) { |
222 if (!webMediaPlayer()) | 222 if (!webMediaPlayer()) |
223 return false; | 223 return false; |
224 | 224 |
225 DCHECK(Extensions3DUtil::canUseCopyTextureCHROMIUM(GL_TEXTURE_2D, | |
226 internalFormat, type, 0)); | |
227 return webMediaPlayer()->copyVideoTextureToPlatformTexture( | 225 return webMediaPlayer()->copyVideoTextureToPlatformTexture( |
228 gl, texture, internalFormat, type, premultiplyAlpha, flipY); | 226 gl, texture, internalFormat, type, premultiplyAlpha, flipY); |
229 } | 227 } |
230 | 228 |
| 229 bool HTMLVideoElement::texImageImpl(const char* functionID, |
| 230 GLenum target, |
| 231 gpu::gles2::GLES2Interface* gl, |
| 232 GLint level, |
| 233 GLint internalformat, |
| 234 GLenum format, |
| 235 GLenum type, |
| 236 GLint xoffset, |
| 237 GLint yoffset, |
| 238 GLint zoffset, |
| 239 bool flipY, |
| 240 bool premultiplyAlpha) { |
| 241 if (!webMediaPlayer()) |
| 242 return false; |
| 243 return webMediaPlayer()->texImageImpl( |
| 244 functionID, target, gl, level, internalformat, format, type, xoffset, |
| 245 yoffset, zoffset, flipY, premultiplyAlpha); |
| 246 } |
| 247 |
231 bool HTMLVideoElement::hasAvailableVideoFrame() const { | 248 bool HTMLVideoElement::hasAvailableVideoFrame() const { |
232 if (!webMediaPlayer()) | 249 if (!webMediaPlayer()) |
233 return false; | 250 return false; |
234 | 251 |
235 return webMediaPlayer()->hasVideo() && | 252 return webMediaPlayer()->hasVideo() && |
236 webMediaPlayer()->getReadyState() >= | 253 webMediaPlayer()->getReadyState() >= |
237 WebMediaPlayer::ReadyStateHaveCurrentData; | 254 WebMediaPlayer::ReadyStateHaveCurrentData; |
238 } | 255 } |
239 | 256 |
240 void HTMLVideoElement::webkitEnterFullscreen() { | 257 void HTMLVideoElement::webkitEnterFullscreen() { |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 return ScriptPromise(); | 376 return ScriptPromise(); |
360 if (!ImageBitmap::isResizeOptionValid(options, exceptionState)) | 377 if (!ImageBitmap::isResizeOptionValid(options, exceptionState)) |
361 return ScriptPromise(); | 378 return ScriptPromise(); |
362 return ImageBitmapSource::fulfillImageBitmap( | 379 return ImageBitmapSource::fulfillImageBitmap( |
363 scriptState, | 380 scriptState, |
364 ImageBitmap::create(this, cropRect, | 381 ImageBitmap::create(this, cropRect, |
365 eventTarget.toLocalDOMWindow()->document(), options)); | 382 eventTarget.toLocalDOMWindow()->document(), options)); |
366 } | 383 } |
367 | 384 |
368 } // namespace blink | 385 } // namespace blink |
OLD | NEW |