Changeset 142567 in webkit


Ignore:
Timestamp:
Feb 11, 2013 6:38:54 PM (11 years ago)
Author:
kbr@google.com
Message:

Add temporary typedef to ANGLEWebKitBridge to support incompatible API upgrade
https://bugs.webkit.org/show_bug.cgi?id=109127

Reviewed by Dean Jackson.

No new tests. Built and tested WebKit and Chromium with this change.

  • platform/graphics/ANGLEWebKitBridge.cpp:

(WebCore):

Define temporary typedef spanning int -> size_t change.

(WebCore::getValidationResultValue):
(WebCore::getSymbolInfo):

Use temporary typedef.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r142565 r142567  
     12013-02-11  Kenneth Russell  <kbr@google.com>
     2
     3        Add temporary typedef to ANGLEWebKitBridge to support incompatible API upgrade
     4        https://bugs.webkit.org/show_bug.cgi?id=109127
     5
     6        Reviewed by Dean Jackson.
     7
     8        No new tests. Built and tested WebKit and Chromium with this change.
     9
     10        * platform/graphics/ANGLEWebKitBridge.cpp:
     11        (WebCore):
     12            Define temporary typedef spanning int -> size_t change.
     13        (WebCore::getValidationResultValue):
     14        (WebCore::getSymbolInfo):
     15            Use temporary typedef.
     16
    1172013-02-11  Kentaro Hara  <haraken@chromium.org>
    218
  • trunk/Source/WebCore/platform/graphics/ANGLEWebKitBridge.cpp

    r136430 r142567  
    3333namespace WebCore {
    3434
    35 inline static int getValidationResultValue(const ShHandle compiler, ShShaderInfo shaderInfo)
    36 {
    37     int value = -1;
     35// Temporary typedef to support an incompatible change in the ANGLE API.
     36#if !defined(ANGLE_SH_VERSION) || ANGLE_SH_VERSION < 108
     37typedef int ANGLEGetInfoType;
     38#else
     39typedef size_t ANGLEGetInfoType;
     40#endif
     41
     42inline static ANGLEGetInfoType getValidationResultValue(const ShHandle compiler, ShShaderInfo shaderInfo)
     43{
     44    ANGLEGetInfoType value = 0;
    3845    ShGetInfo(compiler, shaderInfo, &value);
    3946    return value;
     
    5663    }
    5764
    58     int numSymbols = getValidationResultValue(compiler, symbolType);
    59     if (numSymbols < 0)
    60         return false;
    61 
    62     int maxNameLength = getValidationResultValue(compiler, symbolMaxNameLengthType);
     65    ANGLEGetInfoType numSymbols = getValidationResultValue(compiler, symbolType);
     66
     67    ANGLEGetInfoType maxNameLength = getValidationResultValue(compiler, symbolMaxNameLengthType);
    6368    if (maxNameLength <= 1)
    6469        return false;
    6570
    66     int maxMappedNameLength = getValidationResultValue(compiler, SH_MAPPED_NAME_MAX_LENGTH);
     71    ANGLEGetInfoType maxMappedNameLength = getValidationResultValue(compiler, SH_MAPPED_NAME_MAX_LENGTH);
    6772    if (maxMappedNameLength <= 1)
    6873        return false;
     
    7277    Vector<char, 256> mappedNameBuffer(maxMappedNameLength);
    7378   
    74     for (int i = 0; i < numSymbols; ++i) {
     79    for (ANGLEGetInfoType i = 0; i < numSymbols; ++i) {
    7580        ANGLEShaderSymbol symbol;
    76         int nameLength = -1;
     81        ANGLEGetInfoType nameLength = 0;
    7782        switch (symbolType) {
    7883        case SH_ACTIVE_ATTRIBUTES:
     
    8893            return false;
    8994        }
    90         if (nameLength <= 0)
     95        if (!nameLength)
    9196            return false;
    9297       
Note: See TracChangeset for help on using the changeset viewer.