OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 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 5318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5329 } | 5329 } |
5330 } | 5330 } |
5331 | 5331 |
5332 if (sourceImageRectIsDefault) { | 5332 if (sourceImageRectIsDefault) { |
5333 // Try using optimized CPU-GPU path for some formats: e.g. Y16 and Y8. It | 5333 // Try using optimized CPU-GPU path for some formats: e.g. Y16 and Y8. It |
5334 // leaves early for other formats or if frame is stored on GPU. | 5334 // leaves early for other formats or if frame is stored on GPU. |
5335 ScopedUnpackParametersResetRestore( | 5335 ScopedUnpackParametersResetRestore( |
5336 this, m_unpackFlipY || m_unpackPremultiplyAlpha); | 5336 this, m_unpackFlipY || m_unpackPremultiplyAlpha); |
5337 if (video->texImageImpl( | 5337 if (video->texImageImpl( |
5338 static_cast<WebMediaPlayer::TexImageFunctionID>(functionID), target, | 5338 static_cast<WebMediaPlayer::TexImageFunctionID>(functionID), target, |
5339 contextGL(), level, convertTexInternalFormat(internalformat, type), | 5339 contextGL(), texture->object(), level, |
5340 format, type, xoffset, yoffset, zoffset, m_unpackFlipY, | 5340 convertTexInternalFormat(internalformat, type), format, type, |
| 5341 xoffset, yoffset, zoffset, m_unpackFlipY, |
5341 m_unpackPremultiplyAlpha && | 5342 m_unpackPremultiplyAlpha && |
5342 m_unpackColorspaceConversion == GL_NONE)) { | 5343 m_unpackColorspaceConversion == GL_NONE)) { |
5343 texture->updateLastUploadedVideo(video->webMediaPlayer()); | 5344 texture->updateLastUploadedVideo(video->webMediaPlayer()); |
5344 return; | 5345 return; |
5345 } | 5346 } |
5346 } | 5347 } |
5347 | 5348 |
5348 RefPtr<Image> image = videoFrameToImage(video); | 5349 RefPtr<Image> image = videoFrameToImage(video); |
5349 if (!image) | 5350 if (!image) |
5350 return; | 5351 return; |
(...skipping 2499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7850 | 7851 |
7851 void WebGLRenderingContextBase::getHTMLOrOffscreenCanvas( | 7852 void WebGLRenderingContextBase::getHTMLOrOffscreenCanvas( |
7852 HTMLCanvasElementOrOffscreenCanvas& result) const { | 7853 HTMLCanvasElementOrOffscreenCanvas& result) const { |
7853 if (canvas()) | 7854 if (canvas()) |
7854 result.setHTMLCanvasElement(canvas()); | 7855 result.setHTMLCanvasElement(canvas()); |
7855 else | 7856 else |
7856 result.setOffscreenCanvas(offscreenCanvas()); | 7857 result.setOffscreenCanvas(offscreenCanvas()); |
7857 } | 7858 } |
7858 | 7859 |
7859 } // namespace blink | 7860 } // namespace blink |
OLD | NEW |