| 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 mediaPaint.setAlpha(0xFF); | 204 mediaPaint.setAlpha(0xFF); |
| 205 mediaPaint.setFilterQuality(kLow_SkFilterQuality); | 205 mediaPaint.setFilterQuality(kLow_SkFilterQuality); |
| 206 } | 206 } |
| 207 | 207 |
| 208 webMediaPlayer()->paint(canvas, destRect, mediaPaint); | 208 webMediaPlayer()->paint(canvas, destRect, mediaPaint); |
| 209 } | 209 } |
| 210 | 210 |
| 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, | |
| 215 GLenum type, | |
| 216 bool premultiplyAlpha, | 214 bool premultiplyAlpha, |
| 217 bool flipY) { | 215 bool flipY) { |
| 218 if (!webMediaPlayer()) | 216 if (!webMediaPlayer()) |
| 219 return false; | 217 return false; |
| 220 | 218 |
| 221 DCHECK(Extensions3DUtil::canUseCopyTextureCHROMIUM(GL_TEXTURE_2D, | |
| 222 internalFormat, type, 0)); | |
| 223 return webMediaPlayer()->copyVideoTextureToPlatformTexture( | 219 return webMediaPlayer()->copyVideoTextureToPlatformTexture( |
| 224 gl, texture, internalFormat, type, premultiplyAlpha, flipY); | 220 gl, texture, premultiplyAlpha, flipY); |
| 225 } | 221 } |
| 226 | 222 |
| 227 bool HTMLVideoElement::texImageImpl( | 223 bool HTMLVideoElement::texImageImpl( |
| 228 WebMediaPlayer::TexImageFunctionID functionID, | 224 WebMediaPlayer::TexImageFunctionID functionID, |
| 229 GLenum target, | 225 GLenum target, |
| 230 gpu::gles2::GLES2Interface* gl, | 226 gpu::gles2::GLES2Interface* gl, |
| 231 GLint level, | 227 GLint level, |
| 232 GLint internalformat, | 228 GLint internalformat, |
| 233 GLenum format, | 229 GLenum format, |
| 234 GLenum type, | 230 GLenum type, |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 return ScriptPromise(); | 372 return ScriptPromise(); |
| 377 if (!ImageBitmap::isResizeOptionValid(options, exceptionState)) | 373 if (!ImageBitmap::isResizeOptionValid(options, exceptionState)) |
| 378 return ScriptPromise(); | 374 return ScriptPromise(); |
| 379 return ImageBitmapSource::fulfillImageBitmap( | 375 return ImageBitmapSource::fulfillImageBitmap( |
| 380 scriptState, | 376 scriptState, |
| 381 ImageBitmap::create(this, cropRect, | 377 ImageBitmap::create(this, cropRect, |
| 382 eventTarget.toLocalDOMWindow()->document(), options)); | 378 eventTarget.toLocalDOMWindow()->document(), options)); |
| 383 } | 379 } |
| 384 | 380 |
| 385 } // namespace blink | 381 } // namespace blink |
| OLD | NEW |