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

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

Issue 1315323006: webgl: optimize webgl.texSubImage2D(video) path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase to ToT Created 5 years, 1 month 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 "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 break;
89 // TODO(dshwang): support cube map. crbug.com/517548
90 case GL_TEXTURE_CUBE_MAP_POSITIVE_X:
91 case GL_TEXTURE_CUBE_MAP_NEGATIVE_X:
92 case GL_TEXTURE_CUBE_MAP_POSITIVE_Y:
93 case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y:
94 case GL_TEXTURE_CUBE_MAP_POSITIVE_Z:
95 case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:
96 return false;
97 default:
98 ASSERT_NOT_REACHED();
99 return false;
100 }
101 // TODO(dshwang): restriction of (RGB || RGBA)/UNSIGNED_BYTE/(Level 0) shoul d be lifted when
87 // WebGraphicsContext3D::copyTextureCHROMIUM(...) are fully functional. 102 // WebGraphicsContext3D::copyTextureCHROMIUM(...) are fully functional.
88 if (destTarget == GL_TEXTURE_2D && (destFormat == GL_RGB || destFormat == GL _RGBA) 103 if ((destFormat == GL_RGB || destFormat == GL_RGBA)
89 && destType == GL_UNSIGNED_BYTE 104 && destType == GL_UNSIGNED_BYTE
90 && !level) 105 && !level)
91 return true; 106 return true;
92 return false; 107 return false;
93 } 108 }
94 109
95 } // namespace blink 110 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp ('k') | third_party/WebKit/public/platform/WebMediaPlayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698