Changeset 126675 in webkit
- Timestamp:
- Aug 24, 2012 7:26:06 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r126666 r126675 1 2012-08-24 Helder Correia <helder.correia@nokia.com> 2 3 [Texmap] Move TextureMapperGL to use GraphicsContext3D 4 https://bugs.webkit.org/show_bug.cgi?id=78672 5 6 Reviewed by Noam Rosenthal. 7 8 Introducing a new GraphicsContext3D::texImage2DDirect() to allow 9 initialization of textures without allocation. The existing 10 textImage2D() refuses a null pixel buffer, and 11 texImage2DResourceSafe() allows it but performs memory 12 allocation and zeroes the bits. This was not fast enough for 13 BitmapTextureGL frequent setting up. 14 15 No new tests, refactoring. 16 17 * platform/graphics/GraphicsContext3D.h: 18 (GraphicsContext3D): 19 * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: 20 (WebCore::GraphicsContext3D::texImage2D): 21 * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: 22 (WebCore::GraphicsContext3D::texImage2DDirect): 23 (WebCore): 24 * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: 25 (WebCore::GraphicsContext3D::texImage2D): 26 1 27 2012-08-24 Roger Fong <roger_fong@apple.com> 2 28 -
trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h
r126635 r126675 527 527 #endif 528 528 529 // Equivalent to ::glTexImage2D(). Allows pixels==0 with no allocation. 530 void texImage2DDirect(GC3Denum target, GC3Dint level, GC3Denum internalformat, GC3Dsizei width, GC3Dsizei height, GC3Dint border, GC3Denum format, GC3Denum type, const void* pixels); 531 529 532 // Helper to texImage2D with pixel==0 case: pixels are initialized to 0. 530 533 // Return true if no GL error is synthesized. -
trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp
r122670 r126675 257 257 return false; 258 258 } 259 makeContextCurrent(); 259 260 260 GC3Denum openGLInternalFormat = internalformat; 261 261 if (type == GL_FLOAT) { … … 266 266 } 267 267 268 ::glTexImage2D(target, level, openGLInternalFormat, width, height, border, format, type, pixels);268 texImage2DDirect(target, level, openGLInternalFormat, width, height, border, format, type, pixels); 269 269 return true; 270 270 } -
trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
r126635 r126675 1381 1381 } 1382 1382 1383 void GraphicsContext3D::texImage2DDirect(GC3Denum target, GC3Dint level, GC3Denum internalformat, GC3Dsizei width, GC3Dsizei height, GC3Dint border, GC3Denum format, GC3Denum type, const void* pixels) 1384 { 1385 makeContextCurrent(); 1386 ::glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); 1387 } 1388 1383 1389 } 1384 1390 -
trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp
r123759 r126675 32 32 33 33 #include "GraphicsContext3D.h" 34 34 35 #include "Extensions3DOpenGLES.h" 35 36 #include "IntRect.h" … … 202 203 return false; 203 204 } 204 makeContextCurrent(); 205 ::glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels);205 206 texImage2DDirect(target, level, internalformat, width, height, border, format, type, pixels); 206 207 return true; 207 208 }
Note: See TracChangeset
for help on using the changeset viewer.