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 5243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5254 } | 5254 } |
5255 } | 5255 } |
5256 | 5256 |
5257 if (source_image_rect_is_default) { | 5257 if (source_image_rect_is_default) { |
5258 // Try using optimized CPU-GPU path for some formats: e.g. Y16 and Y8. It | 5258 // Try using optimized CPU-GPU path for some formats: e.g. Y16 and Y8. It |
5259 // leaves early for other formats or if frame is stored on GPU. | 5259 // leaves early for other formats or if frame is stored on GPU. |
5260 ScopedUnpackParametersResetRestore( | 5260 ScopedUnpackParametersResetRestore( |
5261 this, unpack_flip_y_ || unpack_premultiply_alpha_); | 5261 this, unpack_flip_y_ || unpack_premultiply_alpha_); |
5262 if (video->TexImageImpl( | 5262 if (video->TexImageImpl( |
5263 static_cast<WebMediaPlayer::TexImageFunctionID>(function_id), | 5263 static_cast<WebMediaPlayer::TexImageFunctionID>(function_id), |
5264 target, ContextGL(), level, | 5264 target, ContextGL(), texture->Object(), level, |
5265 ConvertTexInternalFormat(internalformat, type), format, type, | 5265 ConvertTexInternalFormat(internalformat, type), format, type, |
5266 xoffset, yoffset, zoffset, unpack_flip_y_, | 5266 xoffset, yoffset, zoffset, unpack_flip_y_, |
5267 unpack_premultiply_alpha_ && | 5267 unpack_premultiply_alpha_ && |
5268 unpack_colorspace_conversion_ == GL_NONE)) { | 5268 unpack_colorspace_conversion_ == GL_NONE)) { |
5269 texture->UpdateLastUploadedVideo(video->GetWebMediaPlayer()); | 5269 texture->UpdateLastUploadedVideo(video->GetWebMediaPlayer()); |
5270 return; | 5270 return; |
5271 } | 5271 } |
5272 } | 5272 } |
5273 | 5273 |
5274 if (use_copyTextureCHROMIUM) { | 5274 if (use_copyTextureCHROMIUM) { |
(...skipping 2532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7807 | 7807 |
7808 void WebGLRenderingContextBase::getHTMLOrOffscreenCanvas( | 7808 void WebGLRenderingContextBase::getHTMLOrOffscreenCanvas( |
7809 HTMLCanvasElementOrOffscreenCanvas& result) const { | 7809 HTMLCanvasElementOrOffscreenCanvas& result) const { |
7810 if (canvas()) | 7810 if (canvas()) |
7811 result.setHTMLCanvasElement(canvas()); | 7811 result.setHTMLCanvasElement(canvas()); |
7812 else | 7812 else |
7813 result.setOffscreenCanvas(offscreenCanvas()); | 7813 result.setOffscreenCanvas(offscreenCanvas()); |
7814 } | 7814 } |
7815 | 7815 |
7816 } // namespace blink | 7816 } // namespace blink |
OLD | NEW |