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

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

Issue 1284603003: WebGL: optimize webgl.texSubImage2D(video) path. (Blink side) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase to ToT Created 5 years, 3 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 | « Source/platform/graphics/ImageBuffer.cpp ('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 // 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 "config.h" 5 #include "config.h"
6 #include "platform/graphics/gpu/Extensions3DUtil.h" 6 #include "platform/graphics/gpu/Extensions3DUtil.h"
7 7
8 #include "public/platform/WebGraphicsContext3D.h" 8 #include "public/platform/WebGraphicsContext3D.h"
9 #include "wtf/text/CString.h" 9 #include "wtf/text/CString.h"
10 #include "wtf/text/StringHash.h" 10 #include "wtf/text/StringHash.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 return m_enabledExtensions.contains(name); 76 return m_enabledExtensions.contains(name);
77 } 77 }
78 78
79 bool Extensions3DUtil::isExtensionEnabled(const String& name) 79 bool Extensions3DUtil::isExtensionEnabled(const String& name)
80 { 80 {
81 return m_enabledExtensions.contains(name); 81 return m_enabledExtensions.contains(name);
82 } 82 }
83 83
84 bool Extensions3DUtil::canUseCopyTextureCHROMIUM(GLenum destTarget, GLenum destF ormat, GLenum destType, GLint level) 84 bool Extensions3DUtil::canUseCopyTextureCHROMIUM(GLenum destTarget, GLenum destF ormat, GLenum destType, GLint level)
85 { 85 {
86 // FIXME: restriction of (RGB || RGBA)/UNSIGNED_BYTE/(Level 0) should be lif ted when 86 switch (destTarget) {
87 case GL_TEXTURE_2D:
88 case GL_TEXTURE_CUBE_MAP_POSITIVE_X:
89 case GL_TEXTURE_CUBE_MAP_NEGATIVE_X:
90 case GL_TEXTURE_CUBE_MAP_POSITIVE_Y:
91 case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y:
92 case GL_TEXTURE_CUBE_MAP_POSITIVE_Z:
93 case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:
94 break;
95 default:
96 return false;
97 }
98 // TODO(dshwang): restriction of (RGB || RGBA)/UNSIGNED_BYTE/(Level 0) shoul d be lifted when
87 // WebGraphicsContext3D::copyTextureCHROMIUM(...) are fully functional. 99 // WebGraphicsContext3D::copyTextureCHROMIUM(...) are fully functional.
88 if (destTarget == GL_TEXTURE_2D && (destFormat == GL_RGB || destFormat == GL _RGBA) 100 if ((destFormat == GL_RGB || destFormat == GL_RGBA)
89 && destType == GL_UNSIGNED_BYTE 101 && destType == GL_UNSIGNED_BYTE
90 && !level) 102 && !level)
91 return true; 103 return true;
92 return false; 104 return false;
93 } 105 }
94 106
95 } // namespace blink 107 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/graphics/ImageBuffer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698