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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/gpu/Extensions3DUtil.cpp

Issue 2121043002: 16 bpp video stream capture, render and WebGL usage - Realsense R200 & SR300 support. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tests: cc, skcanvas_video_renderer, wrtcrecorder... Fake capture supports Y16. Created 4 years, 2 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/graphics/gpu/Extensions3DUtil.h" 5 #include "platform/graphics/gpu/Extensions3DUtil.h"
6 6
7 #include "gpu/command_buffer/client/gles2_interface.h" 7 #include "gpu/command_buffer/client/gles2_interface.h"
8 #include "third_party/khronos/GLES2/gl2ext.h"
9 #include "third_party/khronos/GLES3/gl3.h"
8 #include "wtf/PtrUtil.h" 10 #include "wtf/PtrUtil.h"
9 #include "wtf/text/CString.h" 11 #include "wtf/text/CString.h"
10 #include "wtf/text/StringHash.h" 12 #include "wtf/text/StringHash.h"
11 #include <memory> 13 #include <memory>
12 14
13 namespace blink { 15 namespace blink {
14 16
15 namespace { 17 namespace {
16 18
17 void splitStringHelper(const String& str, HashSet<String>& set) 19 void splitStringHelper(const String& str, HashSet<String>& set)
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 81
80 bool Extensions3DUtil::isExtensionEnabled(const String& name) 82 bool Extensions3DUtil::isExtensionEnabled(const String& name)
81 { 83 {
82 return m_enabledExtensions.contains(name); 84 return m_enabledExtensions.contains(name);
83 } 85 }
84 86
85 bool Extensions3DUtil::canUseCopyTextureCHROMIUM(GLenum destTarget, GLenum destF ormat, GLenum destType, GLint level) 87 bool Extensions3DUtil::canUseCopyTextureCHROMIUM(GLenum destTarget, GLenum destF ormat, GLenum destType, GLint level)
86 { 88 {
87 // TODO(zmo): restriction of (RGB || RGBA)/UNSIGNED_BYTE/(Level 0) should be lifted when 89 // TODO(zmo): restriction of (RGB || RGBA)/UNSIGNED_BYTE/(Level 0) should be lifted when
88 // GLES2Interface::CopyTextureCHROMIUM(...) are fully functional. 90 // GLES2Interface::CopyTextureCHROMIUM(...) are fully functional.
89 if (destTarget == GL_TEXTURE_2D && (destFormat == GL_RGB || destFormat == GL _RGBA) 91 if (destTarget == GL_TEXTURE_2D && (((destFormat == GL_RGB || destFormat == GL_RGBA || destFormat == GL_RG8_EXT) && destType == GL_UNSIGNED_BYTE) || (destFo rmat == GL_R32F && destType == GL_FLOAT && supportsExtension("GL_EXT_color_buffe r_float")))
90 && destType == GL_UNSIGNED_BYTE
91 && !level) 92 && !level)
92 return true; 93 return true;
93 return false; 94 return false;
94 } 95 }
95 96
96 } // namespace blink 97 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698