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

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

Issue 2896553003: Re-enable GPU-GPU copies of video textures to GL_RED (Closed)
Patch Set: rebased and clean up Created 3 years, 5 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
« no previous file with comments | « media/renderers/skcanvas_video_renderer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4860 matching lines...) Expand 10 before | Expand all | Expand 10 after
4871 GLenum type) { 4871 GLenum type) {
4872 #if defined(OS_MACOSX) 4872 #if defined(OS_MACOSX)
4873 // RGB5_A1 is not color-renderable on NVIDIA Mac, see crbug.com/676209. 4873 // RGB5_A1 is not color-renderable on NVIDIA Mac, see crbug.com/676209.
4874 // Though, glCopyTextureCHROMIUM can handle RGB5_A1 internalformat by doing a 4874 // Though, glCopyTextureCHROMIUM can handle RGB5_A1 internalformat by doing a
4875 // fallback path, but it doesn't know the type info. So, we still cannot do 4875 // fallback path, but it doesn't know the type info. So, we still cannot do
4876 // the fallback path in glCopyTextureCHROMIUM for 4876 // the fallback path in glCopyTextureCHROMIUM for
4877 // RGBA/RGBA/UNSIGNED_SHORT_5_5_5_1 format and type combination. 4877 // RGBA/RGBA/UNSIGNED_SHORT_5_5_5_1 format and type combination.
4878 if (type == GL_UNSIGNED_SHORT_5_5_5_1) 4878 if (type == GL_UNSIGNED_SHORT_5_5_5_1)
4879 return false; 4879 return false;
4880 #endif 4880 #endif
4881 // TODO(kbr): bugs were observed when using CopyTextureCHROMIUM to
4882 // copy hardware-accelerated video textures to red-channel textures.
4883 // These bugs were seen on macOS but may indicate more general
4884 // problems. Investigate the root cause of this and fix it.
4885 // crbug.com/710673
4886 if (format == GL_RED || format == GL_RED_INTEGER)
4887 return false;
4888 4881
4889 #if defined(OS_ANDROID) 4882 #if defined(OS_ANDROID)
4890 // TODO(kbr): bugs were seen on Android devices with NVIDIA GPUs 4883 // TODO(kbr): bugs were seen on Android devices with NVIDIA GPUs
4891 // when copying hardware-accelerated video textures to 4884 // when copying hardware-accelerated video textures to
4892 // floating-point textures. Investigate the root cause of this and 4885 // floating-point textures. Investigate the root cause of this and
4893 // fix it. crbug.com/710874 4886 // fix it. crbug.com/710874
4894 if (type == GL_FLOAT) 4887 if (type == GL_FLOAT)
4895 return false; 4888 return false;
4896 #endif 4889 #endif
4897 4890
(...skipping 2889 matching lines...) Expand 10 before | Expand all | Expand 10 after
7787 void WebGLRenderingContextBase::getHTMLOrOffscreenCanvas( 7780 void WebGLRenderingContextBase::getHTMLOrOffscreenCanvas(
7788 HTMLCanvasElementOrOffscreenCanvas& result) const { 7781 HTMLCanvasElementOrOffscreenCanvas& result) const {
7789 if (canvas()) { 7782 if (canvas()) {
7790 result.setHTMLCanvasElement(static_cast<HTMLCanvasElement*>(host())); 7783 result.setHTMLCanvasElement(static_cast<HTMLCanvasElement*>(host()));
7791 } else { 7784 } else {
7792 result.setOffscreenCanvas(static_cast<OffscreenCanvas*>(host())); 7785 result.setOffscreenCanvas(static_cast<OffscreenCanvas*>(host()));
7793 } 7786 }
7794 } 7787 }
7795 7788
7796 } // namespace blink 7789 } // namespace blink
OLDNEW
« no previous file with comments | « media/renderers/skcanvas_video_renderer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698