Changeset 76549 in webkit
- Timestamp:
- Jan 24, 2011 2:42:12 PM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r76546 r76549 1 2011-01-24 Zhenyao Mo <zmo@google.com> 2 3 Reviewed by Darin Adler. 4 5 Remove sizeInBytes from GraphicsContext3D's various implementations 6 https://bugs.webkit.org/show_bug.cgi?id=52339 7 8 * html/canvas/WebGLRenderingContext.cpp: 9 (WebCore::WebGLRenderingContext::sizeInBytes): 10 * platform/graphics/GraphicsContext3D.h: 11 * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: 12 * platform/graphics/qt/GraphicsContext3DQt.cpp: 13 1 14 2011-01-24 Adam Roben <aroben@apple.com> 2 15 -
trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp
r76324 r76549 488 488 unsigned int WebGLRenderingContext::sizeInBytes(GC3Denum type) 489 489 { 490 return m_context->sizeInBytes(type); 490 switch (type) { 491 case GraphicsContext3D::BYTE: 492 return sizeof(GC3Dbyte); 493 case GraphicsContext3D::UNSIGNED_BYTE: 494 return sizeof(GC3Dubyte); 495 case GraphicsContext3D::SHORT: 496 return sizeof(GC3Dshort); 497 case GraphicsContext3D::UNSIGNED_SHORT: 498 return sizeof(GC3Dushort); 499 case GraphicsContext3D::INT: 500 return sizeof(GC3Dint); 501 case GraphicsContext3D::UNSIGNED_INT: 502 return sizeof(GC3Duint); 503 case GraphicsContext3D::FLOAT: 504 return sizeof(GC3Dfloat); 505 } 506 ASSERT_NOT_REACHED(); 507 return 0; 491 508 } 492 509 -
trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h
r76324 r76549 48 48 typedef unsigned char GC3Dboolean; 49 49 typedef unsigned int GC3Dbitfield; 50 typedef signed char GC3Dbyte; 50 51 typedef unsigned char GC3Dubyte; 52 typedef short GC3Dshort; 51 53 typedef unsigned short GC3Dushort; 52 54 typedef int GC3Dint; … … 488 490 #endif 489 491 490 // Helper to return the size in bytes of OpenGL data types491 // like GL_FLOAT, GL_INT, etc.492 unsigned int sizeInBytes(GC3Denum type);493 494 492 // Helper to texImage2D with pixel==0 case: pixels are initialized to 0. 495 493 // Return true if no GL error is synthesized. -
trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp
r76324 r76549 1438 1438 } 1439 1439 1440 uint32_t GraphicsContext3D::sizeInBytes(GC3Denum type)1441 {1442 switch (type) {1443 case GL_BYTE:1444 return sizeof(GLbyte);1445 case GL_UNSIGNED_BYTE:1446 return sizeof(GLubyte);1447 case GL_SHORT:1448 return sizeof(GLshort);1449 case GL_UNSIGNED_SHORT:1450 return sizeof(GLushort);1451 case GL_INT:1452 return sizeof(GLint);1453 case GL_UNSIGNED_INT:1454 return sizeof(GLuint);1455 case GL_FLOAT:1456 return sizeof(GLfloat);1457 default:1458 return 0;1459 }1460 }1461 1462 1440 void GraphicsContext3D::synthesizeGLError(GC3Denum error) 1463 1441 { -
trunk/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp
r75214 r76549 1612 1612 } 1613 1613 1614 unsigned int GraphicsContext3D::sizeInBytes(GC3Denum type)1615 {1616 switch (type) {1617 case GraphicsContext3D::BYTE:1618 return sizeof(GLbyte);1619 case GraphicsContext3D::UNSIGNED_BYTE:1620 return sizeof(GLubyte);1621 case GraphicsContext3D::SHORT:1622 return sizeof(GLshort);1623 case GraphicsContext3D::UNSIGNED_SHORT:1624 return sizeof(GLushort);1625 case GraphicsContext3D::INT:1626 return sizeof(GLint);1627 case GraphicsContext3D::UNSIGNED_INT:1628 return sizeof(GLuint);1629 case GraphicsContext3D::FLOAT:1630 return sizeof(GLfloat);1631 default:1632 return 0;1633 }1634 }1635 1636 1614 void GraphicsContext3D::synthesizeGLError(GC3Denum error) 1637 1615 { -
trunk/Source/WebKit/chromium/ChangeLog
r76527 r76549 1 2011-01-24 Zhenyao Mo <zmo@google.com> 2 3 Reviewed by Darin Adler. 4 5 Remove sizeInBytes from GraphicsContext3D's various implementations 6 https://bugs.webkit.org/show_bug.cgi?id=52339 7 8 * src/GraphicsContext3DChromium.cpp: 9 * src/GraphicsContext3DInternal.h: 10 1 11 2011-01-24 Tony Chang <tony@chromium.org> 2 12 -
trunk/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp
r75553 r76549 366 366 367 367 DELEGATE_TO_IMPL_R(makeContextCurrent, bool) 368 DELEGATE_TO_IMPL_1R(sizeInBytes, GC3Denum, unsigned int)369 368 370 369 bool GraphicsContext3DInternal::isGLES2Compliant() const … … 898 897 899 898 DELEGATE_TO_INTERNAL(makeContextCurrent) 900 DELEGATE_TO_INTERNAL_1R(sizeInBytes, GC3Denum, unsigned int)901 899 DELEGATE_TO_INTERNAL_2(reshape, int, int) 902 900 DELEGATE_TO_INTERNAL_R(getInternalFramebufferSize, IntSize) -
trunk/Source/WebKit/chromium/src/GraphicsContext3DInternal.h
r75214 r76549 63 63 bool makeContextCurrent(); 64 64 65 unsigned int sizeInBytes(GC3Denum type);66 67 65 void reshape(int width, int height); 68 66 IntSize getInternalFramebufferSize();
Note: See TracChangeset
for help on using the changeset viewer.