Title: [142567] trunk/Source/WebCore
Revision
142567
Author
[email protected]
Date
2013-02-11 18:38:54 -0800 (Mon, 11 Feb 2013)

Log 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.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (142566 => 142567)


--- trunk/Source/WebCore/ChangeLog	2013-02-12 02:38:35 UTC (rev 142566)
+++ trunk/Source/WebCore/ChangeLog	2013-02-12 02:38:54 UTC (rev 142567)
@@ -1,3 +1,19 @@
+2013-02-11  Kenneth Russell  <[email protected]>
+
+        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.
+
 2013-02-11  Kentaro Hara  <[email protected]>
 
         [V8] ScheduledAction::m_context can be empty, so we shouldn't

Modified: trunk/Source/WebCore/platform/graphics/ANGLEWebKitBridge.cpp (142566 => 142567)


--- trunk/Source/WebCore/platform/graphics/ANGLEWebKitBridge.cpp	2013-02-12 02:38:35 UTC (rev 142566)
+++ trunk/Source/WebCore/platform/graphics/ANGLEWebKitBridge.cpp	2013-02-12 02:38:54 UTC (rev 142567)
@@ -32,9 +32,16 @@
 
 namespace WebCore {
 
-inline static int getValidationResultValue(const ShHandle compiler, ShShaderInfo shaderInfo)
+// Temporary typedef to support an incompatible change in the ANGLE API.
+#if !defined(ANGLE_SH_VERSION) || ANGLE_SH_VERSION < 108
+typedef int ANGLEGetInfoType;
+#else
+typedef size_t ANGLEGetInfoType;
+#endif
+
+inline static ANGLEGetInfoType getValidationResultValue(const ShHandle compiler, ShShaderInfo shaderInfo)
 {
-    int value = -1;
+    ANGLEGetInfoType value = 0;
     ShGetInfo(compiler, shaderInfo, &value);
     return value;
 }
@@ -55,15 +62,13 @@
         return false;
     }
 
-    int numSymbols = getValidationResultValue(compiler, symbolType);
-    if (numSymbols < 0)
-        return false;
+    ANGLEGetInfoType numSymbols = getValidationResultValue(compiler, symbolType);
 
-    int maxNameLength = getValidationResultValue(compiler, symbolMaxNameLengthType);
+    ANGLEGetInfoType maxNameLength = getValidationResultValue(compiler, symbolMaxNameLengthType);
     if (maxNameLength <= 1)
         return false;
 
-    int maxMappedNameLength = getValidationResultValue(compiler, SH_MAPPED_NAME_MAX_LENGTH);
+    ANGLEGetInfoType maxMappedNameLength = getValidationResultValue(compiler, SH_MAPPED_NAME_MAX_LENGTH);
     if (maxMappedNameLength <= 1)
         return false;
 
@@ -71,9 +76,9 @@
     Vector<char, 256> nameBuffer(maxNameLength);
     Vector<char, 256> mappedNameBuffer(maxMappedNameLength);
     
-    for (int i = 0; i < numSymbols; ++i) {
+    for (ANGLEGetInfoType i = 0; i < numSymbols; ++i) {
         ANGLEShaderSymbol symbol;
-        int nameLength = -1;
+        ANGLEGetInfoType nameLength = 0;
         switch (symbolType) {
         case SH_ACTIVE_ATTRIBUTES:
             symbol.symbolType = SHADER_SYMBOL_TYPE_ATTRIBUTE;
@@ -87,7 +92,7 @@
             ASSERT_NOT_REACHED();
             return false;
         }
-        if (nameLength <= 0)
+        if (!nameLength)
             return false;
         
         // The ShGetActive* calls above are guaranteed to produce null-terminated strings for
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to