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

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

Issue 1152733008: remove |level| in copyVideoTextureToPlatformTexture(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add TODO Created 5 years, 6 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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 return; 211 return;
212 212
213 SkXfermode::Mode mode; 213 SkXfermode::Mode mode;
214 if (!paint || !SkXfermode::AsMode(paint->getXfermode(), &mode)) 214 if (!paint || !SkXfermode::AsMode(paint->getXfermode(), &mode))
215 mode = SkXfermode::kSrcOver_Mode; 215 mode = SkXfermode::kSrcOver_Mode;
216 216
217 // TODO(junov, philipj): crbug.com/456529 Pass the whole SkPaint instead of only alpha and xfermode 217 // TODO(junov, philipj): crbug.com/456529 Pass the whole SkPaint instead of only alpha and xfermode
218 webMediaPlayer()->paint(canvas, destRect, paint ? paint->getAlpha() : 0xFF, mode); 218 webMediaPlayer()->paint(canvas, destRect, paint ? paint->getAlpha() : 0xFF, mode);
219 } 219 }
220 220
221 bool HTMLVideoElement::copyVideoTextureToPlatformTexture(WebGraphicsContext3D* c ontext, Platform3DObject texture, GLint level, GLenum internalFormat, GLenum typ e, bool premultiplyAlpha, bool flipY) 221 bool HTMLVideoElement::copyVideoTextureToPlatformTexture(WebGraphicsContext3D* c ontext, Platform3DObject texture, GLenum internalFormat, GLenum type, bool premu ltiplyAlpha, bool flipY)
222 { 222 {
223 if (!webMediaPlayer()) 223 if (!webMediaPlayer())
224 return false; 224 return false;
225 225
226 if (!Extensions3DUtil::canUseCopyTextureCHROMIUM(internalFormat, type, level )) 226 ASSERT(Extensions3DUtil::canUseCopyTextureCHROMIUM(GL_TEXTURE_2D, internalFo rmat, type, 0));
227 return false; 227 return webMediaPlayer()->copyVideoTextureToPlatformTexture(context, texture, internalFormat, type, premultiplyAlpha, flipY);
228
229 return webMediaPlayer()->copyVideoTextureToPlatformTexture(context, texture, level, internalFormat, type, premultiplyAlpha, flipY);
230 } 228 }
231 229
232 bool HTMLVideoElement::hasAvailableVideoFrame() const 230 bool HTMLVideoElement::hasAvailableVideoFrame() const
233 { 231 {
234 if (!webMediaPlayer()) 232 if (!webMediaPlayer())
235 return false; 233 return false;
236 234
237 return webMediaPlayer()->hasVideo() && webMediaPlayer()->readyState() >= Web MediaPlayer::ReadyStateHaveCurrentData; 235 return webMediaPlayer()->hasVideo() && webMediaPlayer()->readyState() >= Web MediaPlayer::ReadyStateHaveCurrentData;
238 } 236 }
239 237
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 { 324 {
327 return !isMediaDataCORSSameOrigin(destinationSecurityOrigin); 325 return !isMediaDataCORSSameOrigin(destinationSecurityOrigin);
328 } 326 }
329 327
330 FloatSize HTMLVideoElement::elementSize() const 328 FloatSize HTMLVideoElement::elementSize() const
331 { 329 {
332 return FloatSize(videoWidth(), videoHeight()); 330 return FloatSize(videoWidth(), videoHeight());
333 } 331 }
334 332
335 } // namespace blink 333 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/HTMLVideoElement.h ('k') | Source/core/html/canvas/WebGLRenderingContextBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698