Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLVideoElement.cpp

Issue 2820823003: Revert "Fix the size of video textures uploaded to WebGL." (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 mediaFlags.setAlpha(0xFF); 303 mediaFlags.setAlpha(0xFF);
304 mediaFlags.setFilterQuality(kLow_SkFilterQuality); 304 mediaFlags.setFilterQuality(kLow_SkFilterQuality);
305 } 305 }
306 306
307 webMediaPlayer()->paint(canvas, destRect, mediaFlags); 307 webMediaPlayer()->paint(canvas, destRect, mediaFlags);
308 } 308 }
309 309
310 bool HTMLVideoElement::copyVideoTextureToPlatformTexture( 310 bool HTMLVideoElement::copyVideoTextureToPlatformTexture(
311 gpu::gles2::GLES2Interface* gl, 311 gpu::gles2::GLES2Interface* gl,
312 GLuint texture, 312 GLuint texture,
313 GLenum internalFormat,
314 GLenum type,
313 bool premultiplyAlpha, 315 bool premultiplyAlpha,
314 bool flipY) { 316 bool flipY) {
315 if (!webMediaPlayer()) 317 if (!webMediaPlayer())
316 return false; 318 return false;
317 319
320 DCHECK(Extensions3DUtil::canUseCopyTextureCHROMIUM(GL_TEXTURE_2D,
321 internalFormat, type, 0));
318 return webMediaPlayer()->copyVideoTextureToPlatformTexture( 322 return webMediaPlayer()->copyVideoTextureToPlatformTexture(
319 gl, texture, premultiplyAlpha, flipY); 323 gl, texture, internalFormat, type, premultiplyAlpha, flipY);
320 } 324 }
321 325
322 bool HTMLVideoElement::texImageImpl( 326 bool HTMLVideoElement::texImageImpl(
323 WebMediaPlayer::TexImageFunctionID functionID, 327 WebMediaPlayer::TexImageFunctionID functionID,
324 GLenum target, 328 GLenum target,
325 gpu::gles2::GLES2Interface* gl, 329 gpu::gles2::GLES2Interface* gl,
326 GLint level, 330 GLint level,
327 GLint internalformat, 331 GLint internalformat,
328 GLenum format, 332 GLenum format,
329 GLenum type, 333 GLenum type,
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 return ScriptPromise(); 476 return ScriptPromise();
473 if (!ImageBitmap::isResizeOptionValid(options, exceptionState)) 477 if (!ImageBitmap::isResizeOptionValid(options, exceptionState))
474 return ScriptPromise(); 478 return ScriptPromise();
475 return ImageBitmapSource::fulfillImageBitmap( 479 return ImageBitmapSource::fulfillImageBitmap(
476 scriptState, 480 scriptState,
477 ImageBitmap::create(this, cropRect, 481 ImageBitmap::create(this, cropRect,
478 eventTarget.toLocalDOMWindow()->document(), options)); 482 eventTarget.toLocalDOMWindow()->document(), options));
479 } 483 }
480 484
481 } // namespace blink 485 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698