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

Side by Side Diff: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp

Issue 2854263006: Remove non-target version of copyVideoTextureToPlatformTexture (Closed)
Patch Set: Created 3 years, 7 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) 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
5254 // float texture can not use GPU-GPU path. 5254 // float texture can not use GPU-GPU path.
5255 if (use_copyTextureCHROMIUM) { 5255 if (use_copyTextureCHROMIUM) {
5256 DCHECK_EQ(xoffset, 0); 5256 DCHECK_EQ(xoffset, 0);
5257 DCHECK_EQ(yoffset, 0); 5257 DCHECK_EQ(yoffset, 0);
5258 DCHECK_EQ(zoffset, 0); 5258 DCHECK_EQ(zoffset, 0);
5259 // Go through the fast path doing a GPU-GPU textures copy without a readback 5259 // Go through the fast path doing a GPU-GPU textures copy without a readback
5260 // to system memory if possible. Otherwise, it will fall back to the normal 5260 // to system memory if possible. Otherwise, it will fall back to the normal
5261 // SW path. 5261 // SW path.
5262 5262
5263 if (video->CopyVideoTextureToPlatformTexture( 5263 if (video->CopyVideoTextureToPlatformTexture(
5264 ContextGL(), texture->Object(), internalformat, format, type, 5264 ContextGL(), target, texture->Object(), internalformat, format,
5265 unpack_premultiply_alpha_, unpack_flip_y_)) { 5265 type, level, unpack_premultiply_alpha_, unpack_flip_y_)) {
5266 texture->UpdateLastUploadedVideo(video->GetWebMediaPlayer()); 5266 texture->UpdateLastUploadedVideo(video->GetWebMediaPlayer());
5267 return; 5267 return;
5268 } 5268 }
5269 } 5269 }
5270 5270
5271 if (source_image_rect_is_default) { 5271 if (source_image_rect_is_default) {
5272 // Try using optimized CPU-GPU path for some formats: e.g. Y16 and Y8. It 5272 // Try using optimized CPU-GPU path for some formats: e.g. Y16 and Y8. It
5273 // leaves early for other formats or if frame is stored on GPU. 5273 // leaves early for other formats or if frame is stored on GPU.
5274 ScopedUnpackParametersResetRestore( 5274 ScopedUnpackParametersResetRestore(
5275 this, unpack_flip_y_ || unpack_premultiply_alpha_); 5275 this, unpack_flip_y_ || unpack_premultiply_alpha_);
(...skipping 2550 matching lines...) Expand 10 before | Expand all | Expand 10 after
7826 void WebGLRenderingContextBase::getHTMLOrOffscreenCanvas( 7826 void WebGLRenderingContextBase::getHTMLOrOffscreenCanvas(
7827 HTMLCanvasElementOrOffscreenCanvas& result) const { 7827 HTMLCanvasElementOrOffscreenCanvas& result) const {
7828 if (canvas()) { 7828 if (canvas()) {
7829 result.setHTMLCanvasElement(static_cast<HTMLCanvasElement*>(host())); 7829 result.setHTMLCanvasElement(static_cast<HTMLCanvasElement*>(host()));
7830 } else { 7830 } else {
7831 result.setOffscreenCanvas(static_cast<OffscreenCanvas*>(host())); 7831 result.setOffscreenCanvas(static_cast<OffscreenCanvas*>(host()));
7832 } 7832 }
7833 } 7833 }
7834 7834
7835 } // namespace blink 7835 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLVideoElement.cpp ('k') | third_party/WebKit/public/platform/WebMediaPlayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698