Changeset 76549 in webkit


Ignore:
Timestamp:
Jan 24, 2011 2:42:12 PM (13 years ago)
Author:
zmo@google.com
Message:

2011-01-24 Zhenyao Mo <zmo@google.com>

Reviewed by Darin Adler.

Remove sizeInBytes from GraphicsContext3D's various implementations
https://bugs.webkit.org/show_bug.cgi?id=52339

  • src/GraphicsContext3DChromium.cpp:
  • src/GraphicsContext3DInternal.h:

2011-01-24 Zhenyao Mo <zmo@google.com>

Reviewed by Darin Adler.

Remove sizeInBytes from GraphicsContext3D's various implementations
https://bugs.webkit.org/show_bug.cgi?id=52339

  • html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::sizeInBytes):
  • platform/graphics/GraphicsContext3D.h:
  • platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
  • platform/graphics/qt/GraphicsContext3DQt.cpp:
Location:
trunk/Source
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r76546 r76549  
     12011-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
    1142011-01-24  Adam Roben  <aroben@apple.com>
    215
  • trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp

    r76324 r76549  
    488488unsigned int WebGLRenderingContext::sizeInBytes(GC3Denum type)
    489489{
    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;
    491508}
    492509
  • trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h

    r76324 r76549  
    4848typedef unsigned char GC3Dboolean;
    4949typedef unsigned int GC3Dbitfield;
     50typedef signed char GC3Dbyte;
    5051typedef unsigned char GC3Dubyte;
     52typedef short GC3Dshort;
    5153typedef unsigned short GC3Dushort;
    5254typedef int GC3Dint;
     
    488490#endif
    489491
    490     // Helper to return the size in bytes of OpenGL data types
    491     // like GL_FLOAT, GL_INT, etc.
    492     unsigned int sizeInBytes(GC3Denum type);
    493 
    494492    // Helper to texImage2D with pixel==0 case: pixels are initialized to 0.
    495493    // Return true if no GL error is synthesized.
  • trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp

    r76324 r76549  
    14381438}
    14391439
    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 
    14621440void GraphicsContext3D::synthesizeGLError(GC3Denum error)
    14631441{
  • trunk/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp

    r75214 r76549  
    16121612}
    16131613
    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 
    16361614void GraphicsContext3D::synthesizeGLError(GC3Denum error)
    16371615{
  • trunk/Source/WebKit/chromium/ChangeLog

    r76527 r76549  
     12011-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
    1112011-01-24  Tony Chang  <tony@chromium.org>
    212
  • trunk/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp

    r75553 r76549  
    366366
    367367DELEGATE_TO_IMPL_R(makeContextCurrent, bool)
    368 DELEGATE_TO_IMPL_1R(sizeInBytes, GC3Denum, unsigned int)
    369368
    370369bool GraphicsContext3DInternal::isGLES2Compliant() const
     
    898897
    899898DELEGATE_TO_INTERNAL(makeContextCurrent)
    900 DELEGATE_TO_INTERNAL_1R(sizeInBytes, GC3Denum, unsigned int)
    901899DELEGATE_TO_INTERNAL_2(reshape, int, int)
    902900DELEGATE_TO_INTERNAL_R(getInternalFramebufferSize, IntSize)
  • trunk/Source/WebKit/chromium/src/GraphicsContext3DInternal.h

    r75214 r76549  
    6363    bool makeContextCurrent();
    6464
    65     unsigned int sizeInBytes(GC3Denum type);
    66 
    6765    void reshape(int width, int height);
    6866    IntSize getInternalFramebufferSize();
Note: See TracChangeset for help on using the changeset viewer.