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