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