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