Merge "TextLayoutCache Fix compilation issue"
diff --git a/api/current.txt b/api/current.txt
index 86b6d8f..5dc32ae 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -14788,6 +14788,7 @@
field public static final int FLAG_ONEWAY = 1; // 0x1
field public static final int INTERFACE_TRANSACTION = 1598968902; // 0x5f4e5446
field public static final int LAST_CALL_TRANSACTION = 16777215; // 0xffffff
+ field public static final int LIKE_TRANSACTION = 1598835019; // 0x5f4c494b
field public static final int PING_TRANSACTION = 1599098439; // 0x5f504e47
field public static final int TWEET_TRANSACTION = 1599362900; // 0x5f545754
}
diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c
index 34c0c2a..db72585 100644
--- a/cmds/installd/commands.c
+++ b/cmds/installd/commands.c
@@ -184,6 +184,7 @@
DIR *d;
struct dirent *de;
int64_t avail;
+ char datadir[PKG_PATH_MAX];
avail = disk_free();
if (avail < 0) return -1;
@@ -191,9 +192,14 @@
LOGI("free_cache(%" PRId64 ") avail %" PRId64 "\n", free_size, avail);
if (avail >= free_size) return 0;
- d = opendir(android_data_dir.path);
+ if (create_persona_path(datadir, 0)) {
+ LOGE("couldn't get directory for persona 0");
+ return -1;
+ }
+
+ d = opendir(datadir);
if (d == NULL) {
- LOGE("cannot open %s: %s\n", android_data_dir.path, strerror(errno));
+ LOGE("cannot open %s: %s\n", datadir, strerror(errno));
return -1;
}
dfd = dirfd(d);
@@ -578,19 +584,6 @@
return -1;
}
-int create_move_path(char path[PKG_PATH_MAX],
- const char* pkgname,
- const char* leaf,
- uid_t persona)
-{
- if ((android_data_dir.len + strlen(pkgname) + strlen(leaf) + 1) >= PKG_PATH_MAX) {
- return -1;
- }
-
- sprintf(path, "%s%s%s/%s", android_data_dir.path, PRIMARY_USER_PREFIX, pkgname, leaf);
- return 0;
-}
-
void mkinnerdirs(char* path, int basepos, mode_t mode, int uid, int gid,
struct stat* statbuf)
{
diff --git a/cmds/installd/installd.h b/cmds/installd/installd.h
index c5872b8..173cabf 100644
--- a/cmds/installd/installd.h
+++ b/cmds/installd/installd.h
@@ -105,6 +105,11 @@
int create_persona_path(char path[PKG_PATH_MAX],
uid_t persona);
+int create_move_path(char path[PKG_PATH_MAX],
+ const char* pkgname,
+ const char* leaf,
+ uid_t persona);
+
int is_valid_package_name(const char* pkgname);
int create_cache_path(char path[PKG_PATH_MAX], const char *src);
diff --git a/cmds/installd/tests/installd_utils_test.cpp b/cmds/installd/tests/installd_utils_test.cpp
index 1128fce..7cb9b37 100644
--- a/cmds/installd/tests/installd_utils_test.cpp
+++ b/cmds/installd/tests/installd_utils_test.cpp
@@ -34,6 +34,16 @@
#define TEST_SYSTEM_DIR1 "/system/app/"
#define TEST_SYSTEM_DIR2 "/vendor/app/"
+#define REALLY_LONG_APP_NAME "com.example." \
+ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa." \
+ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa." \
+ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+
+#define REALLY_LONG_LEAF_NAME "shared_prefs_shared_prefs_shared_prefs_shared_prefs_shared_prefs_" \
+ "shared_prefs_shared_prefs_shared_prefs_shared_prefs_shared_prefs_shared_prefs_" \
+ "shared_prefs_shared_prefs_shared_prefs_shared_prefs_shared_prefs_shared_prefs_" \
+ "shared_prefs_shared_prefs_shared_prefs_shared_prefs_shared_prefs_shared_prefs_"
+
namespace android {
class UtilsTest : public testing::Test {
@@ -210,7 +220,7 @@
TEST_F(UtilsTest, GetPathFromString_NullPathFail) {
dir_rec_t test1;
- EXPECT_EQ(-1, get_path_from_string(&test1, NULL))
+ EXPECT_EQ(-1, get_path_from_string(&test1, (const char *) NULL))
<< "Should not allow NULL as a path.";
}
@@ -327,6 +337,50 @@
<< "Package path should be in /data/app-private/";
}
+TEST_F(UtilsTest, CreatePersonaPath_Primary) {
+ char path[PKG_PATH_MAX];
+
+ EXPECT_EQ(0, create_persona_path(path, 0))
+ << "Should successfully build primary user path.";
+
+ EXPECT_STREQ("/data/data/", path)
+ << "Primary user should have correct path";
+}
+
+TEST_F(UtilsTest, CreatePersonaPath_Secondary) {
+ char path[PKG_PATH_MAX];
+
+ EXPECT_EQ(0, create_persona_path(path, 1))
+ << "Should successfully build primary user path.";
+
+ EXPECT_STREQ("/data/user/1/", path)
+ << "Primary user should have correct path";
+}
+
+TEST_F(UtilsTest, CreateMovePath_Primary) {
+ char path[PKG_PATH_MAX];
+
+ EXPECT_EQ(0, create_move_path(path, "com.android.test", "shared_prefs", 0))
+ << "Should be able to create move path for primary user";
+
+ EXPECT_STREQ("/data/data/com.android.test/shared_prefs", path)
+ << "Primary user package directory should be created correctly";
+}
+
+TEST_F(UtilsTest, CreateMovePath_Fail_AppTooLong) {
+ char path[PKG_PATH_MAX];
+
+ EXPECT_EQ(-1, create_move_path(path, REALLY_LONG_APP_NAME, "shared_prefs", 0))
+ << "Should fail to create move path for primary user";
+}
+
+TEST_F(UtilsTest, CreateMovePath_Fail_LeafTooLong) {
+ char path[PKG_PATH_MAX];
+
+ EXPECT_EQ(-1, create_move_path(path, "com.android.test", REALLY_LONG_LEAF_NAME, 0))
+ << "Should fail to create move path for primary user";
+}
+
TEST_F(UtilsTest, CopyAndAppend_Normal) {
//int copy_and_append(dir_rec_t* dst, dir_rec_t* src, char* suffix)
dir_rec_t dst;
diff --git a/cmds/installd/utils.c b/cmds/installd/utils.c
index 3099b83..a53a93c 100644
--- a/cmds/installd/utils.c
+++ b/cmds/installd/utils.c
@@ -109,7 +109,7 @@
uid_len = 0;
} else {
persona_prefix = SECONDARY_USER_PREFIX;
- uid_len = snprintf(NULL, 0, "%d", persona);
+ uid_len = snprintf(NULL, 0, "%d/", persona);
}
char *dst = path;
@@ -126,7 +126,7 @@
LOGE("Error building user path");
return -1;
}
- int ret = snprintf(dst, dst_size, "%d", persona);
+ int ret = snprintf(dst, dst_size, "%d/", persona);
if (ret < 0 || (size_t) ret != uid_len) {
LOGE("Error appending persona id to path");
return -1;
@@ -135,6 +135,20 @@
return 0;
}
+int create_move_path(char path[PKG_PATH_MAX],
+ const char* pkgname,
+ const char* leaf,
+ uid_t persona)
+{
+ if ((android_data_dir.len + strlen(PRIMARY_USER_PREFIX) + strlen(pkgname) + strlen(leaf) + 1)
+ >= PKG_PATH_MAX) {
+ return -1;
+ }
+
+ sprintf(path, "%s%s%s/%s", android_data_dir.path, PRIMARY_USER_PREFIX, pkgname, leaf);
+ return 0;
+}
+
/**
* Checks whether the package name is valid. Returns -1 on error and
* 0 on success.
diff --git a/core/java/android/accessibilityservice/AccessibilityService.java b/core/java/android/accessibilityservice/AccessibilityService.java
index 64a2755..211be52 100644
--- a/core/java/android/accessibilityservice/AccessibilityService.java
+++ b/core/java/android/accessibilityservice/AccessibilityService.java
@@ -16,8 +16,6 @@
package android.accessibilityservice;
-import com.android.internal.os.HandlerCaller;
-
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
@@ -25,8 +23,11 @@
import android.os.RemoteException;
import android.util.Log;
import android.view.accessibility.AccessibilityEvent;
+import android.view.accessibility.AccessibilityInteractionClient;
import android.view.accessibility.AccessibilityNodeInfo;
+import com.android.internal.os.HandlerCaller;
+
/**
* An accessibility service runs in the background and receives callbacks by the system
* when {@link AccessibilityEvent}s are fired. Such events denote some state transition
@@ -219,7 +220,7 @@
private AccessibilityServiceInfo mInfo;
- IAccessibilityServiceConnection mConnection;
+ private int mConnectionId;
/**
* Callback for {@link android.view.accessibility.AccessibilityEvent}s.
@@ -264,9 +265,11 @@
* AccessibilityManagerService.
*/
private void sendServiceInfo() {
- if (mInfo != null && mConnection != null) {
+ IAccessibilityServiceConnection connection =
+ AccessibilityInteractionClient.getInstance().getConnection(mConnectionId);
+ if (mInfo != null && connection != null) {
try {
- mConnection.setServiceInfo(mInfo);
+ connection.setServiceInfo(mInfo);
} catch (RemoteException re) {
Log.w(LOG_TAG, "Error while setting AccessibilityServiceInfo", re);
}
@@ -302,8 +305,9 @@
mCaller = new HandlerCaller(context, this);
}
- public void setConnection(IAccessibilityServiceConnection connection) {
- Message message = mCaller.obtainMessageO(DO_SET_SET_CONNECTION, connection);
+ public void setConnection(IAccessibilityServiceConnection connection, int connectionId) {
+ Message message = mCaller.obtainMessageIO(DO_SET_SET_CONNECTION, connectionId,
+ connection);
mCaller.sendMessage(message);
}
@@ -330,8 +334,19 @@
mTarget.onInterrupt();
return;
case DO_SET_SET_CONNECTION :
- mConnection = ((IAccessibilityServiceConnection) message.obj);
- mTarget.onServiceConnected();
+ final int connectionId = message.arg1;
+ IAccessibilityServiceConnection connection =
+ (IAccessibilityServiceConnection) message.obj;
+ if (connection != null) {
+ AccessibilityInteractionClient.getInstance().addConnection(connectionId,
+ connection);
+ mConnectionId = connectionId;
+ mTarget.onServiceConnected();
+ } else {
+ AccessibilityInteractionClient.getInstance().removeConnection(connectionId);
+ mConnectionId = AccessibilityInteractionClient.NO_ID;
+ // TODO: Do we need a onServiceDisconnected callback?
+ }
return;
default :
Log.w(LOG_TAG, "Unknown message type " + message.what);
diff --git a/core/java/android/accessibilityservice/IEventListener.aidl b/core/java/android/accessibilityservice/IEventListener.aidl
index 5b849f1..5536b3c 100644
--- a/core/java/android/accessibilityservice/IEventListener.aidl
+++ b/core/java/android/accessibilityservice/IEventListener.aidl
@@ -26,7 +26,7 @@
*/
oneway interface IEventListener {
- void setConnection(in IAccessibilityServiceConnection connection);
+ void setConnection(in IAccessibilityServiceConnection connection, int connectionId);
void onAccessibilityEvent(in AccessibilityEvent event);
diff --git a/core/java/android/net/InterfaceConfiguration.java b/core/java/android/net/InterfaceConfiguration.java
index bdfcb92..8cdd153 100644
--- a/core/java/android/net/InterfaceConfiguration.java
+++ b/core/java/android/net/InterfaceConfiguration.java
@@ -45,24 +45,8 @@
return builder.toString();
}
- /**
- * Return flags separated by spaces.
- */
- public String getFlags() {
- final int size = mFlags.size();
- if (size == 0) {
- return "";
- }
-
- final String[] flags = mFlags.toArray(new String[size]);
- final StringBuilder builder = new StringBuilder();
-
- builder.append(flags[0]);
- for (int i = 1; i < flags.length; i++) {
- builder.append(' ');
- builder.append(flags[i]);
- }
- return builder.toString();
+ public Iterable<String> getFlags() {
+ return mFlags;
}
public boolean hasFlag(String flag) {
diff --git a/core/java/android/os/IBinder.java b/core/java/android/os/IBinder.java
index 81defd6..0586d9e 100644
--- a/core/java/android/os/IBinder.java
+++ b/core/java/android/os/IBinder.java
@@ -128,6 +128,19 @@
int TWEET_TRANSACTION = ('_'<<24)|('T'<<16)|('W'<<8)|'T';
/**
+ * IBinder protocol transaction code: tell an app asynchronously that the
+ * caller likes it. The app is responsible for incrementing and maintaining
+ * its own like counter, and may display this value to the user to indicate the
+ * quality of the app. This is an optional command that applications do not
+ * need to handle, so the default implementation is to do nothing.
+ *
+ * <p>There is no response returned and nothing about the
+ * system will be functionally affected by it, but it will improve the
+ * app's self-esteem.
+ */
+ int LIKE_TRANSACTION = ('_'<<24)|('L'<<16)|('I'<<8)|'K';
+
+ /**
* Flag to {@link #transact}: this is a one-way call, meaning that the
* caller returns immediately, without waiting for a result from the
* callee. Applies only if the caller and callee are in different
diff --git a/core/java/android/server/BluetoothService.java b/core/java/android/server/BluetoothService.java
index a7d8cac..94fbbc8 100755
--- a/core/java/android/server/BluetoothService.java
+++ b/core/java/android/server/BluetoothService.java
@@ -145,7 +145,12 @@
private final ArrayList<String> mUuidIntentTracker;
private final HashMap<RemoteService, IBluetoothCallback> mUuidCallbackTracker;
- private final HashMap<Integer, Pair<Integer, IBinder>> mServiceRecordToPid;
+ private static class ServiceRecordClient {
+ int pid;
+ IBinder binder;
+ IBinder.DeathRecipient death;
+ }
+ private final HashMap<Integer, ServiceRecordClient> mServiceRecordToPid;
private final HashMap<String, BluetoothDeviceProfileState> mDeviceProfileState;
private final BluetoothProfileState mA2dpProfileState;
@@ -221,7 +226,7 @@
mDeviceOobData = new HashMap<String, Pair<byte[], byte[]>>();
mUuidIntentTracker = new ArrayList<String>();
mUuidCallbackTracker = new HashMap<RemoteService, IBluetoothCallback>();
- mServiceRecordToPid = new HashMap<Integer, Pair<Integer, IBinder>>();
+ mServiceRecordToPid = new HashMap<Integer, ServiceRecordClient>();
mDeviceProfileState = new HashMap<String, BluetoothDeviceProfileState>();
mA2dpProfileState = new BluetoothProfileState(mContext, BluetoothProfileState.A2DP);
mHfpProfileState = new BluetoothProfileState(mContext, BluetoothProfileState.HFP);
@@ -1528,11 +1533,17 @@
return -1;
}
- int pid = Binder.getCallingPid();
- mServiceRecordToPid.put(new Integer(handle), new Pair<Integer, IBinder>(pid, b));
+ ServiceRecordClient client = new ServiceRecordClient();
+ client.pid = Binder.getCallingPid();
+ client.binder = b;
+ client.death = new Reaper(handle, client.pid, RFCOMM_RECORD_REAPER);
+ mServiceRecordToPid.put(new Integer(handle), client);
try {
- b.linkToDeath(new Reaper(handle, pid, RFCOMM_RECORD_REAPER), 0);
- } catch (RemoteException e) {Log.e(TAG, "", e);}
+ b.linkToDeath(client.death, 0);
+ } catch (RemoteException e) {
+ Log.e(TAG, "", e);
+ client.death = null;
+ }
return handle;
}
@@ -1547,10 +1558,15 @@
}
private synchronized void checkAndRemoveRecord(int handle, int pid) {
- Pair<Integer, IBinder> pidPair = mServiceRecordToPid.get(handle);
- if (pidPair != null && pid == pidPair.first) {
+ ServiceRecordClient client = mServiceRecordToPid.get(handle);
+ if (client != null && pid == client.pid) {
if (DBG) Log.d(TAG, "Removing service record " +
Integer.toHexString(handle) + " for pid " + pid);
+
+ if (client.death != null) {
+ client.binder.unlinkToDeath(client.death, 0);
+ }
+
mServiceRecordToPid.remove(handle);
removeServiceRecordNative(handle);
}
@@ -1880,7 +1896,7 @@
private void dumpApplicationServiceRecords(PrintWriter pw) {
pw.println("\n--Application Service Records--");
for (Integer handle : mServiceRecordToPid.keySet()) {
- Integer pid = mServiceRecordToPid.get(handle).first;
+ Integer pid = mServiceRecordToPid.get(handle).pid;
pw.println("\tpid " + pid + " handle " + Integer.toHexString(handle));
}
}
diff --git a/core/java/android/service/wallpaper/WallpaperService.java b/core/java/android/service/wallpaper/WallpaperService.java
index 18167b6..7ce96c0 100644
--- a/core/java/android/service/wallpaper/WallpaperService.java
+++ b/core/java/android/service/wallpaper/WallpaperService.java
@@ -18,7 +18,6 @@
import com.android.internal.os.HandlerCaller;
import com.android.internal.view.BaseIWindow;
-import com.android.internal.view.BaseInputHandler;
import com.android.internal.view.BaseSurfaceHolder;
import android.annotation.SdkConstant;
@@ -45,8 +44,8 @@
import android.view.IWindowSession;
import android.view.InputChannel;
import android.view.InputDevice;
-import android.view.InputHandler;
-import android.view.InputQueue;
+import android.view.InputEvent;
+import android.view.InputEventReceiver;
import android.view.MotionEvent;
import android.view.SurfaceHolder;
import android.view.View;
@@ -228,24 +227,29 @@
}
};
-
- final InputHandler mInputHandler = new BaseInputHandler() {
+
+ final class WallpaperInputEventReceiver extends InputEventReceiver {
+ public WallpaperInputEventReceiver(InputChannel inputChannel, Looper looper) {
+ super(inputChannel, looper);
+ }
+
@Override
- public void handleMotion(MotionEvent event,
- InputQueue.FinishedCallback finishedCallback) {
+ public void onInputEvent(InputEvent event) {
boolean handled = false;
try {
- int source = event.getSource();
- if ((source & InputDevice.SOURCE_CLASS_POINTER) != 0) {
- dispatchPointer(event);
+ if (event instanceof MotionEvent
+ && (event.getSource() & InputDevice.SOURCE_CLASS_POINTER) != 0) {
+ MotionEvent dup = MotionEvent.obtainNoHistory((MotionEvent)event);
+ dispatchPointer(dup);
handled = true;
}
} finally {
- finishedCallback.finished(handled);
+ finishInputEvent(event, handled);
}
}
- };
-
+ }
+ WallpaperInputEventReceiver mInputEventReceiver;
+
final BaseIWindow mWindow = new BaseIWindow() {
@Override
public void resized(int w, int h, Rect coveredInsets,
@@ -534,6 +538,8 @@
}
Message msg = mCaller.obtainMessageO(MSG_TOUCH_EVENT, event);
mCaller.sendMessage(msg);
+ } else {
+ event.recycle();
}
}
@@ -599,8 +605,8 @@
}
mCreated = true;
- InputQueue.registerInputChannel(mInputChannel, mInputHandler,
- Looper.myQueue());
+ mInputEventReceiver = new WallpaperInputEventReceiver(
+ mInputChannel, Looper.myLooper());
}
mSurfaceHolder.mSurfaceLock.lock();
@@ -902,8 +908,9 @@
if (DEBUG) Log.v(TAG, "Removing window and destroying surface "
+ mSurfaceHolder.getSurface() + " of: " + this);
- if (mInputChannel != null) {
- InputQueue.unregisterInputChannel(mInputChannel);
+ if (mInputEventReceiver != null) {
+ mInputEventReceiver.dispose();
+ mInputEventReceiver = null;
}
mSession.remove(mWindow);
@@ -970,6 +977,8 @@
public void dispatchPointer(MotionEvent event) {
if (mEngine != null) {
mEngine.dispatchPointer(event);
+ } else {
+ event.recycle();
}
}
diff --git a/core/java/android/util/SparseArray.java b/core/java/android/util/SparseArray.java
index 7cf4579..366abd3 100644
--- a/core/java/android/util/SparseArray.java
+++ b/core/java/android/util/SparseArray.java
@@ -134,6 +134,7 @@
if (i != o) {
keys[o] = keys[i];
values[o] = val;
+ values[i] = null;
}
o++;
diff --git a/core/java/android/view/HardwareRenderer.java b/core/java/android/view/HardwareRenderer.java
index ccb6489..443acf6 100644
--- a/core/java/android/view/HardwareRenderer.java
+++ b/core/java/android/view/HardwareRenderer.java
@@ -837,10 +837,37 @@
(view.mPrivateFlags & View.INVALIDATED) == View.INVALIDATED;
view.mPrivateFlags &= ~View.INVALIDATED;
+ final long getDisplayListStartTime;
+ if (ViewDebug.DEBUG_LATENCY) {
+ getDisplayListStartTime = System.nanoTime();
+ }
+
DisplayList displayList = view.getDisplayList();
+
+ if (ViewDebug.DEBUG_LATENCY) {
+ long now = System.nanoTime();
+ Log.d(ViewDebug.DEBUG_LATENCY_TAG, "- getDisplayList() took "
+ + ((now - getDisplayListStartTime) * 0.000001f) + "ms");
+ }
+
if (displayList != null) {
- if (canvas.drawDisplayList(displayList, view.getWidth(),
- view.getHeight(), mRedrawClip)) {
+ final long drawDisplayListStartTime;
+ if (ViewDebug.DEBUG_LATENCY) {
+ drawDisplayListStartTime = System.nanoTime();
+ }
+
+ boolean invalidateNeeded = canvas.drawDisplayList(
+ displayList, view.getWidth(),
+ view.getHeight(), mRedrawClip);
+
+ if (ViewDebug.DEBUG_LATENCY) {
+ long now = System.nanoTime();
+ Log.d(ViewDebug.DEBUG_LATENCY_TAG, "- drawDisplayList() took "
+ + ((now - drawDisplayListStartTime) * 0.000001f)
+ + "ms, invalidateNeeded=" + invalidateNeeded + ".");
+ }
+
+ if (invalidateNeeded) {
if (mRedrawClip.isEmpty() || view.getParent() == null) {
view.invalidate();
} else {
@@ -872,7 +899,19 @@
attachInfo.mIgnoreDirtyState = false;
+ final long eglSwapBuffersStartTime;
+ if (ViewDebug.DEBUG_LATENCY) {
+ eglSwapBuffersStartTime = System.nanoTime();
+ }
+
sEgl.eglSwapBuffers(sEglDisplay, mEglSurface);
+
+ if (ViewDebug.DEBUG_LATENCY) {
+ long now = System.nanoTime();
+ Log.d(ViewDebug.DEBUG_LATENCY_TAG, "- eglSwapBuffers() took "
+ + ((now - eglSwapBuffersStartTime) * 0.000001f) + "ms");
+ }
+
checkEglErrors();
return dirty == null;
diff --git a/core/java/android/view/InputEvent.java b/core/java/android/view/InputEvent.java
index 01ddcc9..c42bbdc 100755
--- a/core/java/android/view/InputEvent.java
+++ b/core/java/android/view/InputEvent.java
@@ -19,6 +19,8 @@
import android.os.Parcel;
import android.os.Parcelable;
+import java.util.concurrent.atomic.AtomicInteger;
+
/**
* Common base class for input events.
*/
@@ -27,8 +29,21 @@
protected static final int PARCEL_TOKEN_MOTION_EVENT = 1;
/** @hide */
protected static final int PARCEL_TOKEN_KEY_EVENT = 2;
-
+
+ // Next sequence number.
+ private static final AtomicInteger mNextSeq = new AtomicInteger();
+
+ /** @hide */
+ protected int mSeq;
+
+ /** @hide */
+ protected boolean mRecycled;
+
+ private static final boolean TRACK_RECYCLED_LOCATION = false;
+ private RuntimeException mRecycledLocation;
+
/*package*/ InputEvent() {
+ mSeq = mNextSeq.getAndIncrement();
}
/**
@@ -82,7 +97,29 @@
* objects are fine. See {@link KeyEvent#recycle()} for details.
* @hide
*/
- public abstract void recycle();
+ public void recycle() {
+ if (TRACK_RECYCLED_LOCATION) {
+ if (mRecycledLocation != null) {
+ throw new RuntimeException(toString() + " recycled twice!", mRecycledLocation);
+ }
+ mRecycledLocation = new RuntimeException("Last recycled here");
+ } else {
+ if (mRecycled) {
+ throw new RuntimeException(toString() + " recycled twice!");
+ }
+ mRecycled = true;
+ }
+ }
+
+ /**
+ * Reinitializes the event on reuse (after recycling).
+ * @hide
+ */
+ protected void prepareForReuse() {
+ mRecycled = false;
+ mRecycledLocation = null;
+ mSeq = mNextSeq.getAndIncrement();
+ }
/**
* Gets a private flag that indicates when the system has detected that this input event
@@ -113,6 +150,22 @@
*/
public abstract long getEventTimeNano();
+ /**
+ * Gets the unique sequence number of this event.
+ * Every input event that is created or received by a process has a
+ * unique sequence number. Moreover, a new sequence number is obtained
+ * each time an event object is recycled.
+ *
+ * Sequence numbers are only guaranteed to be locally unique within a process.
+ * Sequence numbers are not preserved when events are parceled.
+ *
+ * @return The unique sequence number of this event.
+ * @hide
+ */
+ public int getSequenceNumber() {
+ return mSeq;
+ }
+
public int describeContents() {
return 0;
}
diff --git a/core/java/android/view/InputEventConsistencyVerifier.java b/core/java/android/view/InputEventConsistencyVerifier.java
index 9b081b2..fafe416 100644
--- a/core/java/android/view/InputEventConsistencyVerifier.java
+++ b/core/java/android/view/InputEventConsistencyVerifier.java
@@ -58,7 +58,7 @@
// so that the verifier can detect when it has been asked to verify the same event twice.
// It does not make sense to examine the contents of the last event since it may have
// been recycled.
- private InputEvent mLastEvent;
+ private int mLastEventSeq;
private String mLastEventType;
private int mLastNestingLevel;
@@ -140,7 +140,7 @@
* Resets the state of the input event consistency verifier.
*/
public void reset() {
- mLastEvent = null;
+ mLastEventSeq = -1;
mLastNestingLevel = 0;
mTrackballDown = false;
mTrackballUnhandled = false;
@@ -573,17 +573,18 @@
private boolean startEvent(InputEvent event, int nestingLevel, String eventType) {
// Ignore the event if we already checked it at a higher nesting level.
- if (event == mLastEvent && nestingLevel < mLastNestingLevel
+ final int seq = event.getSequenceNumber();
+ if (seq == mLastEventSeq && nestingLevel < mLastNestingLevel
&& eventType == mLastEventType) {
return false;
}
if (nestingLevel > 0) {
- mLastEvent = event;
+ mLastEventSeq = seq;
mLastEventType = eventType;
mLastNestingLevel = nestingLevel;
} else {
- mLastEvent = null;
+ mLastEventSeq = -1;
mLastEventType = null;
mLastNestingLevel = 0;
}
diff --git a/core/java/android/view/InputEventReceiver.java b/core/java/android/view/InputEventReceiver.java
new file mode 100644
index 0000000..abb5281
--- /dev/null
+++ b/core/java/android/view/InputEventReceiver.java
@@ -0,0 +1,151 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.view;
+
+import dalvik.system.CloseGuard;
+
+import android.os.Looper;
+import android.os.MessageQueue;
+import android.util.Log;
+
+/**
+ * Provides a low-level mechanism for an application to receive input events.
+ * @hide
+ */
+public abstract class InputEventReceiver {
+ private static final String TAG = "InputEventReceiver";
+
+ private final CloseGuard mCloseGuard = CloseGuard.get();
+
+ private int mReceiverPtr;
+
+ // We keep references to the input channel and message queue objects here so that
+ // they are not GC'd while the native peer of the receiver is using them.
+ private InputChannel mInputChannel;
+ private MessageQueue mMessageQueue;
+
+ // The sequence number of the event that is in progress.
+ private int mEventSequenceNumberInProgress = -1;
+
+ private static native int nativeInit(InputEventReceiver receiver,
+ InputChannel inputChannel, MessageQueue messageQueue);
+ private static native void nativeDispose(int receiverPtr);
+ private static native void nativeFinishInputEvent(int receiverPtr, boolean handled);
+
+ /**
+ * Creates an input event receiver bound to the specified input channel.
+ *
+ * @param inputChannel The input channel.
+ * @param looper The looper to use when invoking callbacks.
+ */
+ public InputEventReceiver(InputChannel inputChannel, Looper looper) {
+ if (inputChannel == null) {
+ throw new IllegalArgumentException("inputChannel must not be null");
+ }
+ if (looper == null) {
+ throw new IllegalArgumentException("looper must not be null");
+ }
+
+ mInputChannel = inputChannel;
+ mMessageQueue = looper.getQueue();
+ mReceiverPtr = nativeInit(this, inputChannel, mMessageQueue);
+
+ mCloseGuard.open("dispose");
+ }
+
+ @Override
+ protected void finalize() throws Throwable {
+ try {
+ dispose();
+ } finally {
+ super.finalize();
+ }
+ }
+
+ /**
+ * Disposes the receiver.
+ */
+ public void dispose() {
+ if (mCloseGuard != null) {
+ mCloseGuard.close();
+ }
+ if (mReceiverPtr != 0) {
+ nativeDispose(mReceiverPtr);
+ mReceiverPtr = 0;
+ }
+ mInputChannel = null;
+ mMessageQueue = null;
+ }
+
+ /**
+ * Called when an input event is received.
+ * The recipient should process the input event and then call {@link #finishInputEvent}
+ * to indicate whether the event was handled. No new input events will be received
+ * until {@link #finishInputEvent} is called.
+ *
+ * @param event The input event that was received.
+ */
+ public void onInputEvent(InputEvent event) {
+ finishInputEvent(event, false);
+ }
+
+ /**
+ * Finishes an input event and indicates whether it was handled.
+ *
+ * @param event The input event that was finished.
+ * @param handled True if the event was handled.
+ */
+ public void finishInputEvent(InputEvent event, boolean handled) {
+ if (event == null) {
+ throw new IllegalArgumentException("event must not be null");
+ }
+ if (mReceiverPtr == 0) {
+ Log.w(TAG, "Attempted to finish an input event but the input event "
+ + "receiver has already been disposed.");
+ } else {
+ if (event.getSequenceNumber() != mEventSequenceNumberInProgress) {
+ Log.w(TAG, "Attempted to finish an input event that is not in progress.");
+ } else {
+ mEventSequenceNumberInProgress = -1;
+ nativeFinishInputEvent(mReceiverPtr, handled);
+ }
+ }
+ recycleInputEvent(event);
+ }
+
+ // Called from native code.
+ @SuppressWarnings("unused")
+ private void dispatchInputEvent(InputEvent event) {
+ mEventSequenceNumberInProgress = event.getSequenceNumber();
+ onInputEvent(event);
+ }
+
+ private static void recycleInputEvent(InputEvent event) {
+ if (event instanceof MotionEvent) {
+ // Event though key events are also recyclable, we only recycle motion events.
+ // Historically, key events were not recyclable and applications expect
+ // them to be immutable. We only ever recycle key events behind the
+ // scenes where an application never sees them (so, not here).
+ event.recycle();
+ }
+ }
+
+ public static interface Factory {
+ public InputEventReceiver createInputEventReceiver(
+ InputChannel inputChannel, Looper looper);
+ }
+}
diff --git a/core/java/android/view/InputHandler.java b/core/java/android/view/InputHandler.java
deleted file mode 100644
index 14ce14c..0000000
--- a/core/java/android/view/InputHandler.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2010 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.view;
-
-/**
- * Handles input messages that arrive on an input channel.
- * @hide
- */
-public interface InputHandler {
- /**
- * Handle a key event.
- * It is the responsibility of the callee to ensure that the finished callback is
- * eventually invoked when the event processing is finished and the input system
- * can send the next event.
- * @param event The key event data.
- * @param finishedCallback The callback to invoke when event processing is finished.
- */
- public void handleKey(KeyEvent event, InputQueue.FinishedCallback finishedCallback);
-
- /**
- * Handle a motion event.
- * It is the responsibility of the callee to ensure that the finished callback is
- * eventually invoked when the event processing is finished and the input system
- * can send the next event.
- * @param event The motion event data.
- * @param finishedCallback The callback to invoke when event processing is finished.
- */
- public void handleMotion(MotionEvent event, InputQueue.FinishedCallback finishedCallback);
-}
diff --git a/core/java/android/view/InputQueue.java b/core/java/android/view/InputQueue.java
index 5735b639..909a3b2 100644
--- a/core/java/android/view/InputQueue.java
+++ b/core/java/android/view/InputQueue.java
@@ -16,18 +16,11 @@
package android.view;
-import android.os.MessageQueue;
-import android.util.Slog;
-
/**
* An input queue provides a mechanism for an application to receive incoming
* input events. Currently only usable from native code.
*/
public final class InputQueue {
- private static final String TAG = "InputQueue";
-
- private static final boolean DEBUG = false;
-
/**
* Interface to receive notification of when an InputQueue is associated
* and dissociated with a thread.
@@ -48,13 +41,6 @@
final InputChannel mChannel;
- private static final Object sLock = new Object();
-
- private static native void nativeRegisterInputChannel(InputChannel inputChannel,
- InputHandler inputHandler, MessageQueue messageQueue);
- private static native void nativeUnregisterInputChannel(InputChannel inputChannel);
- private static native void nativeFinished(long finishedToken, boolean handled);
-
/** @hide */
public InputQueue(InputChannel channel) {
mChannel = channel;
@@ -64,121 +50,4 @@
public InputChannel getInputChannel() {
return mChannel;
}
-
- /**
- * Registers an input channel and handler.
- * @param inputChannel The input channel to register.
- * @param inputHandler The input handler to input events send to the target.
- * @param messageQueue The message queue on whose thread the handler should be invoked.
- * @hide
- */
- public static void registerInputChannel(InputChannel inputChannel, InputHandler inputHandler,
- MessageQueue messageQueue) {
- if (inputChannel == null) {
- throw new IllegalArgumentException("inputChannel must not be null");
- }
- if (inputHandler == null) {
- throw new IllegalArgumentException("inputHandler must not be null");
- }
- if (messageQueue == null) {
- throw new IllegalArgumentException("messageQueue must not be null");
- }
-
- synchronized (sLock) {
- if (DEBUG) {
- Slog.d(TAG, "Registering input channel '" + inputChannel + "'");
- }
-
- nativeRegisterInputChannel(inputChannel, inputHandler, messageQueue);
- }
- }
-
- /**
- * Unregisters an input channel.
- * Does nothing if the channel is not currently registered.
- * @param inputChannel The input channel to unregister.
- * @hide
- */
- public static void unregisterInputChannel(InputChannel inputChannel) {
- if (inputChannel == null) {
- throw new IllegalArgumentException("inputChannel must not be null");
- }
-
- synchronized (sLock) {
- if (DEBUG) {
- Slog.d(TAG, "Unregistering input channel '" + inputChannel + "'");
- }
-
- nativeUnregisterInputChannel(inputChannel);
- }
- }
-
- @SuppressWarnings("unused")
- private static void dispatchKeyEvent(InputHandler inputHandler,
- KeyEvent event, long finishedToken) {
- FinishedCallback finishedCallback = FinishedCallback.obtain(finishedToken);
- inputHandler.handleKey(event, finishedCallback);
- }
-
- @SuppressWarnings("unused")
- private static void dispatchMotionEvent(InputHandler inputHandler,
- MotionEvent event, long finishedToken) {
- FinishedCallback finishedCallback = FinishedCallback.obtain(finishedToken);
- inputHandler.handleMotion(event, finishedCallback);
- }
-
- /**
- * A callback that must be invoked to when finished processing an event.
- * @hide
- */
- public static final class FinishedCallback {
- private static final boolean DEBUG_RECYCLING = false;
-
- private static final int RECYCLE_MAX_COUNT = 4;
-
- private static FinishedCallback sRecycleHead;
- private static int sRecycleCount;
-
- private FinishedCallback mRecycleNext;
- private long mFinishedToken;
-
- private FinishedCallback() {
- }
-
- public static FinishedCallback obtain(long finishedToken) {
- synchronized (sLock) {
- FinishedCallback callback = sRecycleHead;
- if (callback != null) {
- sRecycleHead = callback.mRecycleNext;
- sRecycleCount -= 1;
- callback.mRecycleNext = null;
- } else {
- callback = new FinishedCallback();
- }
- callback.mFinishedToken = finishedToken;
- return callback;
- }
- }
-
- public void finished(boolean handled) {
- synchronized (sLock) {
- if (mFinishedToken == -1) {
- throw new IllegalStateException("Event finished callback already invoked.");
- }
-
- nativeFinished(mFinishedToken, handled);
- mFinishedToken = -1;
-
- if (sRecycleCount < RECYCLE_MAX_COUNT) {
- mRecycleNext = sRecycleHead;
- sRecycleHead = this;
- sRecycleCount += 1;
-
- if (DEBUG_RECYCLING) {
- Slog.d(TAG, "Recycled finished callbacks: " + sRecycleCount);
- }
- }
- }
- }
- }
}
diff --git a/core/java/android/view/KeyEvent.java b/core/java/android/view/KeyEvent.java
index f53e42c..9a46aab 100755
--- a/core/java/android/view/KeyEvent.java
+++ b/core/java/android/view/KeyEvent.java
@@ -1225,7 +1225,6 @@
private static KeyEvent gRecyclerTop;
private KeyEvent mNext;
- private boolean mRecycled;
private int mDeviceId;
private int mSource;
@@ -1535,8 +1534,8 @@
gRecyclerTop = ev.mNext;
gRecyclerUsed -= 1;
}
- ev.mRecycled = false;
ev.mNext = null;
+ ev.prepareForReuse();
return ev;
}
@@ -1598,10 +1597,7 @@
* @hide
*/
public final void recycle() {
- if (mRecycled) {
- throw new RuntimeException(toString() + " recycled twice!");
- }
- mRecycled = true;
+ super.recycle();
mCharacters = null;
synchronized (gRecyclerLock) {
diff --git a/core/java/android/view/MotionEvent.java b/core/java/android/view/MotionEvent.java
index 8e0ab1a..e49193e 100644
--- a/core/java/android/view/MotionEvent.java
+++ b/core/java/android/view/MotionEvent.java
@@ -167,7 +167,6 @@
*/
public final class MotionEvent extends InputEvent implements Parcelable {
private static final long NS_PER_MS = 1000000;
- private static final boolean TRACK_RECYCLED_LOCATION = false;
/**
* An invalid pointer id.
@@ -1315,8 +1314,6 @@
private int mNativePtr;
private MotionEvent mNext;
- private RuntimeException mRecycledLocation;
- private boolean mRecycled;
private static native int nativeInitialize(int nativePtr,
int deviceId, int source, int action, int flags, int edgeFlags,
@@ -1397,9 +1394,8 @@
gRecyclerTop = ev.mNext;
gRecyclerUsed -= 1;
}
- ev.mRecycledLocation = null;
- ev.mRecycled = false;
ev.mNext = null;
+ ev.prepareForReuse();
return ev;
}
@@ -1647,19 +1643,7 @@
* this function you must not ever touch the event again.
*/
public final void recycle() {
- // Ensure recycle is only called once!
- if (TRACK_RECYCLED_LOCATION) {
- if (mRecycledLocation != null) {
- throw new RuntimeException(toString() + " recycled twice!", mRecycledLocation);
- }
- mRecycledLocation = new RuntimeException("Last recycled here");
- //Log.w("MotionEvent", "Recycling event " + this, mRecycledLocation);
- } else {
- if (mRecycled) {
- throw new RuntimeException(toString() + " recycled twice!");
- }
- mRecycled = true;
- }
+ super.recycle();
synchronized (gRecyclerLock) {
if (gRecyclerUsed < MAX_RECYCLED) {
diff --git a/core/java/android/view/ViewDebug.java b/core/java/android/view/ViewDebug.java
index 65e72c9..c1db572 100644
--- a/core/java/android/view/ViewDebug.java
+++ b/core/java/android/view/ViewDebug.java
@@ -127,16 +127,19 @@
* Logs the relative difference between the time an event was created and the time it
* was delivered.
*
- * Logs the time spent waiting for Surface.lockCanvas() or eglSwapBuffers().
- * This is time that the event loop spends blocked and unresponsive. Ideally, drawing
- * and animations should be perfectly synchronized with VSYNC so that swap buffers
- * is instantaneous.
+ * Logs the time spent waiting for Surface.lockCanvas(), Surface.unlockCanvasAndPost()
+ * or eglSwapBuffers(). This is time that the event loop spends blocked and unresponsive.
+ * Ideally, drawing and animations should be perfectly synchronized with VSYNC so that
+ * dequeuing and queueing buffers is instantaneous.
*
- * Logs the time spent in ViewRoot.performTraversals() or ViewRoot.draw().
+ * Logs the time spent in ViewRoot.performTraversals() and ViewRoot.performDraw().
* @hide
*/
public static final boolean DEBUG_LATENCY = false;
+ /** @hide */
+ public static final String DEBUG_LATENCY_TAG = "ViewLatency";
+
/**
* <p>Enables or disables views consistency check. Even when this property is enabled,
* view consistency checks happen only if {@link false} is set
diff --git a/core/java/android/view/ViewPropertyAnimator.java b/core/java/android/view/ViewPropertyAnimator.java
index 84dc7d8..89a1ef2 100644
--- a/core/java/android/view/ViewPropertyAnimator.java
+++ b/core/java/android/view/ViewPropertyAnimator.java
@@ -837,6 +837,11 @@
*/
@Override
public void onAnimationUpdate(ValueAnimator animation) {
+ PropertyBundle propertyBundle = mAnimatorMap.get(animation);
+ if (propertyBundle == null) {
+ // Shouldn't happen, but just to play it safe
+ return;
+ }
// alpha requires slightly different treatment than the other (transform) properties.
// The logic in setAlpha() is not simply setting mAlpha, plus the invalidation
// logic is dependent on how the view handles an internal call to onSetAlpha().
@@ -845,7 +850,6 @@
boolean alphaHandled = false;
mView.invalidateParentCaches();
float fraction = animation.getAnimatedFraction();
- PropertyBundle propertyBundle = mAnimatorMap.get(animation);
int propertyMask = propertyBundle.mPropertyMask;
if ((propertyMask & TRANSFORM_MASK) != 0) {
mView.invalidate(false);
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index 5060f83..f23c312 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -154,9 +154,6 @@
final TypedValue mTmpValue = new TypedValue();
final InputMethodCallback mInputMethodCallback;
- final SparseArray<Object> mPendingEvents = new SparseArray<Object>();
- int mPendingEventSeq = 0;
-
final Thread mThread;
final WindowLeaked mLocation;
@@ -219,7 +216,16 @@
boolean mNewSurfaceNeeded;
boolean mHasHadWindowFocus;
boolean mLastWasImTarget;
- InputEventMessage mPendingInputEvents = null;
+
+ // Pool of queued input events.
+ private static final int MAX_QUEUED_INPUT_EVENT_POOL_SIZE = 10;
+ private QueuedInputEvent mQueuedInputEventPool;
+ private int mQueuedInputEventPoolSize;
+
+ // Input event queue.
+ QueuedInputEvent mFirstPendingInputEvent;
+ QueuedInputEvent mCurrentInputEvent;
+ boolean mProcessInputEventsPending;
boolean mWindowAttributesChanged = false;
int mWindowAttributesChangesFlag = 0;
@@ -552,8 +558,8 @@
mInputQueue = new InputQueue(mInputChannel);
mInputQueueCallback.onInputQueueCreated(mInputQueue);
} else {
- InputQueue.registerInputChannel(mInputChannel, mInputHandler,
- Looper.myQueue());
+ mInputEventReceiver = new WindowInputEventReceiver(mInputChannel,
+ Looper.myLooper());
}
}
@@ -841,23 +847,11 @@
}
}
- private void processInputEvents(boolean outOfOrder) {
- while (mPendingInputEvents != null) {
- handleMessage(mPendingInputEvents.mMessage);
- InputEventMessage tmpMessage = mPendingInputEvents;
- mPendingInputEvents = mPendingInputEvents.mNext;
- tmpMessage.recycle();
- if (outOfOrder) {
- removeMessages(PROCESS_INPUT_EVENTS);
- }
- }
- }
-
private void performTraversals() {
// cache mView since it is used so much below...
final View host = mView;
- processInputEvents(true);
+ processInputEvents();
if (DBG) {
System.out.println("======================================");
@@ -2024,7 +2018,19 @@
canvas.setScreenDensity(scalingRequired
? DisplayMetrics.DENSITY_DEVICE : 0);
mAttachInfo.mSetIgnoreDirtyState = false;
+
+ final long drawStartTime;
+ if (ViewDebug.DEBUG_LATENCY) {
+ drawStartTime = System.nanoTime();
+ }
+
mView.draw(canvas);
+
+ if (ViewDebug.DEBUG_LATENCY) {
+ long now = System.nanoTime();
+ Log.d(ViewDebug.DEBUG_LATENCY_TAG, "- draw() took "
+ + ((now - drawStartTime) * 0.000001f) + "ms");
+ }
} finally {
if (!mAttachInfo.mSetIgnoreDirtyState) {
// Only clear the flag if it was not set during the mView.draw() call
@@ -2040,14 +2046,24 @@
EventLog.writeEvent(60000, SystemClock.elapsedRealtime() - startTime);
}
}
-
} finally {
- surface.unlockCanvasAndPost(canvas);
- }
- }
+ final long unlockCanvasAndPostStartTime;
+ if (ViewDebug.DEBUG_LATENCY) {
+ unlockCanvasAndPostStartTime = System.nanoTime();
+ }
- if (LOCAL_LOGV) {
- Log.v(TAG, "Surface " + surface + " unlockCanvasAndPost");
+ surface.unlockCanvasAndPost(canvas);
+
+ if (ViewDebug.DEBUG_LATENCY) {
+ long now = System.nanoTime();
+ Log.d(ViewDebug.DEBUG_LATENCY_TAG, "- unlockCanvasAndPost() took "
+ + ((now - unlockCanvasAndPostStartTime) * 0.000001f) + "ms");
+ }
+
+ if (LOCAL_LOGV) {
+ Log.v(TAG, "Surface " + surface + " unlockCanvasAndPost");
+ }
+ }
}
if (animating) {
@@ -2266,8 +2282,9 @@
mInputQueueCallback.onInputQueueDestroyed(mInputQueue);
mInputQueueCallback = null;
mInputQueue = null;
- } else if (mInputChannel != null) {
- InputQueue.unregisterInputChannel(mInputChannel);
+ } else if (mInputEventReceiver != null) {
+ mInputEventReceiver.dispose();
+ mInputEventReceiver = null;
}
try {
sWindowSession.remove(mWindow);
@@ -2344,7 +2361,7 @@
public final static int DISPATCH_TRACKBALL = 1007;
public final static int DISPATCH_APP_VISIBILITY = 1008;
public final static int DISPATCH_GET_NEW_SURFACE = 1009;
- public final static int FINISHED_EVENT = 1010;
+ public final static int IME_FINISHED_EVENT = 1010;
public final static int DISPATCH_KEY_FROM_IME = 1011;
public final static int FINISH_INPUT_CONNECTION = 1012;
public final static int CHECK_FOCUS = 1013;
@@ -2358,7 +2375,7 @@
public final static int DO_FIND_ACCESSIBLITY_NODE_INFO_BY_ACCESSIBILITY_ID = 1021;
public final static int DO_FIND_ACCESSIBLITY_NODE_INFO_BY_VIEW_ID = 1022;
public final static int DO_FIND_ACCESSIBLITY_NODE_INFO_BY_TEXT = 1023;
- public final static int PROCESS_INPUT_EVENTS = 1024;
+ public final static int DO_PROCESS_INPUT_EVENTS = 1024;
@Override
public String getMessageName(Message message) {
@@ -2383,8 +2400,8 @@
return "DISPATCH_APP_VISIBILITY";
case DISPATCH_GET_NEW_SURFACE:
return "DISPATCH_GET_NEW_SURFACE";
- case FINISHED_EVENT:
- return "FINISHED_EVENT";
+ case IME_FINISHED_EVENT:
+ return "IME_FINISHED_EVENT";
case DISPATCH_KEY_FROM_IME:
return "DISPATCH_KEY_FROM_IME";
case FINISH_INPUT_CONNECTION:
@@ -2411,8 +2428,8 @@
return "DO_FIND_ACCESSIBLITY_NODE_INFO_BY_VIEW_ID";
case DO_FIND_ACCESSIBLITY_NODE_INFO_BY_TEXT:
return "DO_FIND_ACCESSIBLITY_NODE_INFO_BY_TEXT";
- case PROCESS_INPUT_EVENTS:
- return "PROCESS_INPUT_EVENTS";
+ case DO_PROCESS_INPUT_EVENTS:
+ return "DO_PROCESS_INPUT_EVENTS";
}
return super.getMessageName(message);
}
@@ -2437,17 +2454,22 @@
if (ViewDebug.DEBUG_LATENCY) {
traversalStartTime = System.nanoTime();
mLastDrawDurationNanos = 0;
+ if (mLastTraversalFinishedTimeNanos != 0) {
+ Log.d(ViewDebug.DEBUG_LATENCY_TAG, "Starting performTraversals(); it has been "
+ + ((traversalStartTime - mLastTraversalFinishedTimeNanos) * 0.000001f)
+ + "ms since the last traversals finished.");
+ } else {
+ Log.d(ViewDebug.DEBUG_LATENCY_TAG, "Starting performTraversals().");
+ }
}
performTraversals();
if (ViewDebug.DEBUG_LATENCY) {
long now = System.nanoTime();
- Log.d(TAG, "Latency: Spent "
+ Log.d(ViewDebug.DEBUG_LATENCY_TAG, "performTraversals() took "
+ ((now - traversalStartTime) * 0.000001f)
- + "ms in performTraversals(), with "
- + (mLastDrawDurationNanos * 0.000001f)
- + "ms of that time in draw()");
+ + "ms.");
mLastTraversalFinishedTimeNanos = now;
}
@@ -2456,23 +2478,12 @@
mProfile = false;
}
break;
- case FINISHED_EVENT:
- handleFinishedEvent(msg.arg1, msg.arg2 != 0);
+ case IME_FINISHED_EVENT:
+ handleImeFinishedEvent(msg.arg1, msg.arg2 != 0);
break;
- case DISPATCH_KEY:
- deliverKeyEvent((KeyEvent)msg.obj, msg.arg1 != 0);
- break;
- case DISPATCH_POINTER:
- deliverPointerEvent((MotionEvent) msg.obj, msg.arg1 != 0);
- break;
- case DISPATCH_TRACKBALL:
- deliverTrackballEvent((MotionEvent) msg.obj, msg.arg1 != 0);
- break;
- case DISPATCH_GENERIC_MOTION:
- deliverGenericMotionEvent((MotionEvent) msg.obj, msg.arg1 != 0);
- break;
- case PROCESS_INPUT_EVENTS:
- processInputEvents(false);
+ case DO_PROCESS_INPUT_EVENTS:
+ mProcessInputEventsPending = false;
+ processInputEvents();
break;
case DISPATCH_APP_VISIBILITY:
handleAppVisibility(msg.arg1 != 0);
@@ -2594,7 +2605,7 @@
//noinspection UnusedAssignment
event = KeyEvent.changeFlags(event, event.getFlags() & ~KeyEvent.FLAG_FROM_SYSTEM);
}
- deliverKeyEventPostIme((KeyEvent)msg.obj, false);
+ enqueueInputEvent(event, null, QueuedInputEvent.FLAG_DELIVER_POST_IME);
} break;
case FINISH_INPUT_CONNECTION: {
InputMethodManager imm = InputMethodManager.peekInstance();
@@ -2656,70 +2667,6 @@
}
}
- private void startInputEvent(InputQueue.FinishedCallback finishedCallback) {
- if (mFinishedCallback != null) {
- Slog.w(TAG, "Received a new input event from the input queue but there is "
- + "already an unfinished input event in progress.");
- }
-
- if (ViewDebug.DEBUG_LATENCY) {
- mInputEventReceiveTimeNanos = System.nanoTime();
- mInputEventDeliverTimeNanos = 0;
- mInputEventDeliverPostImeTimeNanos = 0;
- }
-
- mFinishedCallback = finishedCallback;
- }
-
- private void finishInputEvent(InputEvent event, boolean handled) {
- if (LOCAL_LOGV) Log.v(TAG, "Telling window manager input event is finished");
-
- if (mFinishedCallback == null) {
- Slog.w(TAG, "Attempted to tell the input queue that the current input event "
- + "is finished but there is no input event actually in progress.");
- return;
- }
-
- if (ViewDebug.DEBUG_LATENCY) {
- final long now = System.nanoTime();
- final long eventTime = event.getEventTimeNano();
- final StringBuilder msg = new StringBuilder();
- msg.append("Latency: Spent ");
- msg.append((now - mInputEventReceiveTimeNanos) * 0.000001f);
- msg.append("ms processing ");
- if (event instanceof KeyEvent) {
- final KeyEvent keyEvent = (KeyEvent)event;
- msg.append("key event, action=");
- msg.append(KeyEvent.actionToString(keyEvent.getAction()));
- } else {
- final MotionEvent motionEvent = (MotionEvent)event;
- msg.append("motion event, action=");
- msg.append(MotionEvent.actionToString(motionEvent.getAction()));
- msg.append(", historySize=");
- msg.append(motionEvent.getHistorySize());
- }
- msg.append(", handled=");
- msg.append(handled);
- msg.append(", received at +");
- msg.append((mInputEventReceiveTimeNanos - eventTime) * 0.000001f);
- if (mInputEventDeliverTimeNanos != 0) {
- msg.append("ms, delivered at +");
- msg.append((mInputEventDeliverTimeNanos - eventTime) * 0.000001f);
- }
- if (mInputEventDeliverPostImeTimeNanos != 0) {
- msg.append("ms, delivered post IME at +");
- msg.append((mInputEventDeliverPostImeTimeNanos - eventTime) * 0.000001f);
- }
- msg.append("ms, finished at +");
- msg.append((now - eventTime) * 0.000001f);
- msg.append("ms.");
- Log.d(TAG, msg.toString());
- }
-
- mFinishedCallback.finished(handled);
- mFinishedCallback = null;
- }
-
/**
* Something in the current window tells us we need to change the touch mode. For
* example, we are not in touch mode, and the user touches the screen.
@@ -2841,11 +2788,27 @@
return false;
}
- private void deliverPointerEvent(MotionEvent event, boolean sendDone) {
+ private void deliverInputEvent(QueuedInputEvent q) {
if (ViewDebug.DEBUG_LATENCY) {
- mInputEventDeliverTimeNanos = System.nanoTime();
+ q.mDeliverTimeNanos = System.nanoTime();
}
+ if (q.mEvent instanceof KeyEvent) {
+ deliverKeyEvent(q);
+ } else {
+ final int source = q.mEvent.getSource();
+ if ((source & InputDevice.SOURCE_CLASS_POINTER) != 0) {
+ deliverPointerEvent(q);
+ } else if ((source & InputDevice.SOURCE_CLASS_TRACKBALL) != 0) {
+ deliverTrackballEvent(q);
+ } else {
+ deliverGenericMotionEvent(q);
+ }
+ }
+ }
+
+ private void deliverPointerEvent(QueuedInputEvent q) {
+ final MotionEvent event = (MotionEvent)q.mEvent;
final boolean isTouchEvent = event.isTouchEvent();
if (mInputEventConsistencyVerifier != null) {
if (isTouchEvent) {
@@ -2857,7 +2820,7 @@
// If there is no view, then the event will not be handled.
if (mView == null || !mAdded) {
- finishMotionEvent(event, sendDone, false);
+ finishInputEvent(q, false);
return;
}
@@ -2892,41 +2855,23 @@
lt.sample("B Dispatched PointerEvents ", System.nanoTime() - event.getEventTimeNano());
}
if (handled) {
- finishMotionEvent(event, sendDone, true);
+ finishInputEvent(q, true);
return;
}
// Pointer event was unhandled.
- finishMotionEvent(event, sendDone, false);
+ finishInputEvent(q, false);
}
- private void finishMotionEvent(MotionEvent event, boolean sendDone, boolean handled) {
- event.recycle();
- if (sendDone) {
- finishInputEvent(event, handled);
- }
- //noinspection ConstantConditions
- if (LOCAL_LOGV || WATCH_POINTER) {
- if ((event.getSource() & InputDevice.SOURCE_CLASS_POINTER) != 0) {
- Log.i(TAG, "Done dispatching!");
- }
- }
- }
-
- private void deliverTrackballEvent(MotionEvent event, boolean sendDone) {
- if (ViewDebug.DEBUG_LATENCY) {
- mInputEventDeliverTimeNanos = System.nanoTime();
- }
-
- if (DEBUG_TRACKBALL) Log.v(TAG, "Motion event:" + event);
-
+ private void deliverTrackballEvent(QueuedInputEvent q) {
+ final MotionEvent event = (MotionEvent)q.mEvent;
if (mInputEventConsistencyVerifier != null) {
mInputEventConsistencyVerifier.onTrackballEvent(event, 0);
}
// If there is no view, then the event will not be handled.
if (mView == null || !mAdded) {
- finishMotionEvent(event, sendDone, false);
+ finishInputEvent(q, false);
return;
}
@@ -2938,7 +2883,7 @@
// touch mode here.
ensureTouchMode(false);
- finishMotionEvent(event, sendDone, true);
+ finishInputEvent(q, true);
mLastTrackballTime = Integer.MIN_VALUE;
return;
}
@@ -2962,18 +2907,18 @@
case MotionEvent.ACTION_DOWN:
x.reset(2);
y.reset(2);
- deliverKeyEvent(new KeyEvent(curTime, curTime,
+ dispatchKey(new KeyEvent(curTime, curTime,
KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DPAD_CENTER, 0, metaState,
KeyCharacterMap.VIRTUAL_KEYBOARD, 0, KeyEvent.FLAG_FALLBACK,
- InputDevice.SOURCE_KEYBOARD), false);
+ InputDevice.SOURCE_KEYBOARD));
break;
case MotionEvent.ACTION_UP:
x.reset(2);
y.reset(2);
- deliverKeyEvent(new KeyEvent(curTime, curTime,
+ dispatchKey(new KeyEvent(curTime, curTime,
KeyEvent.ACTION_UP, KeyEvent.KEYCODE_DPAD_CENTER, 0, metaState,
KeyCharacterMap.VIRTUAL_KEYBOARD, 0, KeyEvent.FLAG_FALLBACK,
- InputDevice.SOURCE_KEYBOARD), false);
+ InputDevice.SOURCE_KEYBOARD));
break;
}
@@ -3024,38 +2969,35 @@
+ keycode);
movement--;
int repeatCount = accelMovement - movement;
- deliverKeyEvent(new KeyEvent(curTime, curTime,
+ dispatchKey(new KeyEvent(curTime, curTime,
KeyEvent.ACTION_MULTIPLE, keycode, repeatCount, metaState,
KeyCharacterMap.VIRTUAL_KEYBOARD, 0, KeyEvent.FLAG_FALLBACK,
- InputDevice.SOURCE_KEYBOARD), false);
+ InputDevice.SOURCE_KEYBOARD));
}
while (movement > 0) {
if (DEBUG_TRACKBALL) Log.v("foo", "Delivering fake DPAD: "
+ keycode);
movement--;
curTime = SystemClock.uptimeMillis();
- deliverKeyEvent(new KeyEvent(curTime, curTime,
+ dispatchKey(new KeyEvent(curTime, curTime,
KeyEvent.ACTION_DOWN, keycode, 0, metaState,
KeyCharacterMap.VIRTUAL_KEYBOARD, 0, KeyEvent.FLAG_FALLBACK,
- InputDevice.SOURCE_KEYBOARD), false);
- deliverKeyEvent(new KeyEvent(curTime, curTime,
+ InputDevice.SOURCE_KEYBOARD));
+ dispatchKey(new KeyEvent(curTime, curTime,
KeyEvent.ACTION_UP, keycode, 0, metaState,
KeyCharacterMap.VIRTUAL_KEYBOARD, 0, KeyEvent.FLAG_FALLBACK,
- InputDevice.SOURCE_KEYBOARD), false);
- }
+ InputDevice.SOURCE_KEYBOARD));
+ }
mLastTrackballTime = curTime;
}
// Unfortunately we can't tell whether the application consumed the keys, so
// we always consider the trackball event handled.
- finishMotionEvent(event, sendDone, true);
+ finishInputEvent(q, true);
}
- private void deliverGenericMotionEvent(MotionEvent event, boolean sendDone) {
- if (ViewDebug.DEBUG_LATENCY) {
- mInputEventDeliverTimeNanos = System.nanoTime();
- }
-
+ private void deliverGenericMotionEvent(QueuedInputEvent q) {
+ final MotionEvent event = (MotionEvent)q.mEvent;
if (mInputEventConsistencyVerifier != null) {
mInputEventConsistencyVerifier.onGenericMotionEvent(event, 0);
}
@@ -3068,7 +3010,7 @@
if (isJoystick) {
updateJoystickDirection(event, false);
}
- finishMotionEvent(event, sendDone, false);
+ finishInputEvent(q, false);
return;
}
@@ -3077,16 +3019,16 @@
if (isJoystick) {
updateJoystickDirection(event, false);
}
- finishMotionEvent(event, sendDone, true);
+ finishInputEvent(q, true);
return;
}
if (isJoystick) {
// Translate the joystick event into DPAD keys and try to deliver those.
updateJoystickDirection(event, true);
- finishMotionEvent(event, sendDone, true);
+ finishInputEvent(q, true);
} else {
- finishMotionEvent(event, sendDone, false);
+ finishInputEvent(q, false);
}
}
@@ -3108,9 +3050,9 @@
if (xDirection != mLastJoystickXDirection) {
if (mLastJoystickXKeyCode != 0) {
- deliverKeyEvent(new KeyEvent(time, time,
+ dispatchKey(new KeyEvent(time, time,
KeyEvent.ACTION_UP, mLastJoystickXKeyCode, 0, metaState,
- deviceId, 0, KeyEvent.FLAG_FALLBACK, source), false);
+ deviceId, 0, KeyEvent.FLAG_FALLBACK, source));
mLastJoystickXKeyCode = 0;
}
@@ -3119,17 +3061,17 @@
if (xDirection != 0 && synthesizeNewKeys) {
mLastJoystickXKeyCode = xDirection > 0
? KeyEvent.KEYCODE_DPAD_RIGHT : KeyEvent.KEYCODE_DPAD_LEFT;
- deliverKeyEvent(new KeyEvent(time, time,
+ dispatchKey(new KeyEvent(time, time,
KeyEvent.ACTION_DOWN, mLastJoystickXKeyCode, 0, metaState,
- deviceId, 0, KeyEvent.FLAG_FALLBACK, source), false);
+ deviceId, 0, KeyEvent.FLAG_FALLBACK, source));
}
}
if (yDirection != mLastJoystickYDirection) {
if (mLastJoystickYKeyCode != 0) {
- deliverKeyEvent(new KeyEvent(time, time,
+ dispatchKey(new KeyEvent(time, time,
KeyEvent.ACTION_UP, mLastJoystickYKeyCode, 0, metaState,
- deviceId, 0, KeyEvent.FLAG_FALLBACK, source), false);
+ deviceId, 0, KeyEvent.FLAG_FALLBACK, source));
mLastJoystickYKeyCode = 0;
}
@@ -3138,9 +3080,9 @@
if (yDirection != 0 && synthesizeNewKeys) {
mLastJoystickYKeyCode = yDirection > 0
? KeyEvent.KEYCODE_DPAD_DOWN : KeyEvent.KEYCODE_DPAD_UP;
- deliverKeyEvent(new KeyEvent(time, time,
+ dispatchKey(new KeyEvent(time, time,
KeyEvent.ACTION_DOWN, mLastJoystickYKeyCode, 0, metaState,
- deviceId, 0, KeyEvent.FLAG_FALLBACK, source), false);
+ deviceId, 0, KeyEvent.FLAG_FALLBACK, source));
}
}
}
@@ -3231,91 +3173,81 @@
return false;
}
- int enqueuePendingEvent(Object event, boolean sendDone) {
- int seq = mPendingEventSeq+1;
- if (seq < 0) seq = 0;
- mPendingEventSeq = seq;
- mPendingEvents.put(seq, event);
- return sendDone ? seq : -seq;
- }
-
- Object retrievePendingEvent(int seq) {
- if (seq < 0) seq = -seq;
- Object event = mPendingEvents.get(seq);
- if (event != null) {
- mPendingEvents.remove(seq);
- }
- return event;
- }
-
- private void deliverKeyEvent(KeyEvent event, boolean sendDone) {
- if (ViewDebug.DEBUG_LATENCY) {
- mInputEventDeliverTimeNanos = System.nanoTime();
- }
-
+ private void deliverKeyEvent(QueuedInputEvent q) {
+ final KeyEvent event = (KeyEvent)q.mEvent;
if (mInputEventConsistencyVerifier != null) {
mInputEventConsistencyVerifier.onKeyEvent(event, 0);
}
- // If there is no view, then the event will not be handled.
- if (mView == null || !mAdded) {
- finishKeyEvent(event, sendDone, false);
- return;
- }
-
- if (LOCAL_LOGV) Log.v(TAG, "Dispatching key " + event + " to " + mView);
-
- // Perform predispatching before the IME.
- if (mView.dispatchKeyEventPreIme(event)) {
- finishKeyEvent(event, sendDone, true);
- return;
- }
-
- // Dispatch to the IME before propagating down the view hierarchy.
- // The IME will eventually call back into handleFinishedEvent.
- if (mLastWasImTarget) {
- InputMethodManager imm = InputMethodManager.peekInstance();
- if (imm != null) {
- int seq = enqueuePendingEvent(event, sendDone);
- if (DEBUG_IMF) Log.v(TAG, "Sending key event to IME: seq="
- + seq + " event=" + event);
- imm.dispatchKeyEvent(mView.getContext(), seq, event, mInputMethodCallback);
+ if ((q.mFlags & QueuedInputEvent.FLAG_DELIVER_POST_IME) == 0) {
+ // If there is no view, then the event will not be handled.
+ if (mView == null || !mAdded) {
+ finishInputEvent(q, false);
return;
}
+
+ if (LOCAL_LOGV) Log.v(TAG, "Dispatching key " + event + " to " + mView);
+
+ // Perform predispatching before the IME.
+ if (mView.dispatchKeyEventPreIme(event)) {
+ finishInputEvent(q, true);
+ return;
+ }
+
+ // Dispatch to the IME before propagating down the view hierarchy.
+ // The IME will eventually call back into handleImeFinishedEvent.
+ if (mLastWasImTarget) {
+ InputMethodManager imm = InputMethodManager.peekInstance();
+ if (imm != null) {
+ final int seq = event.getSequenceNumber();
+ if (DEBUG_IMF) Log.v(TAG, "Sending key event to IME: seq="
+ + seq + " event=" + event);
+ imm.dispatchKeyEvent(mView.getContext(), seq, event, mInputMethodCallback);
+ return;
+ }
+ }
}
// Not dispatching to IME, continue with post IME actions.
- deliverKeyEventPostIme(event, sendDone);
+ deliverKeyEventPostIme(q);
}
- private void handleFinishedEvent(int seq, boolean handled) {
- final KeyEvent event = (KeyEvent)retrievePendingEvent(seq);
- if (DEBUG_IMF) Log.v(TAG, "IME finished event: seq=" + seq
- + " handled=" + handled + " event=" + event);
- if (event != null) {
- final boolean sendDone = seq >= 0;
+ void handleImeFinishedEvent(int seq, boolean handled) {
+ final QueuedInputEvent q = mCurrentInputEvent;
+ if (q != null && q.mEvent.getSequenceNumber() == seq) {
+ final KeyEvent event = (KeyEvent)q.mEvent;
+ if (DEBUG_IMF) {
+ Log.v(TAG, "IME finished event: seq=" + seq
+ + " handled=" + handled + " event=" + event);
+ }
if (handled) {
- finishKeyEvent(event, sendDone, true);
+ finishInputEvent(q, true);
} else {
- deliverKeyEventPostIme(event, sendDone);
+ deliverKeyEventPostIme(q);
+ }
+ } else {
+ if (DEBUG_IMF) {
+ Log.v(TAG, "IME finished event: seq=" + seq
+ + " handled=" + handled + ", event not found!");
}
}
}
- private void deliverKeyEventPostIme(KeyEvent event, boolean sendDone) {
+ private void deliverKeyEventPostIme(QueuedInputEvent q) {
+ final KeyEvent event = (KeyEvent)q.mEvent;
if (ViewDebug.DEBUG_LATENCY) {
- mInputEventDeliverPostImeTimeNanos = System.nanoTime();
+ q.mDeliverPostImeTimeNanos = System.nanoTime();
}
// If the view went away, then the event will not be handled.
if (mView == null || !mAdded) {
- finishKeyEvent(event, sendDone, false);
+ finishInputEvent(q, false);
return;
}
// If the key's purpose is to exit touch mode then we consume it and consider it handled.
if (checkForLeavingTouchModeAndConsume(event)) {
- finishKeyEvent(event, sendDone, true);
+ finishInputEvent(q, true);
return;
}
@@ -3325,7 +3257,7 @@
// Deliver the key to the view hierarchy.
if (mView.dispatchKeyEvent(event)) {
- finishKeyEvent(event, sendDone, true);
+ finishInputEvent(q, true);
return;
}
@@ -3334,14 +3266,14 @@
&& event.isCtrlPressed()
&& !KeyEvent.isModifierKey(event.getKeyCode())) {
if (mView.dispatchKeyShortcutEvent(event)) {
- finishKeyEvent(event, sendDone, true);
+ finishInputEvent(q, true);
return;
}
}
// Apply the fallback event policy.
if (mFallbackEventHandler.dispatchKeyEvent(event)) {
- finishKeyEvent(event, sendDone, true);
+ finishInputEvent(q, true);
return;
}
@@ -3396,14 +3328,14 @@
if (v.requestFocus(direction, mTempRect)) {
playSoundEffect(
SoundEffectConstants.getContantForFocusDirection(direction));
- finishKeyEvent(event, sendDone, true);
+ finishInputEvent(q, true);
return;
}
}
// Give the focused view a last chance to handle the dpad key.
if (mView.dispatchUnhandledMove(focused, direction)) {
- finishKeyEvent(event, sendDone, true);
+ finishInputEvent(q, true);
return;
}
}
@@ -3411,13 +3343,7 @@
}
// Key was unhandled.
- finishKeyEvent(event, sendDone, false);
- }
-
- private void finishKeyEvent(KeyEvent event, boolean sendDone, boolean handled) {
- if (sendDone) {
- finishInputEvent(event, handled);
- }
+ finishInputEvent(q, false);
}
/* drag/drop */
@@ -3742,8 +3668,8 @@
}
}
- public void dispatchFinishedEvent(int seq, boolean handled) {
- Message msg = obtainMessage(FINISHED_EVENT);
+ void dispatchImeFinishedEvent(int seq, boolean handled) {
+ Message msg = obtainMessage(IME_FINISHED_EVENT);
msg.arg1 = seq;
msg.arg2 = handled ? 1 : 0;
sendMessage(msg);
@@ -3772,152 +3698,186 @@
sendMessage(msg);
}
- private long mInputEventReceiveTimeNanos;
- private long mInputEventDeliverTimeNanos;
- private long mInputEventDeliverPostImeTimeNanos;
- private InputQueue.FinishedCallback mFinishedCallback;
-
- private final InputHandler mInputHandler = new InputHandler() {
- public void handleKey(KeyEvent event, InputQueue.FinishedCallback finishedCallback) {
- startInputEvent(finishedCallback);
- dispatchKey(event, true);
- }
-
- public void handleMotion(MotionEvent event, InputQueue.FinishedCallback finishedCallback) {
- startInputEvent(finishedCallback);
- dispatchMotion(event, true);
- }
- };
-
/**
- * Utility class used to queue up input events which are then handled during
- * performTraversals(). Doing it this way allows us to ensure that we are up to date with
- * all input events just prior to drawing, instead of placing those events on the regular
- * handler queue, potentially behind a drawing event.
+ * Represents a pending input event that is waiting in a queue.
+ *
+ * Input events are processed in serial order by the timestamp specified by
+ * {@link InputEvent#getEventTime()}. In general, the input dispatcher delivers
+ * one input event to the application at a time and waits for the application
+ * to finish handling it before delivering the next one.
+ *
+ * However, because the application or IME can synthesize and inject multiple
+ * key events at a time without going through the input dispatcher, we end up
+ * needing a queue on the application's side.
*/
- static class InputEventMessage {
- Message mMessage;
- InputEventMessage mNext;
+ private static final class QueuedInputEvent {
+ public static final int FLAG_DELIVER_POST_IME = 1 << 0;
- private static final Object sPoolSync = new Object();
- private static InputEventMessage sPool;
- private static int sPoolSize = 0;
+ public QueuedInputEvent mNext;
- private static final int MAX_POOL_SIZE = 10;
+ public InputEvent mEvent;
+ public InputEventReceiver mReceiver;
+ public int mFlags;
- private InputEventMessage(Message m) {
- mMessage = m;
- mNext = null;
- }
-
- /**
- * Return a new Message instance from the global pool. Allows us to
- * avoid allocating new objects in many cases.
- */
- public static InputEventMessage obtain(Message msg) {
- synchronized (sPoolSync) {
- if (sPool != null) {
- InputEventMessage m = sPool;
- sPool = m.mNext;
- m.mNext = null;
- sPoolSize--;
- m.mMessage = msg;
- return m;
- }
- }
- return new InputEventMessage(msg);
- }
-
- /**
- * Return the message to the pool.
- */
- public void recycle() {
- mMessage.recycle();
- synchronized (sPoolSync) {
- if (sPoolSize < MAX_POOL_SIZE) {
- mNext = sPool;
- sPool = this;
- sPoolSize++;
- }
- }
-
- }
+ // Used for latency calculations.
+ public long mReceiveTimeNanos;
+ public long mDeliverTimeNanos;
+ public long mDeliverPostImeTimeNanos;
}
- /**
- * Place the input event message at the end of the current pending list
- */
- private void enqueueInputEvent(Message msg, long when) {
- InputEventMessage inputMessage = InputEventMessage.obtain(msg);
- if (mPendingInputEvents == null) {
- mPendingInputEvents = inputMessage;
+ private QueuedInputEvent obtainQueuedInputEvent(InputEvent event,
+ InputEventReceiver receiver, int flags) {
+ QueuedInputEvent q = mQueuedInputEventPool;
+ if (q != null) {
+ mQueuedInputEventPoolSize -= 1;
+ mQueuedInputEventPool = q.mNext;
+ q.mNext = null;
} else {
- InputEventMessage currMessage = mPendingInputEvents;
- while (currMessage.mNext != null) {
- currMessage = currMessage.mNext;
- }
- currMessage.mNext = inputMessage;
+ q = new QueuedInputEvent();
}
- sendEmptyMessageAtTime(PROCESS_INPUT_EVENTS, when);
+
+ q.mEvent = event;
+ q.mReceiver = receiver;
+ q.mFlags = flags;
+ return q;
}
+ private void recycleQueuedInputEvent(QueuedInputEvent q) {
+ q.mEvent = null;
+ q.mReceiver = null;
+
+ if (mQueuedInputEventPoolSize < MAX_QUEUED_INPUT_EVENT_POOL_SIZE) {
+ mQueuedInputEventPoolSize += 1;
+ q.mNext = mQueuedInputEventPool;
+ mQueuedInputEventPool = q;
+ }
+ }
+
+ void enqueueInputEvent(InputEvent event,
+ InputEventReceiver receiver, int flags) {
+ QueuedInputEvent q = obtainQueuedInputEvent(event, receiver, flags);
+
+ if (ViewDebug.DEBUG_LATENCY) {
+ q.mReceiveTimeNanos = System.nanoTime();
+ q.mDeliverTimeNanos = 0;
+ q.mDeliverPostImeTimeNanos = 0;
+ }
+
+ // Always enqueue the input event in order, regardless of its time stamp.
+ // We do this because the application or the IME may inject key events
+ // in response to touch events and we want to ensure that the injected keys
+ // are processed in the order they were received and we cannot trust that
+ // the time stamp of injected events are monotonic.
+ QueuedInputEvent last = mFirstPendingInputEvent;
+ if (last == null) {
+ mFirstPendingInputEvent = q;
+ } else {
+ while (last.mNext != null) {
+ last = last.mNext;
+ }
+ last.mNext = q;
+ }
+
+ scheduleProcessInputEvents();
+ }
+
+ private void scheduleProcessInputEvents() {
+ if (!mProcessInputEventsPending) {
+ mProcessInputEventsPending = true;
+ sendEmptyMessage(DO_PROCESS_INPUT_EVENTS);
+ }
+ }
+
+ void processInputEvents() {
+ while (mCurrentInputEvent == null && mFirstPendingInputEvent != null) {
+ QueuedInputEvent q = mFirstPendingInputEvent;
+ mFirstPendingInputEvent = q.mNext;
+ q.mNext = null;
+ mCurrentInputEvent = q;
+ deliverInputEvent(q);
+ }
+
+ // We are done processing all input events that we can process right now
+ // so we can clear the pending flag immediately.
+ if (mProcessInputEventsPending) {
+ mProcessInputEventsPending = false;
+ removeMessages(DO_PROCESS_INPUT_EVENTS);
+ }
+ }
+
+ private void finishInputEvent(QueuedInputEvent q, boolean handled) {
+ if (q != mCurrentInputEvent) {
+ throw new IllegalStateException("finished input event out of order");
+ }
+
+ if (ViewDebug.DEBUG_LATENCY) {
+ final long now = System.nanoTime();
+ final long eventTime = q.mEvent.getEventTimeNano();
+ final StringBuilder msg = new StringBuilder();
+ msg.append("Spent ");
+ msg.append((now - q.mReceiveTimeNanos) * 0.000001f);
+ msg.append("ms processing ");
+ if (q.mEvent instanceof KeyEvent) {
+ final KeyEvent keyEvent = (KeyEvent)q.mEvent;
+ msg.append("key event, action=");
+ msg.append(KeyEvent.actionToString(keyEvent.getAction()));
+ } else {
+ final MotionEvent motionEvent = (MotionEvent)q.mEvent;
+ msg.append("motion event, action=");
+ msg.append(MotionEvent.actionToString(motionEvent.getAction()));
+ msg.append(", historySize=");
+ msg.append(motionEvent.getHistorySize());
+ }
+ msg.append(", handled=");
+ msg.append(handled);
+ msg.append(", received at +");
+ msg.append((q.mReceiveTimeNanos - eventTime) * 0.000001f);
+ if (q.mDeliverTimeNanos != 0) {
+ msg.append("ms, delivered at +");
+ msg.append((q.mDeliverTimeNanos - eventTime) * 0.000001f);
+ }
+ if (q.mDeliverPostImeTimeNanos != 0) {
+ msg.append("ms, delivered post IME at +");
+ msg.append((q.mDeliverPostImeTimeNanos - eventTime) * 0.000001f);
+ }
+ msg.append("ms, finished at +");
+ msg.append((now - eventTime) * 0.000001f);
+ msg.append("ms.");
+ Log.d(ViewDebug.DEBUG_LATENCY_TAG, msg.toString());
+ }
+
+ if (q.mReceiver != null) {
+ q.mReceiver.finishInputEvent(q.mEvent, handled);
+ } else if (q.mEvent instanceof MotionEvent) {
+ // Event though key events are also recyclable, we only recycle motion events.
+ // Historically, key events were not recyclable and applications expect
+ // them to be immutable. We only ever recycle key events behind the
+ // scenes where an application never sees them (so, not here).
+ q.mEvent.recycle();
+ }
+
+ recycleQueuedInputEvent(q);
+
+ mCurrentInputEvent = null;
+ if (mFirstPendingInputEvent != null) {
+ scheduleProcessInputEvents();
+ }
+ }
+
+ final class WindowInputEventReceiver extends InputEventReceiver {
+ public WindowInputEventReceiver(InputChannel inputChannel, Looper looper) {
+ super(inputChannel, looper);
+ }
+
+ @Override
+ public void onInputEvent(InputEvent event) {
+ enqueueInputEvent(event, this, 0);
+ }
+ }
+ WindowInputEventReceiver mInputEventReceiver;
+
public void dispatchKey(KeyEvent event) {
- dispatchKey(event, false);
- }
-
- private void dispatchKey(KeyEvent event, boolean sendDone) {
- //noinspection ConstantConditions
- if (false && event.getAction() == KeyEvent.ACTION_DOWN) {
- if (event.getKeyCode() == KeyEvent.KEYCODE_CAMERA) {
- if (DBG) Log.d("keydisp", "===================================================");
- if (DBG) Log.d("keydisp", "Focused view Hierarchy is:");
-
- debug();
-
- if (DBG) Log.d("keydisp", "===================================================");
- }
- }
-
- Message msg = obtainMessage(DISPATCH_KEY);
- msg.obj = event;
- msg.arg1 = sendDone ? 1 : 0;
-
- if (LOCAL_LOGV) Log.v(
- TAG, "sending key " + event + " to " + mView);
-
- enqueueInputEvent(msg, event.getEventTime());
- }
-
- private void dispatchMotion(MotionEvent event, boolean sendDone) {
- int source = event.getSource();
- if ((source & InputDevice.SOURCE_CLASS_POINTER) != 0) {
- dispatchPointer(event, sendDone);
- } else if ((source & InputDevice.SOURCE_CLASS_TRACKBALL) != 0) {
- dispatchTrackball(event, sendDone);
- } else {
- dispatchGenericMotion(event, sendDone);
- }
- }
-
- private void dispatchPointer(MotionEvent event, boolean sendDone) {
- Message msg = obtainMessage(DISPATCH_POINTER);
- msg.obj = event;
- msg.arg1 = sendDone ? 1 : 0;
- enqueueInputEvent(msg, event.getEventTime());
- }
-
- private void dispatchTrackball(MotionEvent event, boolean sendDone) {
- Message msg = obtainMessage(DISPATCH_TRACKBALL);
- msg.obj = event;
- msg.arg1 = sendDone ? 1 : 0;
- enqueueInputEvent(msg, event.getEventTime());
- }
-
- private void dispatchGenericMotion(MotionEvent event, boolean sendDone) {
- Message msg = obtainMessage(DISPATCH_GENERIC_MOTION);
- msg.obj = event;
- msg.arg1 = sendDone ? 1 : 0;
- enqueueInputEvent(msg, event.getEventTime());
+ enqueueInputEvent(event, null, 0);
}
public void dispatchAppVisibility(boolean visible) {
@@ -4099,7 +4059,7 @@
public void finishedEvent(int seq, boolean handled) {
final ViewRootImpl viewAncestor = mViewAncestor.get();
if (viewAncestor != null) {
- viewAncestor.dispatchFinishedEvent(seq, handled);
+ viewAncestor.dispatchImeFinishedEvent(seq, handled);
}
}
diff --git a/core/java/android/view/VolumePanel.java b/core/java/android/view/VolumePanel.java
index b657204..48fe0df 100644
--- a/core/java/android/view/VolumePanel.java
+++ b/core/java/android/view/VolumePanel.java
@@ -278,10 +278,6 @@
}
private void createSliders() {
- final int silentableStreams = System.getInt(mContext.getContentResolver(),
- System.MODE_RINGER_STREAMS_AFFECTED,
- ((1 << AudioSystem.STREAM_NOTIFICATION) | (1 << AudioSystem.STREAM_RING)));
-
LayoutInflater inflater = (LayoutInflater) mContext
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
mStreamControls = new HashMap<Integer, StreamControl>(STREAMS.length);
@@ -297,9 +293,6 @@
sc.group = (ViewGroup) inflater.inflate(R.layout.volume_adjust_item, null);
sc.group.setTag(sc);
sc.icon = (ImageView) sc.group.findViewById(R.id.stream_icon);
- if ((silentableStreams & (1 << sc.streamType)) != 0) {
- sc.icon.setOnClickListener(this);
- }
sc.icon.setTag(sc);
sc.icon.setContentDescription(res.getString(streamRes.descRes));
sc.iconRes = streamRes.iconRes;
@@ -356,7 +349,6 @@
&& mAudioManager.shouldVibrate(AudioManager.VIBRATE_TYPE_RINGER)) {
sc.icon.setImageResource(R.drawable.ic_audio_ring_notif_vibrate);
}
- sc.seekbarView.setEnabled(!muted);
}
private boolean isExpanded() {
@@ -436,8 +428,6 @@
mAudioService.getLastAudibleStreamVolume(streamType)
: mAudioService.getStreamVolume(streamType);
-// int message = UNKNOWN_VOLUME_TEXT;
-// int additionalMessage = 0;
mRingIsSilent = false;
if (LOGD) {
@@ -697,18 +687,6 @@
public void onClick(View v) {
if (v == mMoreButton) {
expand();
- } else if (v.getTag() instanceof StreamControl) {
- StreamControl sc = (StreamControl) v.getTag();
- boolean vibeInSilent = Settings.System.getInt(mContext.getContentResolver(),
- System.VIBRATE_IN_SILENT, 1) == 1;
- int newMode = mAudioManager.isSilentMode()
- ? AudioManager.RINGER_MODE_NORMAL
- : (vibeInSilent
- ? AudioManager.RINGER_MODE_VIBRATE
- : AudioManager.RINGER_MODE_SILENT);
- mAudioManager.setRingerMode(newMode);
- // Expand the dialog if it hasn't been expanded yet.
- if (mShowCombinedVolumes && !isExpanded()) expand();
}
resetTimeout();
}
diff --git a/core/java/android/view/WindowManagerPolicy.java b/core/java/android/view/WindowManagerPolicy.java
index 2e19bf6..7d729c6 100644
--- a/core/java/android/view/WindowManagerPolicy.java
+++ b/core/java/android/view/WindowManagerPolicy.java
@@ -340,7 +340,8 @@
* Add a fake window to the window manager. This window sits
* at the top of the other windows and consumes events.
*/
- public FakeWindow addFakeWindow(Looper looper, InputHandler inputHandler,
+ public FakeWindow addFakeWindow(Looper looper,
+ InputEventReceiver.Factory inputEventReceiverFactory,
String name, int windowType, int layoutParamsFlags, boolean canReceiveKeys,
boolean hasFocus, boolean touchFullscreen);
}
diff --git a/core/java/android/view/accessibility/AccessibilityEvent.java b/core/java/android/view/accessibility/AccessibilityEvent.java
index 34b4dcc..75b875a 100644
--- a/core/java/android/view/accessibility/AccessibilityEvent.java
+++ b/core/java/android/view/accessibility/AccessibilityEvent.java
@@ -16,7 +16,6 @@
package android.view.accessibility;
-import android.accessibilityservice.IAccessibilityServiceConnection;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
@@ -590,24 +589,6 @@
}
/**
- * Sets the connection for interacting with the AccessibilityManagerService.
- *
- * @param connection The connection.
- *
- * @hide
- */
- @Override
- public void setConnection(IAccessibilityServiceConnection connection) {
- super.setConnection(connection);
- List<AccessibilityRecord> records = mRecords;
- final int recordCount = records.size();
- for (int i = 0; i < recordCount; i++) {
- AccessibilityRecord record = records.get(i);
- record.setConnection(connection);
- }
- }
-
- /**
* Sets if this instance is sealed.
*
* @param sealed Whether is sealed.
@@ -821,23 +802,19 @@
* @param parcel A parcel containing the state of a {@link AccessibilityEvent}.
*/
public void initFromParcel(Parcel parcel) {
- if (parcel.readInt() == 1) {
- mConnection = IAccessibilityServiceConnection.Stub.asInterface(
- parcel.readStrongBinder());
- }
- setSealed(parcel.readInt() == 1);
+ mSealed = (parcel.readInt() == 1);
mEventType = parcel.readInt();
mPackageName = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(parcel);
mEventTime = parcel.readLong();
+ mConnectionId = parcel.readInt();
readAccessibilityRecordFromParcel(this, parcel);
// Read the records.
final int recordCount = parcel.readInt();
for (int i = 0; i < recordCount; i++) {
AccessibilityRecord record = AccessibilityRecord.obtain();
- // Do this to write the connection only once.
- record.setConnection(mConnection);
readAccessibilityRecordFromParcel(record, parcel);
+ record.mConnectionId = mConnectionId;
mRecords.add(record);
}
}
@@ -875,16 +852,11 @@
* {@inheritDoc}
*/
public void writeToParcel(Parcel parcel, int flags) {
- if (mConnection == null) {
- parcel.writeInt(0);
- } else {
- parcel.writeInt(1);
- parcel.writeStrongBinder(mConnection.asBinder());
- }
parcel.writeInt(isSealed() ? 1 : 0);
parcel.writeInt(mEventType);
TextUtils.writeToParcel(mPackageName, parcel, 0);
parcel.writeLong(mEventTime);
+ parcel.writeInt(mConnectionId);
writeAccessibilityRecordToParcel(this, parcel, flags);
// Write the records.
diff --git a/core/java/android/view/accessibility/AccessibilityInteractionClient.java b/core/java/android/view/accessibility/AccessibilityInteractionClient.java
index 5f2990a..95c070c 100644
--- a/core/java/android/view/accessibility/AccessibilityInteractionClient.java
+++ b/core/java/android/view/accessibility/AccessibilityInteractionClient.java
@@ -21,7 +21,9 @@
import android.os.Message;
import android.os.RemoteException;
import android.os.SystemClock;
+import android.util.Log;
import android.util.LongSparseArray;
+import android.util.SparseArray;
import java.util.Collections;
import java.util.List;
@@ -62,6 +64,12 @@
public final class AccessibilityInteractionClient
extends IAccessibilityInteractionConnectionCallback.Stub {
+ public static final int NO_ID = -1;
+
+ private static final String LOG_TAG = "AccessibilityInteractionClient";
+
+ private static final boolean DEBUG = false;
+
private static final long TIMEOUT_INTERACTION_MILLIS = 5000;
private static final Object sStaticLock = new Object();
@@ -85,6 +93,10 @@
private final Rect mTempBounds = new Rect();
+ // The connection cache is shared between all interrogating threads.
+ private static final SparseArray<IAccessibilityServiceConnection> sConnectionCache =
+ new SparseArray<IAccessibilityServiceConnection>();
+
/**
* @return The client for the current thread.
*/
@@ -132,29 +144,38 @@
/**
* Finds an {@link AccessibilityNodeInfo} by accessibility id.
*
- * @param connection A connection for interacting with the system.
+ * @param connectionId The id of a connection for interacting with the system.
* @param accessibilityWindowId A unique window id.
* @param accessibilityNodeId A unique node accessibility id
* (accessibility view and virtual descendant id).
* @return An {@link AccessibilityNodeInfo} if found, null otherwise.
*/
- public AccessibilityNodeInfo findAccessibilityNodeInfoByAccessibilityId(
- IAccessibilityServiceConnection connection, int accessibilityWindowId,
- long accessibilityNodeId) {
+ public AccessibilityNodeInfo findAccessibilityNodeInfoByAccessibilityId(int connectionId,
+ int accessibilityWindowId, long accessibilityNodeId) {
try {
- final int interactionId = mInteractionIdCounter.getAndIncrement();
- final float windowScale = connection.findAccessibilityNodeInfoByAccessibilityId(
- accessibilityWindowId, accessibilityNodeId, interactionId, this,
- Thread.currentThread().getId());
- // If the scale is zero the call has failed.
- if (windowScale > 0) {
- AccessibilityNodeInfo info = getFindAccessibilityNodeInfoResultAndClear(
- interactionId);
- finalizeAccessibilityNodeInfo(info, connection, windowScale);
- return info;
+ IAccessibilityServiceConnection connection = getConnection(connectionId);
+ if (connection != null) {
+ final int interactionId = mInteractionIdCounter.getAndIncrement();
+ final float windowScale = connection.findAccessibilityNodeInfoByAccessibilityId(
+ accessibilityWindowId, accessibilityNodeId, interactionId, this,
+ Thread.currentThread().getId());
+ // If the scale is zero the call has failed.
+ if (windowScale > 0) {
+ AccessibilityNodeInfo info = getFindAccessibilityNodeInfoResultAndClear(
+ interactionId);
+ finalizeAccessibilityNodeInfo(info, connectionId, windowScale);
+ return info;
+ }
+ } else {
+ if (DEBUG) {
+ Log.w(LOG_TAG, "No connection for connection id: " + connectionId);
+ }
}
} catch (RemoteException re) {
- /* ignore */
+ if (DEBUG) {
+ Log.w(LOG_TAG, "Error while calling remote"
+ + " findAccessibilityNodeInfoByAccessibilityId", re);
+ }
}
return null;
}
@@ -163,25 +184,36 @@
* Finds an {@link AccessibilityNodeInfo} by View id. The search is performed
* in the currently active window and starts from the root View in the window.
*
- * @param connection A connection for interacting with the system.
+ * @param connectionId The id of a connection for interacting with the system.
* @param viewId The id of the view.
* @return An {@link AccessibilityNodeInfo} if found, null otherwise.
*/
- public AccessibilityNodeInfo findAccessibilityNodeInfoByViewIdInActiveWindow(
- IAccessibilityServiceConnection connection, int viewId) {
+ public AccessibilityNodeInfo findAccessibilityNodeInfoByViewIdInActiveWindow(int connectionId,
+ int viewId) {
try {
- final int interactionId = mInteractionIdCounter.getAndIncrement();
- final float windowScale = connection.findAccessibilityNodeInfoByViewIdInActiveWindow(
- viewId, interactionId, this, Thread.currentThread().getId());
- // If the scale is zero the call has failed.
- if (windowScale > 0) {
- AccessibilityNodeInfo info = getFindAccessibilityNodeInfoResultAndClear(
- interactionId);
- finalizeAccessibilityNodeInfo(info, connection, windowScale);
- return info;
+ IAccessibilityServiceConnection connection = getConnection(connectionId);
+ if (connection != null) {
+ final int interactionId = mInteractionIdCounter.getAndIncrement();
+ final float windowScale =
+ connection.findAccessibilityNodeInfoByViewIdInActiveWindow(viewId,
+ interactionId, this, Thread.currentThread().getId());
+ // If the scale is zero the call has failed.
+ if (windowScale > 0) {
+ AccessibilityNodeInfo info = getFindAccessibilityNodeInfoResultAndClear(
+ interactionId);
+ finalizeAccessibilityNodeInfo(info, connectionId, windowScale);
+ return info;
+ }
+ } else {
+ if (DEBUG) {
+ Log.w(LOG_TAG, "No connection for connection id: " + connectionId);
+ }
}
} catch (RemoteException re) {
- /* ignore */
+ if (DEBUG) {
+ Log.w(LOG_TAG, "Error while calling remote"
+ + " findAccessibilityNodeInfoByViewIdInActiveWindow", re);
+ }
}
return null;
}
@@ -191,28 +223,36 @@
* insensitive containment. The search is performed in the currently
* active window and starts from the root View in the window.
*
- * @param connection A connection for interacting with the system.
+ * @param connectionId The id of a connection for interacting with the system.
* @param text The searched text.
* @return A list of found {@link AccessibilityNodeInfo}s.
*/
public List<AccessibilityNodeInfo> findAccessibilityNodeInfosByTextInActiveWindow(
- IAccessibilityServiceConnection connection, String text) {
+ int connectionId, String text) {
try {
- final int interactionId = mInteractionIdCounter.getAndIncrement();
- final float windowScale = connection.findAccessibilityNodeInfosByTextInActiveWindow(
- text, interactionId, this, Thread.currentThread().getId());
- // If the scale is zero the call has failed.
- if (windowScale > 0) {
- List<AccessibilityNodeInfo> infos = getFindAccessibilityNodeInfosResultAndClear(
- interactionId);
- if (infos == null) {
- return Collections.emptyList();
+ IAccessibilityServiceConnection connection = getConnection(connectionId);
+ if (connection != null) {
+ final int interactionId = mInteractionIdCounter.getAndIncrement();
+ final float windowScale =
+ connection.findAccessibilityNodeInfosByTextInActiveWindow(text,
+ interactionId, this, Thread.currentThread().getId());
+ // If the scale is zero the call has failed.
+ if (windowScale > 0) {
+ List<AccessibilityNodeInfo> infos = getFindAccessibilityNodeInfosResultAndClear(
+ interactionId);
+ finalizeAccessibilityNodeInfos(infos, connectionId, windowScale);
+ return infos;
}
- finalizeAccessibilityNodeInfos(infos, connection, windowScale);
- return infos;
+ } else {
+ if (DEBUG) {
+ Log.w(LOG_TAG, "No connection for connection id: " + connectionId);
+ }
}
} catch (RemoteException re) {
- /* ignore */
+ if (DEBUG) {
+ Log.w(LOG_TAG, "Error while calling remote"
+ + " findAccessibilityNodeInfosByViewTextInActiveWindow", re);
+ }
}
return null;
}
@@ -223,30 +263,39 @@
* id is specified and starts from the View whose accessibility id is
* specified.
*
- * @param connection A connection for interacting with the system.
+ * @param connectionId The id of a connection for interacting with the system.
* @param text The searched text.
* @param accessibilityWindowId A unique window id.
* @param accessibilityNodeId A unique node id (accessibility and virtual descendant id) from
* where to start the search. Use {@link android.view.View#NO_ID} to start from the root.
* @return A list of found {@link AccessibilityNodeInfo}s.
*/
- public List<AccessibilityNodeInfo> findAccessibilityNodeInfosByText(
- IAccessibilityServiceConnection connection, String text, int accessibilityWindowId,
- long accessibilityNodeId) {
+ public List<AccessibilityNodeInfo> findAccessibilityNodeInfosByText(int connectionId,
+ String text, int accessibilityWindowId, long accessibilityNodeId) {
try {
- final int interactionId = mInteractionIdCounter.getAndIncrement();
- final float windowScale = connection.findAccessibilityNodeInfosByText(text,
- accessibilityWindowId, accessibilityNodeId, interactionId, this,
- Thread.currentThread().getId());
- // If the scale is zero the call has failed.
- if (windowScale > 0) {
- List<AccessibilityNodeInfo> infos = getFindAccessibilityNodeInfosResultAndClear(
- interactionId);
- finalizeAccessibilityNodeInfos(infos, connection, windowScale);
- return infos;
+ IAccessibilityServiceConnection connection = getConnection(connectionId);
+ if (connection != null) {
+ final int interactionId = mInteractionIdCounter.getAndIncrement();
+ final float windowScale = connection.findAccessibilityNodeInfosByText(text,
+ accessibilityWindowId, accessibilityNodeId, interactionId, this,
+ Thread.currentThread().getId());
+ // If the scale is zero the call has failed.
+ if (windowScale > 0) {
+ List<AccessibilityNodeInfo> infos = getFindAccessibilityNodeInfosResultAndClear(
+ interactionId);
+ finalizeAccessibilityNodeInfos(infos, connectionId, windowScale);
+ return infos;
+ }
+ } else {
+ if (DEBUG) {
+ Log.w(LOG_TAG, "No connection for connection id: " + connectionId);
+ }
}
} catch (RemoteException re) {
- /* ignore */
+ if (DEBUG) {
+ Log.w(LOG_TAG, "Error while calling remote"
+ + " findAccessibilityNodeInfosByViewText", re);
+ }
}
return Collections.emptyList();
}
@@ -254,24 +303,33 @@
/**
* Performs an accessibility action on an {@link AccessibilityNodeInfo}.
*
- * @param connection A connection for interacting with the system.
+ * @param connectionId The id of a connection for interacting with the system.
* @param accessibilityWindowId The id of the window.
* @param accessibilityNodeId A unique node id (accessibility and virtual descendant id).
* @param action The action to perform.
* @return Whether the action was performed.
*/
- public boolean performAccessibilityAction(IAccessibilityServiceConnection connection,
- int accessibilityWindowId, long accessibilityNodeId, int action) {
+ public boolean performAccessibilityAction(int connectionId, int accessibilityWindowId,
+ long accessibilityNodeId, int action) {
try {
- final int interactionId = mInteractionIdCounter.getAndIncrement();
- final boolean success = connection.performAccessibilityAction(
- accessibilityWindowId, accessibilityNodeId, action, interactionId, this,
- Thread.currentThread().getId());
- if (success) {
- return getPerformAccessibilityActionResult(interactionId);
+ IAccessibilityServiceConnection connection = getConnection(connectionId);
+ if (connection != null) {
+ final int interactionId = mInteractionIdCounter.getAndIncrement();
+ final boolean success = connection.performAccessibilityAction(
+ accessibilityWindowId, accessibilityNodeId, action, interactionId, this,
+ Thread.currentThread().getId());
+ if (success) {
+ return getPerformAccessibilityActionResult(interactionId);
+ }
+ } else {
+ if (DEBUG) {
+ Log.w(LOG_TAG, "No connection for connection id: " + connectionId);
+ }
}
} catch (RemoteException re) {
- /* ignore */
+ if (DEBUG) {
+ Log.w(LOG_TAG, "Error while calling remote performAccessibilityAction", re);
+ }
}
return false;
}
@@ -431,14 +489,14 @@
* Finalize an {@link AccessibilityNodeInfo} before passing it to the client.
*
* @param info The info.
- * @param connection The current connection to the system.
+ * @param connectionId The id of the connection to the system.
* @param windowScale The source window compatibility scale.
*/
- private void finalizeAccessibilityNodeInfo(AccessibilityNodeInfo info,
- IAccessibilityServiceConnection connection, float windowScale) {
+ private void finalizeAccessibilityNodeInfo(AccessibilityNodeInfo info, int connectionId,
+ float windowScale) {
if (info != null) {
applyCompatibilityScaleIfNeeded(info, windowScale);
- info.setConnection(connection);
+ info.setConnectionId(connectionId);
info.setSealed(true);
}
}
@@ -447,16 +505,16 @@
* Finalize {@link AccessibilityNodeInfo}s before passing them to the client.
*
* @param infos The {@link AccessibilityNodeInfo}s.
- * @param connection The current connection to the system.
+ * @param connectionId The id of the connection to the system.
* @param windowScale The source window compatibility scale.
*/
private void finalizeAccessibilityNodeInfos(List<AccessibilityNodeInfo> infos,
- IAccessibilityServiceConnection connection, float windowScale) {
+ int connectionId, float windowScale) {
if (infos != null) {
final int infosCount = infos.size();
for (int i = 0; i < infosCount; i++) {
AccessibilityNodeInfo info = infos.get(i);
- finalizeAccessibilityNodeInfo(info, connection, windowScale);
+ finalizeAccessibilityNodeInfo(info, connectionId, windowScale);
}
}
}
@@ -474,4 +532,39 @@
return result;
}
}
+
+ /**
+ * Gets a cached accessibility service connection.
+ *
+ * @param connectionId The connection id.
+ * @return The cached connection if such.
+ */
+ public IAccessibilityServiceConnection getConnection(int connectionId) {
+ synchronized (sConnectionCache) {
+ return sConnectionCache.get(connectionId);
+ }
+ }
+
+ /**
+ * Adds a cached accessibility service connection.
+ *
+ * @param connectionId The connection id.
+ * @param connection The connection.
+ */
+ public void addConnection(int connectionId, IAccessibilityServiceConnection connection) {
+ synchronized (sConnectionCache) {
+ sConnectionCache.put(connectionId, connection);
+ }
+ }
+
+ /**
+ * Removes a cached accessibility service connection.
+ *
+ * @param connectionId The connection id.
+ */
+ public void removeConnection(int connectionId) {
+ synchronized (sConnectionCache) {
+ sConnectionCache.remove(connectionId);
+ }
+ }
}
diff --git a/core/java/android/view/accessibility/AccessibilityNodeInfo.java b/core/java/android/view/accessibility/AccessibilityNodeInfo.java
index d65c0a7..6939c2c 100644
--- a/core/java/android/view/accessibility/AccessibilityNodeInfo.java
+++ b/core/java/android/view/accessibility/AccessibilityNodeInfo.java
@@ -16,7 +16,6 @@
package android.view.accessibility;
-import android.accessibilityservice.IAccessibilityServiceConnection;
import android.graphics.Rect;
import android.os.Parcel;
import android.os.Parcelable;
@@ -53,6 +52,8 @@
private static final boolean DEBUG = false;
+ private static final int UNDEFINED = -1;
+
// Actions.
/**
@@ -160,9 +161,10 @@
private boolean mSealed;
// Data.
- private long mSourceNodeId = makeNodeId(View.NO_ID, View.NO_ID);
- private int mWindowId = View.NO_ID;
- private long mParentNodeId = makeNodeId(View.NO_ID, View.NO_ID);
+ private int mWindowId = UNDEFINED;
+ private long mSourceNodeId = makeNodeId(UNDEFINED, UNDEFINED);
+ private long mParentNodeId = makeNodeId(UNDEFINED, UNDEFINED);
+
private int mBooleanProperties;
private final Rect mBoundsInParent = new Rect();
private final Rect mBoundsInScreen = new Rect();
@@ -175,7 +177,7 @@
private SparseLongArray mChildIds = new SparseLongArray();
private int mActions;
- private IAccessibilityServiceConnection mConnection;
+ private int mConnectionId = UNDEFINED;
/**
* Hide constructor from clients.
@@ -195,7 +197,7 @@
* @param source The info source.
*/
public void setSource(View source) {
- setSource(source, View.NO_ID);
+ setSource(source, UNDEFINED);
}
/**
@@ -219,9 +221,9 @@
*/
public void setSource(View root, int virtualDescendantId) {
enforceNotSealed();
- mWindowId = (root != null) ? root.getAccessibilityWindowId() : View.NO_ID;
+ mWindowId = (root != null) ? root.getAccessibilityWindowId() : UNDEFINED;
final int rootAccessibilityViewId =
- (root != null) ? root.getAccessibilityViewId() : View.NO_ID;
+ (root != null) ? root.getAccessibilityViewId() : UNDEFINED;
mSourceNodeId = makeNodeId(rootAccessibilityViewId, virtualDescendantId);
}
@@ -264,7 +266,7 @@
}
final long childId = mChildIds.get(index);
AccessibilityInteractionClient client = AccessibilityInteractionClient.getInstance();
- return client.findAccessibilityNodeInfoByAccessibilityId(mConnection, mWindowId, childId);
+ return client.findAccessibilityNodeInfoByAccessibilityId(mConnectionId, mWindowId, childId);
}
/**
@@ -280,7 +282,7 @@
* @throws IllegalStateException If called from an AccessibilityService.
*/
public void addChild(View child) {
- addChild(child, View.NO_ID);
+ addChild(child, UNDEFINED);
}
/**
@@ -301,7 +303,7 @@
enforceNotSealed();
final int index = mChildIds.size();
final int rootAccessibilityViewId =
- (root != null) ? root.getAccessibilityViewId() : View.NO_ID;
+ (root != null) ? root.getAccessibilityViewId() : UNDEFINED;
final long childNodeId = makeNodeId(rootAccessibilityViewId, virtualDescendantId);
mChildIds.put(index, childNodeId);
}
@@ -355,7 +357,7 @@
return false;
}
AccessibilityInteractionClient client = AccessibilityInteractionClient.getInstance();
- return client.performAccessibilityAction(mConnection, mWindowId, mSourceNodeId, action);
+ return client.performAccessibilityAction(mConnectionId, mWindowId, mSourceNodeId, action);
}
/**
@@ -378,7 +380,8 @@
return Collections.emptyList();
}
AccessibilityInteractionClient client = AccessibilityInteractionClient.getInstance();
- return client.findAccessibilityNodeInfosByText(mConnection, text, mWindowId, mSourceNodeId);
+ return client.findAccessibilityNodeInfosByText(mConnectionId, text, mWindowId,
+ mSourceNodeId);
}
/**
@@ -397,7 +400,7 @@
return null;
}
AccessibilityInteractionClient client = AccessibilityInteractionClient.getInstance();
- return client.findAccessibilityNodeInfoByAccessibilityId(mConnection,
+ return client.findAccessibilityNodeInfoByAccessibilityId(mConnectionId,
mWindowId, mParentNodeId);
}
@@ -414,7 +417,7 @@
* @throws IllegalStateException If called from an AccessibilityService.
*/
public void setParent(View parent) {
- setParent(parent, View.NO_ID);
+ setParent(parent, UNDEFINED);
}
/**
@@ -439,7 +442,7 @@
public void setParent(View root, int virtualDescendantId) {
enforceNotSealed();
final int rootAccessibilityViewId =
- (root != null) ? root.getAccessibilityViewId() : View.NO_ID;
+ (root != null) ? root.getAccessibilityViewId() : UNDEFINED;
mParentNodeId = makeNodeId(rootAccessibilityViewId, virtualDescendantId);
}
@@ -880,15 +883,16 @@
}
/**
- * Sets the connection for interacting with the system.
+ * Sets the unique id of the IAccessibilityServiceConnection over which
+ * this instance can send requests to the system.
*
- * @param connection The client token.
+ * @param connectionId The connection id.
*
* @hide
*/
- public final void setConnection(IAccessibilityServiceConnection connection) {
+ public void setConnectionId(int connectionId) {
enforceNotSealed();
- mConnection = connection;
+ mConnectionId = connectionId;
}
/**
@@ -1042,16 +1046,11 @@
* </p>
*/
public void writeToParcel(Parcel parcel, int flags) {
- if (mConnection == null) {
- parcel.writeInt(0);
- } else {
- parcel.writeInt(1);
- parcel.writeStrongBinder(mConnection.asBinder());
- }
parcel.writeInt(isSealed() ? 1 : 0);
parcel.writeLong(mSourceNodeId);
parcel.writeInt(mWindowId);
parcel.writeLong(mParentNodeId);
+ parcel.writeInt(mConnectionId);
SparseLongArray childIds = mChildIds;
final int childIdsSize = childIds.size();
@@ -1091,10 +1090,10 @@
*/
private void init(AccessibilityNodeInfo other) {
mSealed = other.mSealed;
- mConnection = other.mConnection;
mSourceNodeId = other.mSourceNodeId;
mParentNodeId = other.mParentNodeId;
mWindowId = other.mWindowId;
+ mConnectionId = other.mConnectionId;
mBoundsInParent.set(other.mBoundsInParent);
mBoundsInScreen.set(other.mBoundsInScreen);
mPackageName = other.mPackageName;
@@ -1112,14 +1111,11 @@
* @param parcel A parcel containing the state of a {@link AccessibilityNodeInfo}.
*/
private void initFromParcel(Parcel parcel) {
- if (parcel.readInt() == 1) {
- mConnection = IAccessibilityServiceConnection.Stub.asInterface(
- parcel.readStrongBinder());
- }
mSealed = (parcel.readInt() == 1);
mSourceNodeId = parcel.readLong();
mWindowId = parcel.readInt();
mParentNodeId = parcel.readLong();
+ mConnectionId = parcel.readInt();
SparseLongArray childIds = mChildIds;
final int childrenSize = parcel.readInt();
@@ -1153,10 +1149,10 @@
*/
private void clear() {
mSealed = false;
- mConnection = null;
- mSourceNodeId = makeNodeId(View.NO_ID, View.NO_ID);
- mParentNodeId = makeNodeId(View.NO_ID, View.NO_ID);
- mWindowId = View.NO_ID;
+ mSourceNodeId = makeNodeId(UNDEFINED, UNDEFINED);
+ mParentNodeId = makeNodeId(UNDEFINED, UNDEFINED);
+ mWindowId = UNDEFINED;
+ mConnectionId = UNDEFINED;
mChildIds.clear();
mBoundsInParent.set(0, 0, 0, 0);
mBoundsInScreen.set(0, 0, 0, 0);
@@ -1190,9 +1186,9 @@
}
private boolean canPerformRequestOverConnection(long accessibilityNodeId) {
- return (mWindowId != View.NO_ID
- && getAccessibilityViewId(accessibilityNodeId) != View.NO_ID
- && mConnection != null);
+ return (mWindowId != UNDEFINED
+ && getAccessibilityViewId(accessibilityNodeId) != UNDEFINED
+ && mConnectionId != UNDEFINED);
}
@Override
diff --git a/core/java/android/view/accessibility/AccessibilityRecord.java b/core/java/android/view/accessibility/AccessibilityRecord.java
index f3ca0d5..07aeb9a 100644
--- a/core/java/android/view/accessibility/AccessibilityRecord.java
+++ b/core/java/android/view/accessibility/AccessibilityRecord.java
@@ -16,7 +16,6 @@
package android.view.accessibility;
-import android.accessibilityservice.IAccessibilityServiceConnection;
import android.os.Parcelable;
import android.view.View;
@@ -78,8 +77,8 @@
int mAddedCount= UNDEFINED;
int mRemovedCount = UNDEFINED;
- long mSourceNodeId = AccessibilityNodeInfo.makeNodeId(View.NO_ID, View.NO_ID);
- int mSourceWindowId = View.NO_ID;
+ long mSourceNodeId = AccessibilityNodeInfo.makeNodeId(UNDEFINED, UNDEFINED);
+ int mSourceWindowId = UNDEFINED;
CharSequence mClassName;
CharSequence mContentDescription;
@@ -87,7 +86,8 @@
Parcelable mParcelableData;
final List<CharSequence> mText = new ArrayList<CharSequence>();
- IAccessibilityServiceConnection mConnection;
+
+ int mConnectionId = UNDEFINED;
/*
* Hide constructor.
@@ -103,7 +103,7 @@
* @throws IllegalStateException If called from an AccessibilityService.
*/
public void setSource(View source) {
- setSource(source, View.NO_ID);
+ setSource(source, UNDEFINED);
}
/**
@@ -122,8 +122,8 @@
*/
public void setSource(View root, int virtualDescendantId) {
enforceNotSealed();
- mSourceWindowId = (root != null) ? root.getAccessibilityWindowId() : View.NO_ID;
- final int rootViewId = (root != null) ? root.getAccessibilityViewId() : View.NO_ID;
+ mSourceWindowId = (root != null) ? root.getAccessibilityWindowId() : UNDEFINED;
+ final int rootViewId = (root != null) ? root.getAccessibilityViewId() : UNDEFINED;
mSourceNodeId = AccessibilityNodeInfo.makeNodeId(rootViewId, virtualDescendantId);
}
@@ -133,34 +133,21 @@
* <strong>Note:</strong> It is a client responsibility to recycle the received info
* by calling {@link AccessibilityNodeInfo#recycle() AccessibilityNodeInfo#recycle()}
* to avoid creating of multiple instances.
- *
* </p>
* @return The info of the source.
*/
public AccessibilityNodeInfo getSource() {
enforceSealed();
- if (mConnection == null || mSourceWindowId == View.NO_ID
- || AccessibilityNodeInfo.getAccessibilityViewId(mSourceNodeId) == View.NO_ID) {
+ if (mConnectionId == UNDEFINED || mSourceWindowId == UNDEFINED
+ || AccessibilityNodeInfo.getAccessibilityViewId(mSourceNodeId) == UNDEFINED) {
return null;
}
AccessibilityInteractionClient client = AccessibilityInteractionClient.getInstance();
- return client.findAccessibilityNodeInfoByAccessibilityId(mConnection, mSourceWindowId,
+ return client.findAccessibilityNodeInfoByAccessibilityId(mConnectionId, mSourceWindowId,
mSourceNodeId);
}
/**
- * Sets the connection for interacting with the AccessibilityManagerService.
- *
- * @param connection The connection.
- *
- * @hide
- */
- public void setConnection(IAccessibilityServiceConnection connection) {
- enforceNotSealed();
- mConnection = connection;
- }
-
- /**
* Gets the id of the window from which the event comes from.
*
* @return The window id.
@@ -577,6 +564,19 @@
}
/**
+ * Sets the unique id of the IAccessibilityServiceConnection over which
+ * this instance can send requests to the system.
+ *
+ * @param connectionId The connection id.
+ *
+ * @hide
+ */
+ public void setConnectionId(int connectionId) {
+ enforceNotSealed();
+ mConnectionId = connectionId;
+ }
+
+ /**
* Sets if this instance is sealed.
*
* @param sealed Whether is sealed.
@@ -724,7 +724,7 @@
mText.addAll(record.mText);
mSourceWindowId = record.mSourceWindowId;
mSourceNodeId = record.mSourceNodeId;
- mConnection = record.mConnection;
+ mConnectionId = record.mConnectionId;
}
/**
@@ -748,8 +748,9 @@
mBeforeText = null;
mParcelableData = null;
mText.clear();
- mSourceNodeId = AccessibilityNodeInfo.makeNodeId(View.NO_ID, View.NO_ID);
- mSourceWindowId = View.NO_ID;
+ mSourceNodeId = AccessibilityNodeInfo.makeNodeId(UNDEFINED, UNDEFINED);
+ mSourceWindowId = UNDEFINED;
+ mConnectionId = UNDEFINED;
}
@Override
diff --git a/core/java/android/view/accessibility/IAccessibilityManager.aidl b/core/java/android/view/accessibility/IAccessibilityManager.aidl
index c621ff6..c3794be 100644
--- a/core/java/android/view/accessibility/IAccessibilityManager.aidl
+++ b/core/java/android/view/accessibility/IAccessibilityManager.aidl
@@ -49,5 +49,5 @@
void removeAccessibilityInteractionConnection(IWindow windowToken);
- IAccessibilityServiceConnection registerEventListener(IEventListener client);
+ void registerEventListener(IEventListener client);
}
diff --git a/core/java/android/webkit/CookieManager.java b/core/java/android/webkit/CookieManager.java
index d6e36bb..9fa5593 100644
--- a/core/java/android/webkit/CookieManager.java
+++ b/core/java/android/webkit/CookieManager.java
@@ -345,6 +345,11 @@
* a system private class.
*/
public synchronized void setCookie(WebAddress uri, String value) {
+ if (JniUtil.useChromiumHttpStack()) {
+ nativeSetCookie(uri.toString(), value, false);
+ return;
+ }
+
if (value != null && value.length() > MAX_COOKIE_LENGTH) {
return;
}
@@ -500,6 +505,10 @@
* is a system private class.
*/
public synchronized String getCookie(WebAddress uri) {
+ if (JniUtil.useChromiumHttpStack()) {
+ return nativeGetCookie(uri.toString(), false);
+ }
+
if (!mAcceptCookie || uri == null) {
return null;
}
@@ -573,6 +582,8 @@
* {@hide} Too late to release publically.
*/
public void waitForCookieOperationsToComplete() {
+ // Note that this function is applicable for both the java
+ // and native http stacks, and works correctly with either.
synchronized (this) {
while (pendingCookieOperations > 0) {
try {
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 1135732..4958d3c 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -507,7 +507,7 @@
private float mLastVelY;
// The id of the native layer being scrolled.
- private int mScrollingLayer;
+ private int mCurrentScrollingLayerId;
private Rect mScrollingLayerRect = new Rect();
// only trigger accelerated fling if the new velocity is at least
@@ -3665,7 +3665,7 @@
if (x == mScrollingLayerRect.left && y == mScrollingLayerRect.top) {
return;
}
- nativeScrollLayer(mScrollingLayer, x, y);
+ nativeScrollLayer(mCurrentScrollingLayerId, x, y);
mScrollingLayerRect.left = x;
mScrollingLayerRect.top = y;
onScrollChanged(mScrollX, mScrollY, mScrollX, mScrollY);
@@ -4475,6 +4475,7 @@
Rect vBox = contentToViewRect(contentBounds);
Rect visibleRect = new Rect();
calcOurVisibleRect(visibleRect);
+ offsetByLayerScrollPosition(vBox);
// If the textfield is on screen, place the WebTextView in
// its new place, accounting for our new scroll/zoom values,
// and adjust its textsize.
@@ -4510,6 +4511,14 @@
}
}
+ private void offsetByLayerScrollPosition(Rect box) {
+ if ((mCurrentScrollingLayerId != 0)
+ && (mCurrentScrollingLayerId == nativeFocusCandidateLayerId())) {
+ box.offsetTo(box.left - mScrollingLayerRect.left,
+ box.top - mScrollingLayerRect.top);
+ }
+ }
+
void setBaseLayer(int layer, Region invalRegion, boolean showVisualIndicator,
boolean isPictureAfterFirstLayout, boolean registerPageSwapCallback) {
if (mNativeClass == 0)
@@ -4928,6 +4937,7 @@
// should be in content coordinates.
Rect bounds = nativeFocusCandidateNodeBounds();
Rect vBox = contentToViewRect(bounds);
+ offsetByLayerScrollPosition(vBox);
mWebTextView.setRect(vBox.left, vBox.top, vBox.width(), vBox.height());
if (!Rect.intersects(bounds, visibleRect)) {
revealSelection();
@@ -5505,10 +5515,10 @@
mMaxAutoScrollX = getViewWidth();
mMinAutoScrollY = 0;
mMaxAutoScrollY = getViewHeightWithTitle();
- mScrollingLayer = nativeScrollableLayer(viewToContentX(mSelectX),
+ mCurrentScrollingLayerId = nativeScrollableLayer(viewToContentX(mSelectX),
viewToContentY(mSelectY), mScrollingLayerRect,
mScrollingLayerBounds);
- if (mScrollingLayer != 0) {
+ if (mCurrentScrollingLayerId != 0) {
if (mScrollingLayerRect.left != mScrollingLayerRect.right) {
mMinAutoScrollX = Math.max(mMinAutoScrollX,
contentToViewX(mScrollingLayerBounds.left));
@@ -5994,9 +6004,9 @@
private void startScrollingLayer(float x, float y) {
int contentX = viewToContentX((int) x + mScrollX);
int contentY = viewToContentY((int) y + mScrollY);
- mScrollingLayer = nativeScrollableLayer(contentX, contentY,
+ mCurrentScrollingLayerId = nativeScrollableLayer(contentX, contentY,
mScrollingLayerRect, mScrollingLayerBounds);
- if (mScrollingLayer != 0) {
+ if (mCurrentScrollingLayerId != 0) {
mTouchMode = TOUCH_DRAG_LAYER_MODE;
}
}
@@ -6227,7 +6237,7 @@
ted.mPointsInView[0] = new Point(x, y);
ted.mMetaState = ev.getMetaState();
ted.mReprocess = mDeferTouchProcess;
- ted.mNativeLayer = mScrollingLayer;
+ ted.mNativeLayer = mCurrentScrollingLayerId;
ted.mNativeLayerRect.set(mScrollingLayerRect);
ted.mSequence = mTouchEventQueue.nextTouchSequence();
mTouchEventQueue.preQueueTouchEventData(ted);
@@ -6418,7 +6428,7 @@
ted.mPointsInView[0] = new Point(x, y);
ted.mMetaState = ev.getMetaState();
ted.mReprocess = mDeferTouchProcess;
- ted.mNativeLayer = mScrollingLayer;
+ ted.mNativeLayer = mCurrentScrollingLayerId;
ted.mNativeLayerRect.set(mScrollingLayerRect);
ted.mSequence = mTouchEventQueue.nextTouchSequence();
mTouchEventQueue.preQueueTouchEventData(ted);
@@ -6727,7 +6737,7 @@
// directions. mTouchMode might be TOUCH_DRAG_MODE if we have
// reached the edge of a layer but mScrollingLayer will be non-zero
// if we initiated the drag on a layer.
- if (mScrollingLayer != 0) {
+ if (mCurrentScrollingLayerId != 0) {
final int contentX = viewToContentDimension(deltaX);
final int contentY = viewToContentDimension(deltaY);
@@ -7249,7 +7259,7 @@
+ " vx=" + vx + " vy=" + vy
+ " maxX=" + maxX + " maxY=" + maxY
+ " scrollX=" + scrollX + " scrollY=" + scrollY
- + " layer=" + mScrollingLayer);
+ + " layer=" + mCurrentScrollingLayerId);
}
// Allow sloppy flings without overscrolling at the edges.
@@ -8358,7 +8368,7 @@
mSentAutoScrollMessage = false;
break;
}
- if (mScrollingLayer == 0) {
+ if (mCurrentScrollingLayerId == 0) {
pinScrollBy(mAutoScrollX, mAutoScrollY, true, 0);
} else {
scrollLayerTo(mScrollingLayerRect.left + mAutoScrollX,
@@ -9572,6 +9582,7 @@
* See WebTextView.setType()
*/
private native int nativeFocusCandidateType();
+ private native int nativeFocusCandidateLayerId();
private native boolean nativeFocusIsPlugin();
private native Rect nativeFocusNodeBounds();
/* package */ native int nativeFocusNodePointer();
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index c24d928..1fab1ca 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -3830,7 +3830,6 @@
if (imm != null && imm.isActive(this)) {
imm.hideSoftInputFromWindow(getWindowToken(), 0);
}
- clearFocus();
return;
}
}
@@ -3852,7 +3851,7 @@
| KeyEvent.FLAG_EDITOR_ACTION)));
}
}
-
+
/**
* Set the private content type of the text, which is the
* {@link EditorInfo#privateImeOptions EditorInfo.privateImeOptions}
@@ -5608,8 +5607,6 @@
outAttrs.extras = mInputContentType.extras;
} else {
outAttrs.imeOptions = EditorInfo.IME_NULL;
- // May not be defined otherwise and needed by onEditorAction
- mInputContentType = new InputContentType();
}
if (focusSearch(FOCUS_DOWN) != null) {
outAttrs.imeOptions |= EditorInfo.IME_FLAG_NAVIGATE_NEXT;
@@ -9387,42 +9384,59 @@
mPositionY = mTempCoords[1];
}
- public boolean isVisible(int positionX, int positionY) {
- final TextView textView = TextView.this;
-
- if (mTempRect == null) mTempRect = new Rect();
- final Rect clip = mTempRect;
- clip.left = getCompoundPaddingLeft();
- clip.top = getExtendedPaddingTop();
- clip.right = textView.getWidth() - getCompoundPaddingRight();
- clip.bottom = textView.getHeight() - getExtendedPaddingBottom();
-
- final ViewParent parent = textView.getParent();
- if (parent == null || !parent.getChildVisibleRect(textView, clip, null)) {
- return false;
- }
-
- int posX = mPositionX + positionX;
- int posY = mPositionY + positionY;
-
- // Offset by 1 to take into account 0.5 and int rounding around getPrimaryHorizontal.
- return posX >= clip.left - 1 && posX <= clip.right + 1 &&
- posY >= clip.top && posY <= clip.bottom;
- }
-
- public boolean isOffsetVisible(int offset) {
- final int line = mLayout.getLineForOffset(offset);
- final int lineBottom = mLayout.getLineBottom(line);
- final int primaryHorizontal = (int) mLayout.getPrimaryHorizontal(offset);
- return isVisible(primaryHorizontal + viewportToContentHorizontalOffset(),
- lineBottom + viewportToContentVerticalOffset());
- }
-
public void onScrollChanged() {
mScrollHasChanged = true;
}
}
+ private boolean isPositionVisible(int positionX, int positionY) {
+ synchronized (sTmpPosition) {
+ final float[] position = sTmpPosition;
+ position[0] = positionX;
+ position[1] = positionY;
+ View view = this;
+
+ while (view != null) {
+ if (view != this) {
+ // Local scroll is already taken into account in positionX/Y
+ position[0] -= view.getScrollX();
+ position[1] -= view.getScrollY();
+ }
+
+ if (position[0] < 0 || position[1] < 0 ||
+ position[0] > view.getWidth() || position[1] > view.getHeight()) {
+ return false;
+ }
+
+ if (!view.getMatrix().isIdentity()) {
+ view.getMatrix().mapPoints(position);
+ }
+
+ position[0] += view.getLeft();
+ position[1] += view.getTop();
+
+ final ViewParent parent = view.getParent();
+ if (parent instanceof View) {
+ view = (View) parent;
+ } else {
+ // We've reached the ViewRoot, stop iterating
+ view = null;
+ }
+ }
+ }
+
+ // We've been able to walk up the view hierarchy and the position was never clipped
+ return true;
+ }
+
+ private boolean isOffsetVisible(int offset) {
+ final int line = mLayout.getLineForOffset(offset);
+ final int lineBottom = mLayout.getLineBottom(line);
+ final int primaryHorizontal = (int) mLayout.getPrimaryHorizontal(offset);
+ return isPositionVisible(primaryHorizontal + viewportToContentHorizontalOffset(),
+ lineBottom + viewportToContentVerticalOffset());
+ }
+
@Override
protected void onScrollChanged(int horiz, int vert, int oldHoriz, int oldVert) {
super.onScrollChanged(horiz, vert, oldHoriz, oldVert);
@@ -9521,7 +9535,7 @@
public void updatePosition(int parentPositionX, int parentPositionY,
boolean parentPositionChanged, boolean parentScrolled) {
// Either parentPositionChanged or parentScrolled is true, check if still visible
- if (isShowing() && getPositionListener().isOffsetVisible(getTextOffset())) {
+ if (isShowing() && isOffsetVisible(getTextOffset())) {
if (parentScrolled) computeLocalPosition();
updatePosition(parentPositionX, parentPositionY);
} else {
@@ -10545,7 +10559,7 @@
return false;
}
- return getPositionListener().isVisible(mPositionX + mHotspotX, mPositionY);
+ return TextView.this.isPositionVisible(mPositionX + mHotspotX, mPositionY);
}
public abstract int getCurrentCursorOffset();
@@ -11521,6 +11535,7 @@
private Path mHighlightPath;
private boolean mHighlightPathBogus = true;
private static final RectF sTempRect = new RectF();
+ private static final float[] sTmpPosition = new float[2];
// XXX should be much larger
private static final int VERY_WIDE = 1024*1024;
diff --git a/core/java/com/android/internal/view/BaseInputHandler.java b/core/java/com/android/internal/view/BaseInputHandler.java
deleted file mode 100644
index 74b4b06..0000000
--- a/core/java/com/android/internal/view/BaseInputHandler.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2010 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.internal.view;
-
-import android.view.InputHandler;
-import android.view.InputQueue;
-import android.view.KeyEvent;
-import android.view.MotionEvent;
-
-/**
- * Base do-nothing implementation of an input handler.
- * @hide
- */
-public abstract class BaseInputHandler implements InputHandler {
- public void handleKey(KeyEvent event, InputQueue.FinishedCallback finishedCallback) {
- finishedCallback.finished(false);
- }
-
- public void handleMotion(MotionEvent event, InputQueue.FinishedCallback finishedCallback) {
- finishedCallback.finished(false);
- }
-}
diff --git a/core/jni/Android.mk b/core/jni/Android.mk
index 71c5d26..f20fbbb 100644
--- a/core/jni/Android.mk
+++ b/core/jni/Android.mk
@@ -50,7 +50,7 @@
android_view_Surface.cpp \
android_view_TextureView.cpp \
android_view_InputChannel.cpp \
- android_view_InputQueue.cpp \
+ android_view_InputEventReceiver.cpp \
android_view_KeyEvent.cpp \
android_view_KeyCharacterMap.cpp \
android_view_HardwareRenderer.cpp \
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp
index 6d1410c..c6447e1 100644
--- a/core/jni/AndroidRuntime.cpp
+++ b/core/jni/AndroidRuntime.cpp
@@ -168,7 +168,7 @@
extern int register_android_app_ActivityThread(JNIEnv *env);
extern int register_android_app_NativeActivity(JNIEnv *env);
extern int register_android_view_InputChannel(JNIEnv* env);
-extern int register_android_view_InputQueue(JNIEnv* env);
+extern int register_android_view_InputEventReceiver(JNIEnv* env);
extern int register_android_view_KeyEvent(JNIEnv* env);
extern int register_android_view_MotionEvent(JNIEnv* env);
extern int register_android_view_PointerIcon(JNIEnv* env);
@@ -1192,7 +1192,7 @@
REG_JNI(register_android_app_ActivityThread),
REG_JNI(register_android_app_NativeActivity),
REG_JNI(register_android_view_InputChannel),
- REG_JNI(register_android_view_InputQueue),
+ REG_JNI(register_android_view_InputEventReceiver),
REG_JNI(register_android_view_KeyEvent),
REG_JNI(register_android_view_MotionEvent),
REG_JNI(register_android_view_PointerIcon),
diff --git a/core/jni/android/graphics/TextLayoutCache.cpp b/core/jni/android/graphics/TextLayoutCache.cpp
index 675cf33..d69f2d3 100644
--- a/core/jni/android/graphics/TextLayoutCache.cpp
+++ b/core/jni/android/graphics/TextLayoutCache.cpp
@@ -328,10 +328,6 @@
return mElapsedTime;
}
-//HB_ShaperItem TextLayoutEngine::mShaperItem;
-//HB_FontRec TextLayoutEngine::mFontRec;
-//SkPaint TextLayoutEngine::mShapingPaint;
-
TextLayoutEngine::TextLayoutEngine() : mShaperItemGlyphArraySize(0),
mShaperItemLogClustersArraySize(0) {
mDefaultTypeface = SkFontHost::CreateTypeface(NULL, NULL, NULL, 0, SkTypeface::kNormal);
@@ -487,7 +483,7 @@
// Default single run case
if (useSingleRun){
#if DEBUG_GLYPHS
- LOGD("Using a SINGLE ICURun "
+ LOGD("Using a SINGLE BiDi Run "
"-- run-start = %d, run-len = %d, isRTL = %d", start, count, isRTL);
#endif
computeRunValues(paint, chars + start, count, isRTL,
diff --git a/core/jni/android_view_InputEventReceiver.cpp b/core/jni/android_view_InputEventReceiver.cpp
new file mode 100644
index 0000000..9ae63dd
--- /dev/null
+++ b/core/jni/android_view_InputEventReceiver.cpp
@@ -0,0 +1,307 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "InputEventReceiver"
+
+//#define LOG_NDEBUG 0
+
+// Log debug messages about the dispatch cycle.
+#define DEBUG_DISPATCH_CYCLE 0
+
+
+#include "JNIHelp.h"
+
+#include <android_runtime/AndroidRuntime.h>
+#include <utils/Log.h>
+#include <utils/Looper.h>
+#include <utils/KeyedVector.h>
+#include <utils/threads.h>
+#include <ui/InputTransport.h>
+#include "android_os_MessageQueue.h"
+#include "android_view_InputChannel.h"
+#include "android_view_KeyEvent.h"
+#include "android_view_MotionEvent.h"
+
+namespace android {
+
+static struct {
+ jclass clazz;
+
+ jmethodID dispatchInputEvent;
+} gInputEventReceiverClassInfo;
+
+
+class NativeInputEventReceiver : public RefBase {
+public:
+ NativeInputEventReceiver(JNIEnv* env,
+ jobject receiverObj, const sp<InputChannel>& inputChannel,
+ const sp<Looper>& looper);
+
+ status_t initialize();
+ status_t finishInputEvent(bool handled);
+ static int handleReceiveCallback(int receiveFd, int events, void* data);
+
+protected:
+ virtual ~NativeInputEventReceiver();
+
+private:
+ jobject mReceiverObjGlobal;
+ InputConsumer mInputConsumer;
+ sp<Looper> mLooper;
+ bool mEventInProgress;
+ PreallocatedInputEventFactory mInputEventFactory;
+
+ const char* getInputChannelName() {
+ return mInputConsumer.getChannel()->getName().string();
+ }
+};
+
+
+NativeInputEventReceiver::NativeInputEventReceiver(JNIEnv* env,
+ jobject receiverObj, const sp<InputChannel>& inputChannel, const sp<Looper>& looper) :
+ mReceiverObjGlobal(env->NewGlobalRef(receiverObj)),
+ mInputConsumer(inputChannel), mLooper(looper), mEventInProgress(false) {
+#if DEBUG_DISPATCH_CYCLE
+ LOGD("channel '%s' ~ Initializing input event receiver.", getInputChannelName());
+#endif
+}
+
+NativeInputEventReceiver::~NativeInputEventReceiver() {
+#if DEBUG_DISPATCH_CYCLE
+ LOGD("channel '%s' ~ Disposing input event receiver.", getInputChannelName());
+#endif
+
+ mLooper->removeFd(mInputConsumer.getChannel()->getReceivePipeFd());
+ if (mEventInProgress) {
+ mInputConsumer.sendFinishedSignal(false); // ignoring result
+ }
+
+ JNIEnv* env = AndroidRuntime::getJNIEnv();
+ env->DeleteGlobalRef(mReceiverObjGlobal);
+}
+
+status_t NativeInputEventReceiver::initialize() {
+ status_t result = mInputConsumer.initialize();
+ if (result) {
+ LOGW("Failed to initialize input consumer for input channel '%s', status=%d",
+ getInputChannelName(), result);
+ return result;
+ }
+
+ int32_t receiveFd = mInputConsumer.getChannel()->getReceivePipeFd();
+ mLooper->addFd(receiveFd, 0, ALOOPER_EVENT_INPUT, handleReceiveCallback, this);
+ return OK;
+}
+
+status_t NativeInputEventReceiver::finishInputEvent(bool handled) {
+ if (mEventInProgress) {
+#if DEBUG_DISPATCH_CYCLE
+ LOGD("channel '%s' ~ Finished input event.", getInputChannelName());
+#endif
+ mEventInProgress = false;
+
+ status_t status = mInputConsumer.sendFinishedSignal(handled);
+ if (status) {
+ LOGW("Failed to send finished signal on channel '%s'. status=%d",
+ getInputChannelName(), status);
+ }
+ return status;
+ } else {
+ LOGW("Ignoring attempt to finish input event while no event is in progress.");
+ return OK;
+ }
+}
+
+int NativeInputEventReceiver::handleReceiveCallback(int receiveFd, int events, void* data) {
+ sp<NativeInputEventReceiver> r = static_cast<NativeInputEventReceiver*>(data);
+
+ if (events & (ALOOPER_EVENT_ERROR | ALOOPER_EVENT_HANGUP)) {
+ LOGE("channel '%s' ~ Publisher closed input channel or an error occurred. "
+ "events=0x%x", r->getInputChannelName(), events);
+ return 0; // remove the callback
+ }
+
+ if (!(events & ALOOPER_EVENT_INPUT)) {
+ LOGW("channel '%s' ~ Received spurious callback for unhandled poll event. "
+ "events=0x%x", r->getInputChannelName(), events);
+ return 1;
+ }
+
+ status_t status = r->mInputConsumer.receiveDispatchSignal();
+ if (status) {
+ LOGE("channel '%s' ~ Failed to receive dispatch signal. status=%d",
+ r->getInputChannelName(), status);
+ return 0; // remove the callback
+ }
+
+ if (r->mEventInProgress) {
+ LOGW("channel '%s' ~ Publisher sent spurious dispatch signal.",
+ r->getInputChannelName());
+ return 1;
+ }
+
+ InputEvent* inputEvent;
+ status = r->mInputConsumer.consume(&r->mInputEventFactory, &inputEvent);
+ if (status) {
+ LOGW("channel '%s' ~ Failed to consume input event. status=%d",
+ r->getInputChannelName(), status);
+ r->mInputConsumer.sendFinishedSignal(false);
+ return 1;
+ }
+
+ JNIEnv* env = AndroidRuntime::getJNIEnv();
+ jobject inputEventObj;
+ switch (inputEvent->getType()) {
+ case AINPUT_EVENT_TYPE_KEY:
+#if DEBUG_DISPATCH_CYCLE
+ LOGD("channel '%s' ~ Received key event.",
+ r->getInputChannelName());
+#endif
+ inputEventObj = android_view_KeyEvent_fromNative(env,
+ static_cast<KeyEvent*>(inputEvent));
+ break;
+
+ case AINPUT_EVENT_TYPE_MOTION:
+#if DEBUG_DISPATCH_CYCLE
+ LOGD("channel '%s' ~ Received motion event.",
+ r->getInputChannelName());
+#endif
+ inputEventObj = android_view_MotionEvent_obtainAsCopy(env,
+ static_cast<MotionEvent*>(inputEvent));
+ break;
+
+ default:
+ assert(false); // InputConsumer should prevent this from ever happening
+ inputEventObj = NULL;
+ }
+
+ if (!inputEventObj) {
+ LOGW("channel '%s' ~ Failed to obtain event object.",
+ r->getInputChannelName());
+ r->mInputConsumer.sendFinishedSignal(false);
+ return 1;
+ }
+
+ r->mEventInProgress = true;
+
+#if DEBUG_DISPATCH_CYCLE
+ LOGD("channel '%s' ~ Invoking input handler.", r->getInputChannelName());
+#endif
+ env->CallVoidMethod(r->mReceiverObjGlobal,
+ gInputEventReceiverClassInfo.dispatchInputEvent, inputEventObj);
+#if DEBUG_DISPATCH_CYCLE
+ LOGD("channel '%s' ~ Returned from input handler.", r->getInputChannelName());
+#endif
+
+ if (env->ExceptionCheck()) {
+ LOGE("channel '%s' ~ An exception occurred while dispatching an event.",
+ r->getInputChannelName());
+ LOGE_EX(env);
+ env->ExceptionClear();
+
+ if (r->mEventInProgress) {
+ r->mInputConsumer.sendFinishedSignal(false);
+ r->mEventInProgress = false;
+ }
+ }
+
+ env->DeleteLocalRef(inputEventObj);
+ return 1;
+}
+
+
+static jint nativeInit(JNIEnv* env, jclass clazz, jobject receiverObj,
+ jobject inputChannelObj, jobject messageQueueObj) {
+ sp<InputChannel> inputChannel = android_view_InputChannel_getInputChannel(env,
+ inputChannelObj);
+ if (inputChannel == NULL) {
+ jniThrowRuntimeException(env, "InputChannel is not initialized.");
+ return 0;
+ }
+
+ sp<Looper> looper = android_os_MessageQueue_getLooper(env, messageQueueObj);
+ if (looper == NULL) {
+ jniThrowRuntimeException(env, "MessageQueue is not initialized.");
+ return 0;
+ }
+
+ sp<NativeInputEventReceiver> receiver = new NativeInputEventReceiver(env,
+ receiverObj, inputChannel, looper);
+ status_t status = receiver->initialize();
+ if (status) {
+ String8 message;
+ message.appendFormat("Failed to initialize input event receiver. status=%d", status);
+ jniThrowRuntimeException(env, message.string());
+ return 0;
+ }
+
+ receiver->incStrong(gInputEventReceiverClassInfo.clazz); // retain a reference for the object
+ return reinterpret_cast<jint>(receiver.get());
+}
+
+static void nativeDispose(JNIEnv* env, jclass clazz, jint receiverPtr) {
+ sp<NativeInputEventReceiver> receiver =
+ reinterpret_cast<NativeInputEventReceiver*>(receiverPtr);
+ receiver->decStrong(gInputEventReceiverClassInfo.clazz); // drop reference held by the object
+}
+
+static void nativeFinishInputEvent(JNIEnv* env, jclass clazz, jint receiverPtr, jboolean handled) {
+ sp<NativeInputEventReceiver> receiver =
+ reinterpret_cast<NativeInputEventReceiver*>(receiverPtr);
+ status_t status = receiver->finishInputEvent(handled);
+ if (status) {
+ String8 message;
+ message.appendFormat("Failed to finish input event. status=%d", status);
+ jniThrowRuntimeException(env, message.string());
+ }
+}
+
+
+static JNINativeMethod gMethods[] = {
+ /* name, signature, funcPtr */
+ { "nativeInit",
+ "(Landroid/view/InputEventReceiver;Landroid/view/InputChannel;Landroid/os/MessageQueue;)I",
+ (void*)nativeInit },
+ { "nativeDispose",
+ "(I)V",
+ (void*)nativeDispose },
+ { "nativeFinishInputEvent", "(IZ)V",
+ (void*)nativeFinishInputEvent }
+};
+
+#define FIND_CLASS(var, className) \
+ var = env->FindClass(className); \
+ LOG_FATAL_IF(! var, "Unable to find class " className); \
+ var = jclass(env->NewGlobalRef(var));
+
+#define GET_METHOD_ID(var, clazz, methodName, methodDescriptor) \
+ var = env->GetMethodID(clazz, methodName, methodDescriptor); \
+ LOG_FATAL_IF(! var, "Unable to find method " methodName);
+
+int register_android_view_InputEventReceiver(JNIEnv* env) {
+ int res = jniRegisterNativeMethods(env, "android/view/InputEventReceiver",
+ gMethods, NELEM(gMethods));
+ LOG_FATAL_IF(res < 0, "Unable to register native methods.");
+
+ FIND_CLASS(gInputEventReceiverClassInfo.clazz, "android/view/InputEventReceiver");
+
+ GET_METHOD_ID(gInputEventReceiverClassInfo.dispatchInputEvent,
+ gInputEventReceiverClassInfo.clazz,
+ "dispatchInputEvent", "(Landroid/view/InputEvent;)V");
+ return 0;
+}
+
+} // namespace android
diff --git a/core/jni/android_view_InputQueue.cpp b/core/jni/android_view_InputQueue.cpp
deleted file mode 100644
index 300c04a..0000000
--- a/core/jni/android_view_InputQueue.cpp
+++ /dev/null
@@ -1,530 +0,0 @@
-/*
- * Copyright (C) 2010 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define LOG_TAG "InputQueue-JNI"
-
-//#define LOG_NDEBUG 0
-
-// Log debug messages about the dispatch cycle.
-#define DEBUG_DISPATCH_CYCLE 0
-
-// Log debug messages about registrations.
-#define DEBUG_REGISTRATION 0
-
-
-#include "JNIHelp.h"
-
-#include <android_runtime/AndroidRuntime.h>
-#include <utils/Log.h>
-#include <utils/Looper.h>
-#include <utils/KeyedVector.h>
-#include <utils/threads.h>
-#include <ui/InputTransport.h>
-#include "android_os_MessageQueue.h"
-#include "android_view_InputChannel.h"
-#include "android_view_KeyEvent.h"
-#include "android_view_MotionEvent.h"
-
-namespace android {
-
-// ----------------------------------------------------------------------------
-
-static struct {
- jclass clazz;
-
- jmethodID dispatchKeyEvent;
- jmethodID dispatchMotionEvent;
-} gInputQueueClassInfo;
-
-// ----------------------------------------------------------------------------
-
-class NativeInputQueue {
-public:
- NativeInputQueue();
- ~NativeInputQueue();
-
- status_t registerInputChannel(JNIEnv* env, jobject inputChannelObj,
- jobject inputHandlerObj, jobject messageQueueObj);
-
- status_t unregisterInputChannel(JNIEnv* env, jobject inputChannelObj);
-
- status_t finished(JNIEnv* env, jlong finishedToken, bool handled, bool ignoreSpuriousFinish);
-
-private:
- class Connection : public RefBase {
- protected:
- virtual ~Connection();
-
- public:
- enum Status {
- // Everything is peachy.
- STATUS_NORMAL,
- // The input channel has been unregistered.
- STATUS_ZOMBIE
- };
-
- Connection(uint16_t id,
- const sp<InputChannel>& inputChannel, const sp<Looper>& looper);
-
- inline const char* getInputChannelName() const { return inputChannel->getName().string(); }
-
- // A unique id for this connection.
- uint16_t id;
-
- Status status;
-
- sp<InputChannel> inputChannel;
- InputConsumer inputConsumer;
- sp<Looper> looper;
- jobject inputHandlerObjGlobal;
- PreallocatedInputEventFactory inputEventFactory;
-
- // The sequence number of the current event being dispatched.
- // This is used as part of the finished token as a way to determine whether the finished
- // token is still valid before sending a finished signal back to the publisher.
- uint16_t messageSeqNum;
-
- // True if a message has been received from the publisher but not yet finished.
- bool messageInProgress;
- };
-
- Mutex mLock;
- uint16_t mNextConnectionId;
- KeyedVector<int32_t, sp<Connection> > mConnectionsByReceiveFd;
-
- ssize_t getConnectionIndex(const sp<InputChannel>& inputChannel);
-
- static void handleInputChannelDisposed(JNIEnv* env,
- jobject inputChannelObj, const sp<InputChannel>& inputChannel, void* data);
-
- static int handleReceiveCallback(int receiveFd, int events, void* data);
-
- static jlong generateFinishedToken(int32_t receiveFd,
- uint16_t connectionId, uint16_t messageSeqNum);
-
- static void parseFinishedToken(jlong finishedToken,
- int32_t* outReceiveFd, uint16_t* outConnectionId, uint16_t* outMessageIndex);
-};
-
-// ----------------------------------------------------------------------------
-
-NativeInputQueue::NativeInputQueue() :
- mNextConnectionId(0) {
-}
-
-NativeInputQueue::~NativeInputQueue() {
-}
-
-status_t NativeInputQueue::registerInputChannel(JNIEnv* env, jobject inputChannelObj,
- jobject inputHandlerObj, jobject messageQueueObj) {
- sp<InputChannel> inputChannel = android_view_InputChannel_getInputChannel(env,
- inputChannelObj);
- if (inputChannel == NULL) {
- LOGW("Input channel is not initialized.");
- return BAD_VALUE;
- }
-
-#if DEBUG_REGISTRATION
- LOGD("channel '%s' - Registered", inputChannel->getName().string());
-#endif
-
- sp<Looper> looper = android_os_MessageQueue_getLooper(env, messageQueueObj);
-
- { // acquire lock
- AutoMutex _l(mLock);
-
- if (getConnectionIndex(inputChannel) >= 0) {
- LOGW("Attempted to register already registered input channel '%s'",
- inputChannel->getName().string());
- return BAD_VALUE;
- }
-
- uint16_t connectionId = mNextConnectionId++;
- sp<Connection> connection = new Connection(connectionId, inputChannel, looper);
- status_t result = connection->inputConsumer.initialize();
- if (result) {
- LOGW("Failed to initialize input consumer for input channel '%s', status=%d",
- inputChannel->getName().string(), result);
- return result;
- }
-
- connection->inputHandlerObjGlobal = env->NewGlobalRef(inputHandlerObj);
-
- int32_t receiveFd = inputChannel->getReceivePipeFd();
- mConnectionsByReceiveFd.add(receiveFd, connection);
-
- looper->addFd(receiveFd, 0, ALOOPER_EVENT_INPUT, handleReceiveCallback, this);
- } // release lock
-
- android_view_InputChannel_setDisposeCallback(env, inputChannelObj,
- handleInputChannelDisposed, this);
- return OK;
-}
-
-status_t NativeInputQueue::unregisterInputChannel(JNIEnv* env, jobject inputChannelObj) {
- sp<InputChannel> inputChannel = android_view_InputChannel_getInputChannel(env,
- inputChannelObj);
- if (inputChannel == NULL) {
- LOGW("Input channel is not initialized.");
- return BAD_VALUE;
- }
-
-#if DEBUG_REGISTRATION
- LOGD("channel '%s' - Unregistered", inputChannel->getName().string());
-#endif
-
- { // acquire lock
- AutoMutex _l(mLock);
-
- ssize_t connectionIndex = getConnectionIndex(inputChannel);
- if (connectionIndex < 0) {
- LOGW("Attempted to unregister already unregistered input channel '%s'",
- inputChannel->getName().string());
- return BAD_VALUE;
- }
-
- sp<Connection> connection = mConnectionsByReceiveFd.valueAt(connectionIndex);
- mConnectionsByReceiveFd.removeItemsAt(connectionIndex);
-
- connection->status = Connection::STATUS_ZOMBIE;
-
- connection->looper->removeFd(inputChannel->getReceivePipeFd());
-
- env->DeleteGlobalRef(connection->inputHandlerObjGlobal);
- connection->inputHandlerObjGlobal = NULL;
-
- if (connection->messageInProgress) {
- LOGI("Sending finished signal for input channel '%s' since it is being unregistered "
- "while an input message is still in progress.",
- connection->getInputChannelName());
- connection->messageInProgress = false;
- connection->inputConsumer.sendFinishedSignal(false); // ignoring result
- }
- } // release lock
-
- android_view_InputChannel_setDisposeCallback(env, inputChannelObj, NULL, NULL);
- return OK;
-}
-
-ssize_t NativeInputQueue::getConnectionIndex(const sp<InputChannel>& inputChannel) {
- ssize_t connectionIndex = mConnectionsByReceiveFd.indexOfKey(inputChannel->getReceivePipeFd());
- if (connectionIndex >= 0) {
- sp<Connection> connection = mConnectionsByReceiveFd.valueAt(connectionIndex);
- if (connection->inputChannel.get() == inputChannel.get()) {
- return connectionIndex;
- }
- }
-
- return -1;
-}
-
-status_t NativeInputQueue::finished(JNIEnv* env, jlong finishedToken,
- bool handled, bool ignoreSpuriousFinish) {
- int32_t receiveFd;
- uint16_t connectionId;
- uint16_t messageSeqNum;
- parseFinishedToken(finishedToken, &receiveFd, &connectionId, &messageSeqNum);
-
- { // acquire lock
- AutoMutex _l(mLock);
-
- ssize_t connectionIndex = mConnectionsByReceiveFd.indexOfKey(receiveFd);
- if (connectionIndex < 0) {
- if (! ignoreSpuriousFinish) {
- LOGI("Ignoring finish signal on channel that is no longer registered.");
- }
- return DEAD_OBJECT;
- }
-
- sp<Connection> connection = mConnectionsByReceiveFd.valueAt(connectionIndex);
- if (connectionId != connection->id) {
- if (! ignoreSpuriousFinish) {
- LOGI("Ignoring finish signal on channel that is no longer registered.");
- }
- return DEAD_OBJECT;
- }
-
- if (messageSeqNum != connection->messageSeqNum || ! connection->messageInProgress) {
- if (! ignoreSpuriousFinish) {
- LOGW("Attempted to finish input twice on channel '%s'. "
- "finished messageSeqNum=%d, current messageSeqNum=%d, messageInProgress=%d",
- connection->getInputChannelName(),
- messageSeqNum, connection->messageSeqNum, connection->messageInProgress);
- }
- return INVALID_OPERATION;
- }
-
- connection->messageInProgress = false;
-
- status_t status = connection->inputConsumer.sendFinishedSignal(handled);
- if (status) {
- LOGW("Failed to send finished signal on channel '%s'. status=%d",
- connection->getInputChannelName(), status);
- return status;
- }
-
-#if DEBUG_DISPATCH_CYCLE
- LOGD("channel '%s' ~ Finished event.",
- connection->getInputChannelName());
-#endif
- } // release lock
-
- return OK;
-}
-
-void NativeInputQueue::handleInputChannelDisposed(JNIEnv* env,
- jobject inputChannelObj, const sp<InputChannel>& inputChannel, void* data) {
- LOGW("Input channel object '%s' was disposed without first being unregistered with "
- "the input queue!", inputChannel->getName().string());
-
- NativeInputQueue* q = static_cast<NativeInputQueue*>(data);
- q->unregisterInputChannel(env, inputChannelObj);
-}
-
-int NativeInputQueue::handleReceiveCallback(int receiveFd, int events, void* data) {
- NativeInputQueue* q = static_cast<NativeInputQueue*>(data);
- JNIEnv* env = AndroidRuntime::getJNIEnv();
-
- sp<Connection> connection;
- InputEvent* inputEvent;
- jobject inputHandlerObjLocal;
- jlong finishedToken;
- { // acquire lock
- AutoMutex _l(q->mLock);
-
- ssize_t connectionIndex = q->mConnectionsByReceiveFd.indexOfKey(receiveFd);
- if (connectionIndex < 0) {
- LOGE("Received spurious receive callback for unknown input channel. "
- "fd=%d, events=0x%x", receiveFd, events);
- return 0; // remove the callback
- }
-
- connection = q->mConnectionsByReceiveFd.valueAt(connectionIndex);
- if (events & (ALOOPER_EVENT_ERROR | ALOOPER_EVENT_HANGUP)) {
- LOGE("channel '%s' ~ Publisher closed input channel or an error occurred. "
- "events=0x%x", connection->getInputChannelName(), events);
- return 0; // remove the callback
- }
-
- if (! (events & ALOOPER_EVENT_INPUT)) {
- LOGW("channel '%s' ~ Received spurious callback for unhandled poll event. "
- "events=0x%x", connection->getInputChannelName(), events);
- return 1;
- }
-
- status_t status = connection->inputConsumer.receiveDispatchSignal();
- if (status) {
- LOGE("channel '%s' ~ Failed to receive dispatch signal. status=%d",
- connection->getInputChannelName(), status);
- return 0; // remove the callback
- }
-
- if (connection->messageInProgress) {
- LOGW("channel '%s' ~ Publisher sent spurious dispatch signal.",
- connection->getInputChannelName());
- return 1;
- }
-
- status = connection->inputConsumer.consume(& connection->inputEventFactory, & inputEvent);
- if (status) {
- LOGW("channel '%s' ~ Failed to consume input event. status=%d",
- connection->getInputChannelName(), status);
- connection->inputConsumer.sendFinishedSignal(false);
- return 1;
- }
-
- connection->messageInProgress = true;
- connection->messageSeqNum += 1;
-
- finishedToken = generateFinishedToken(receiveFd, connection->id, connection->messageSeqNum);
-
- inputHandlerObjLocal = env->NewLocalRef(connection->inputHandlerObjGlobal);
- } // release lock
-
- // Invoke the handler outside of the lock.
- //
- // Note: inputEvent is stored in a field of the connection object which could potentially
- // become disposed due to the input channel being unregistered concurrently.
- // For this reason, we explicitly keep the connection object alive by holding
- // a strong pointer to it within this scope. We also grabbed a local reference to
- // the input handler object itself for the same reason.
-
- int32_t inputEventType = inputEvent->getType();
-
- jobject inputEventObj;
- jmethodID dispatchMethodId;
- switch (inputEventType) {
- case AINPUT_EVENT_TYPE_KEY:
-#if DEBUG_DISPATCH_CYCLE
- LOGD("channel '%s' ~ Received key event.", connection->getInputChannelName());
-#endif
- inputEventObj = android_view_KeyEvent_fromNative(env,
- static_cast<KeyEvent*>(inputEvent));
- dispatchMethodId = gInputQueueClassInfo.dispatchKeyEvent;
- break;
-
- case AINPUT_EVENT_TYPE_MOTION:
-#if DEBUG_DISPATCH_CYCLE
- LOGD("channel '%s' ~ Received motion event.", connection->getInputChannelName());
-#endif
- inputEventObj = android_view_MotionEvent_obtainAsCopy(env,
- static_cast<MotionEvent*>(inputEvent));
- dispatchMethodId = gInputQueueClassInfo.dispatchMotionEvent;
- break;
-
- default:
- assert(false); // InputConsumer should prevent this from ever happening
- inputEventObj = NULL;
- }
-
- if (! inputEventObj) {
- LOGW("channel '%s' ~ Failed to obtain DVM event object.",
- connection->getInputChannelName());
- env->DeleteLocalRef(inputHandlerObjLocal);
- q->finished(env, finishedToken, false, false);
- return 1;
- }
-
-#if DEBUG_DISPATCH_CYCLE
- LOGD("Invoking input handler.");
-#endif
- env->CallStaticVoidMethod(gInputQueueClassInfo.clazz,
- dispatchMethodId, inputHandlerObjLocal, inputEventObj,
- jlong(finishedToken));
-#if DEBUG_DISPATCH_CYCLE
- LOGD("Returned from input handler.");
-#endif
-
- if (env->ExceptionCheck()) {
- LOGE("An exception occurred while invoking the input handler for an event.");
- LOGE_EX(env);
- env->ExceptionClear();
-
- q->finished(env, finishedToken, false, true /*ignoreSpuriousFinish*/);
- }
-
- env->DeleteLocalRef(inputEventObj);
- env->DeleteLocalRef(inputHandlerObjLocal);
- return 1;
-}
-
-jlong NativeInputQueue::generateFinishedToken(int32_t receiveFd, uint16_t connectionId,
- uint16_t messageSeqNum) {
- return (jlong(receiveFd) << 32) | (jlong(connectionId) << 16) | jlong(messageSeqNum);
-}
-
-void NativeInputQueue::parseFinishedToken(jlong finishedToken,
- int32_t* outReceiveFd, uint16_t* outConnectionId, uint16_t* outMessageIndex) {
- *outReceiveFd = int32_t(finishedToken >> 32);
- *outConnectionId = uint16_t(finishedToken >> 16);
- *outMessageIndex = uint16_t(finishedToken);
-}
-
-// ----------------------------------------------------------------------------
-
-NativeInputQueue::Connection::Connection(uint16_t id,
- const sp<InputChannel>& inputChannel, const sp<Looper>& looper) :
- id(id), status(STATUS_NORMAL), inputChannel(inputChannel), inputConsumer(inputChannel),
- looper(looper), inputHandlerObjGlobal(NULL),
- messageSeqNum(0), messageInProgress(false) {
-}
-
-NativeInputQueue::Connection::~Connection() {
-}
-
-// ----------------------------------------------------------------------------
-
-static NativeInputQueue gNativeInputQueue;
-
-static void android_view_InputQueue_nativeRegisterInputChannel(JNIEnv* env, jclass clazz,
- jobject inputChannelObj, jobject inputHandlerObj, jobject messageQueueObj) {
- status_t status = gNativeInputQueue.registerInputChannel(
- env, inputChannelObj, inputHandlerObj, messageQueueObj);
-
- if (status) {
- String8 message;
- message.appendFormat("Failed to register input channel. status=%d", status);
- jniThrowRuntimeException(env, message.string());
- }
-}
-
-static void android_view_InputQueue_nativeUnregisterInputChannel(JNIEnv* env, jclass clazz,
- jobject inputChannelObj) {
- status_t status = gNativeInputQueue.unregisterInputChannel(env, inputChannelObj);
-
- if (status) {
- String8 message;
- message.appendFormat("Failed to unregister input channel. status=%d", status);
- jniThrowRuntimeException(env, message.string());
- }
-}
-
-static void android_view_InputQueue_nativeFinished(JNIEnv* env, jclass clazz,
- jlong finishedToken, bool handled) {
- status_t status = gNativeInputQueue.finished(
- env, finishedToken, handled, false /*ignoreSpuriousFinish*/);
-
- // We ignore the case where an event could not be finished because the input channel
- // was no longer registered (DEAD_OBJECT) since it is a common race that can occur
- // during application shutdown. The input dispatcher recovers gracefully anyways.
- if (status != OK && status != DEAD_OBJECT) {
- String8 message;
- message.appendFormat("Failed to finish input event. status=%d", status);
- jniThrowRuntimeException(env, message.string());
- }
-}
-
-// ----------------------------------------------------------------------------
-
-static JNINativeMethod gInputQueueMethods[] = {
- /* name, signature, funcPtr */
- { "nativeRegisterInputChannel",
- "(Landroid/view/InputChannel;Landroid/view/InputHandler;Landroid/os/MessageQueue;)V",
- (void*)android_view_InputQueue_nativeRegisterInputChannel },
- { "nativeUnregisterInputChannel",
- "(Landroid/view/InputChannel;)V",
- (void*)android_view_InputQueue_nativeUnregisterInputChannel },
- { "nativeFinished", "(JZ)V",
- (void*)android_view_InputQueue_nativeFinished }
-};
-
-#define FIND_CLASS(var, className) \
- var = env->FindClass(className); \
- LOG_FATAL_IF(! var, "Unable to find class " className); \
- var = jclass(env->NewGlobalRef(var));
-
-#define GET_STATIC_METHOD_ID(var, clazz, methodName, methodDescriptor) \
- var = env->GetStaticMethodID(clazz, methodName, methodDescriptor); \
- LOG_FATAL_IF(! var, "Unable to find static method " methodName);
-
-int register_android_view_InputQueue(JNIEnv* env) {
- int res = jniRegisterNativeMethods(env, "android/view/InputQueue",
- gInputQueueMethods, NELEM(gInputQueueMethods));
- LOG_FATAL_IF(res < 0, "Unable to register native methods.");
-
- FIND_CLASS(gInputQueueClassInfo.clazz, "android/view/InputQueue");
-
- GET_STATIC_METHOD_ID(gInputQueueClassInfo.dispatchKeyEvent, gInputQueueClassInfo.clazz,
- "dispatchKeyEvent",
- "(Landroid/view/InputHandler;Landroid/view/KeyEvent;J)V");
-
- GET_STATIC_METHOD_ID(gInputQueueClassInfo.dispatchMotionEvent, gInputQueueClassInfo.clazz,
- "dispatchMotionEvent",
- "(Landroid/view/InputHandler;Landroid/view/MotionEvent;J)V");
- return 0;
-}
-
-} // namespace android
diff --git a/core/res/res/layout/global_actions_item.xml b/core/res/res/layout/global_actions_item.xml
index 67b1644..13ab985 100644
--- a/core/res/res/layout/global_actions_item.xml
+++ b/core/res/res/layout/global_actions_item.xml
@@ -14,48 +14,46 @@
limitations under the License.
-->
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<!-- RelativeLayouts have an issue enforcing minimum heights, so just
+ work around this for now with LinearLayouts. -->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="?android:attr/listPreferredItemHeight"
+ android:layout_height="wrap_content"
+ android:minHeight="?android:attr/listPreferredItemHeight"
+ android:orientation="horizontal"
android:paddingLeft="11dip"
android:paddingTop="6dip"
android:paddingBottom="6dip"
>
-
<ImageView android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="match_parent"
- android:layout_alignParentTop="true"
- android:layout_alignParentBottom="true"
+ android:layout_gravity="center"
android:layout_marginRight="9dip"
- />
-
-
- <TextView android:id="@+id/status"
- android:layout_width="match_parent"
- android:layout_height="26dip"
-
- android:layout_toRightOf="@id/icon"
- android:layout_alignParentBottom="true"
- android:layout_alignParentRight="true"
-
- android:textAppearance="?android:attr/textAppearanceSmall"
/>
-
- <TextView android:id="@+id/message"
+ <LinearLayout
+ android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ >
+ <TextView android:id="@+id/message"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="top"
- android:layout_toRightOf="@id/icon"
- android:layout_alignParentRight="true"
- android:layout_alignParentTop="true"
- android:layout_above="@id/status"
- android:layout_alignWithParentIfMissing="true"
- android:gravity="center_vertical"
- android:textAppearance="?android:attr/textAppearanceLarge"
- />
+ android:gravity="center_vertical"
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ />
+ <TextView android:id="@+id/status"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="bottom"
+ android:minHeight="26dp"
-
-</RelativeLayout>
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ />
+ </LinearLayout>
+</LinearLayout>
\ No newline at end of file
diff --git a/core/tests/coretests/src/android/accessibilityservice/InterrogationActivityTest.java b/core/tests/coretests/src/android/accessibilityservice/InterrogationActivityTest.java
index 1ed54cb..259a094 100644
--- a/core/tests/coretests/src/android/accessibilityservice/InterrogationActivityTest.java
+++ b/core/tests/coretests/src/android/accessibilityservice/InterrogationActivityTest.java
@@ -26,6 +26,7 @@
import android.test.ActivityInstrumentationTestCase2;
import android.test.suitebuilder.annotation.LargeTest;
import android.util.Log;
+import android.view.View;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityInteractionClient;
import android.view.accessibility.AccessibilityManager;
@@ -54,28 +55,31 @@
// Timeout before give up wait for the system to process an accessibility setting change.
private static final int TIMEOUT_PROPAGATE_ACCESSIBLITY_SETTING = 2000;
+ // Timeout for the accessibility state of an Activity to be fully initialized.
+ private static final int TIMEOUT_ACCESSIBLITY_STATE_INITIALIZED_MILLIS = 100;
+
// Handle to a connection to the AccessibilityManagerService
- private static IAccessibilityServiceConnection sConnection;
+ private static int sConnectionId = View.NO_ID;
// The last received accessibility event
- private static volatile AccessibilityEvent sLastFocusAccessibilityEvent;
+ private volatile AccessibilityEvent mLastAccessibilityEvent;
public InterrogationActivityTest() {
super(InterrogationActivity.class);
}
+ @Override
+ public void setUp() throws Exception {
+ ensureConnection();
+ bringUpActivityWithInitalizedAccessbility();
+ }
+
@LargeTest
public void testFindAccessibilityNodeInfoByViewId() throws Exception {
final long startTimeMillis = SystemClock.uptimeMillis();
try {
- // hook into the system first
- IAccessibilityServiceConnection connection = getConnection();
-
- // bring up the activity
- getActivity();
-
AccessibilityNodeInfo button = AccessibilityInteractionClient.getInstance()
- .findAccessibilityNodeInfoByViewIdInActiveWindow(connection, R.id.button5);
+ .findAccessibilityNodeInfoByViewIdInActiveWindow(sConnectionId, R.id.button5);
assertNotNull(button);
assertEquals(0, button.getChildCount());
@@ -120,15 +124,9 @@
public void testFindAccessibilityNodeInfoByViewText() throws Exception {
final long startTimeMillis = SystemClock.uptimeMillis();
try {
- // hook into the system first
- IAccessibilityServiceConnection connection = getConnection();
-
- // bring up the activity
- getActivity();
-
// find a view by text
List<AccessibilityNodeInfo> buttons = AccessibilityInteractionClient.getInstance()
- .findAccessibilityNodeInfosByTextInActiveWindow(connection, "butto");
+ .findAccessibilityNodeInfosByTextInActiveWindow(sConnectionId, "butto");
assertEquals(9, buttons.size());
} finally {
if (DEBUG) {
@@ -143,15 +141,11 @@
public void testFindAccessibilityNodeInfoByViewTextContentDescription() throws Exception {
final long startTimeMillis = SystemClock.uptimeMillis();
try {
- // hook into the system first
- IAccessibilityServiceConnection connection = getConnection();
-
- // bring up the activity
- getActivity();
+ bringUpActivityWithInitalizedAccessbility();
// find a view by text
List<AccessibilityNodeInfo> buttons = AccessibilityInteractionClient.getInstance()
- .findAccessibilityNodeInfosByTextInActiveWindow(connection,
+ .findAccessibilityNodeInfosByTextInActiveWindow(sConnectionId,
"contentDescription");
assertEquals(1, buttons.size());
} finally {
@@ -167,12 +161,6 @@
public void testTraverseAllViews() throws Exception {
final long startTimeMillis = SystemClock.uptimeMillis();
try {
- // hook into the system first
- IAccessibilityServiceConnection connection = getConnection();
-
- // bring up the activity
- getActivity();
-
// make list of expected nodes
List<String> classNameAndTextList = new ArrayList<String>();
classNameAndTextList.add("android.widget.LinearLayout");
@@ -190,7 +178,7 @@
classNameAndTextList.add("android.widget.ButtonButton9");
AccessibilityNodeInfo root = AccessibilityInteractionClient.getInstance()
- .findAccessibilityNodeInfoByViewIdInActiveWindow(connection, R.id.root);
+ .findAccessibilityNodeInfoByViewIdInActiveWindow(sConnectionId, R.id.root);
assertNotNull("We must find the existing root.", root);
Queue<AccessibilityNodeInfo> fringe = new LinkedList<AccessibilityNodeInfo>();
@@ -227,23 +215,17 @@
public void testPerformAccessibilityActionFocus() throws Exception {
final long startTimeMillis = SystemClock.uptimeMillis();
try {
- // hook into the system first
- IAccessibilityServiceConnection connection = getConnection();
-
- // bring up the activity
- getActivity();
-
// find a view and make sure it is not focused
AccessibilityNodeInfo button = AccessibilityInteractionClient.getInstance()
- .findAccessibilityNodeInfoByViewIdInActiveWindow(connection, R.id.button5);
+ .findAccessibilityNodeInfoByViewIdInActiveWindow(sConnectionId, R.id.button5);
assertFalse(button.isFocused());
// focus the view
assertTrue(button.performAction(ACTION_FOCUS));
// find the view again and make sure it is focused
- button = AccessibilityInteractionClient.getInstance()
- .findAccessibilityNodeInfoByViewIdInActiveWindow(connection, R.id.button5);
+ button = AccessibilityInteractionClient.getInstance()
+ .findAccessibilityNodeInfoByViewIdInActiveWindow(sConnectionId, R.id.button5);
assertTrue(button.isFocused());
} finally {
if (DEBUG) {
@@ -257,15 +239,9 @@
public void testPerformAccessibilityActionClearFocus() throws Exception {
final long startTimeMillis = SystemClock.uptimeMillis();
try {
- // hook into the system first
- IAccessibilityServiceConnection connection = getConnection();
-
- // bring up the activity
- getActivity();
-
// find a view and make sure it is not focused
AccessibilityNodeInfo button = AccessibilityInteractionClient.getInstance()
- .findAccessibilityNodeInfoByViewIdInActiveWindow(connection, R.id.button5);
+ .findAccessibilityNodeInfoByViewIdInActiveWindow(sConnectionId, R.id.button5);
assertFalse(button.isFocused());
// focus the view
@@ -273,7 +249,7 @@
// find the view again and make sure it is focused
button = AccessibilityInteractionClient.getInstance()
- .findAccessibilityNodeInfoByViewIdInActiveWindow(connection, R.id.button5);
+ .findAccessibilityNodeInfoByViewIdInActiveWindow(sConnectionId, R.id.button5);
assertTrue(button.isFocused());
// unfocus the view
@@ -281,7 +257,7 @@
// find the view again and make sure it is not focused
button = AccessibilityInteractionClient.getInstance()
- .findAccessibilityNodeInfoByViewIdInActiveWindow(connection, R.id.button5);
+ .findAccessibilityNodeInfoByViewIdInActiveWindow(sConnectionId, R.id.button5);
assertFalse(button.isFocused());
} finally {
if (DEBUG) {
@@ -296,15 +272,9 @@
public void testPerformAccessibilityActionSelect() throws Exception {
final long startTimeMillis = SystemClock.uptimeMillis();
try {
- // hook into the system first
- IAccessibilityServiceConnection connection = getConnection();
-
- // bring up the activity
- getActivity();
-
// find a view and make sure it is not selected
AccessibilityNodeInfo button = AccessibilityInteractionClient.getInstance()
- .findAccessibilityNodeInfoByViewIdInActiveWindow(connection, R.id.button5);
+ .findAccessibilityNodeInfoByViewIdInActiveWindow(sConnectionId, R.id.button5);
assertFalse(button.isSelected());
// select the view
@@ -312,7 +282,7 @@
// find the view again and make sure it is selected
button = AccessibilityInteractionClient.getInstance()
- .findAccessibilityNodeInfoByViewIdInActiveWindow(connection, R.id.button5);
+ .findAccessibilityNodeInfoByViewIdInActiveWindow(sConnectionId, R.id.button5);
assertTrue(button.isSelected());
} finally {
if (DEBUG) {
@@ -326,15 +296,9 @@
public void testPerformAccessibilityActionClearSelection() throws Exception {
final long startTimeMillis = SystemClock.uptimeMillis();
try {
- // hook into the system first
- IAccessibilityServiceConnection connection = getConnection();
-
- // bring up the activity
- getActivity();
-
// find a view and make sure it is not selected
AccessibilityNodeInfo button = AccessibilityInteractionClient.getInstance()
- .findAccessibilityNodeInfoByViewIdInActiveWindow(connection, R.id.button5);
+ .findAccessibilityNodeInfoByViewIdInActiveWindow(sConnectionId, R.id.button5);
assertFalse(button.isSelected());
// select the view
@@ -342,15 +306,15 @@
// find the view again and make sure it is selected
button = AccessibilityInteractionClient.getInstance()
- .findAccessibilityNodeInfoByViewIdInActiveWindow(connection, R.id.button5);
+ .findAccessibilityNodeInfoByViewIdInActiveWindow(sConnectionId, R.id.button5);
assertTrue(button.isSelected());
// unselect the view
assertTrue(button.performAction(ACTION_CLEAR_SELECTION));
// find the view again and make sure it is not selected
- button = AccessibilityInteractionClient.getInstance()
- .findAccessibilityNodeInfoByViewIdInActiveWindow(connection, R.id.button5);
+ button = AccessibilityInteractionClient.getInstance()
+ .findAccessibilityNodeInfoByViewIdInActiveWindow(sConnectionId, R.id.button5);
assertFalse(button.isSelected());
} finally {
if (DEBUG) {
@@ -365,30 +329,24 @@
public void testAccessibilityEventGetSource() throws Exception {
final long startTimeMillis = SystemClock.uptimeMillis();
try {
- // hook into the system first
- IAccessibilityServiceConnection connection = getConnection();
-
- // bring up the activity
- getActivity();
-
// find a view and make sure it is not focused
AccessibilityNodeInfo button = AccessibilityInteractionClient.getInstance()
- .findAccessibilityNodeInfoByViewIdInActiveWindow(connection, R.id.button5);
+ .findAccessibilityNodeInfoByViewIdInActiveWindow(sConnectionId, R.id.button5);
assertFalse(button.isSelected());
// focus the view
assertTrue(button.performAction(ACTION_FOCUS));
- synchronized (sConnection) {
+ synchronized (this) {
try {
- sConnection.wait(500);
+ wait(TIMEOUT_ACCESSIBLITY_STATE_INITIALIZED_MILLIS);
} catch (InterruptedException ie) {
/* ignore */
}
}
// check that last event source
- AccessibilityNodeInfo source = sLastFocusAccessibilityEvent.getSource();
+ AccessibilityNodeInfo source = mLastAccessibilityEvent.getSource();
assertNotNull(source);
// bounds
@@ -430,15 +388,9 @@
public void testObjectContract() throws Exception {
final long startTimeMillis = SystemClock.uptimeMillis();
try {
- // hook into the system first
- IAccessibilityServiceConnection connection = getConnection();
-
- // bring up the activity
- getActivity();
-
// find a view and make sure it is not focused
AccessibilityNodeInfo button = AccessibilityInteractionClient.getInstance()
- .findAccessibilityNodeInfoByViewIdInActiveWindow(connection, R.id.button5);
+ .findAccessibilityNodeInfoByViewIdInActiveWindow(sConnectionId, R.id.button5);
AccessibilityNodeInfo parent = button.getParent();
final int childCount = parent.getChildCount();
for (int i = 0; i < childCount; i++) {
@@ -459,24 +411,57 @@
}
}
- @Override
- protected void scrubClass(Class<?> testCaseClass) {
- /* intentionally do not scrub */
+ private void bringUpActivityWithInitalizedAccessbility() {
+ mLastAccessibilityEvent = null;
+ // bring up the activity
+ getActivity();
+
+ final long startTimeMillis = SystemClock.uptimeMillis();
+ while (true) {
+ if (mLastAccessibilityEvent != null) {
+ final int eventType = mLastAccessibilityEvent.getEventType();
+ if (eventType == AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED) {
+ return;
+ }
+ }
+ final long remainingTimeMillis = TIMEOUT_ACCESSIBLITY_STATE_INITIALIZED_MILLIS
+ - (SystemClock.uptimeMillis() - startTimeMillis);
+ if (remainingTimeMillis <= 0) {
+ return;
+ }
+ synchronized (this) {
+ try {
+ wait(remainingTimeMillis);
+ } catch (InterruptedException e) {
+ /* ignore */
+ }
+ }
+ }
}
- private IAccessibilityServiceConnection getConnection() throws Exception {
- if (sConnection == null) {
+ private void ensureConnection() throws Exception {
+ if (sConnectionId == View.NO_ID) {
IEventListener listener = new IEventListener.Stub() {
- public void setConnection(IAccessibilityServiceConnection connection) {}
+ public void setConnection(IAccessibilityServiceConnection connection,
+ int connectionId) {
+ sConnectionId = connectionId;
+ if (connection != null) {
+ AccessibilityInteractionClient.getInstance().addConnection(connectionId,
+ connection);
+ } else {
+ AccessibilityInteractionClient.getInstance().removeConnection(connectionId);
+ }
+ synchronized (this) {
+ notifyAll();
+ }
+ }
public void onInterrupt() {}
public void onAccessibilityEvent(AccessibilityEvent event) {
- if (event.getEventType() == AccessibilityEvent.TYPE_VIEW_FOCUSED) {
- sLastFocusAccessibilityEvent = AccessibilityEvent.obtain(event);
- }
- synchronized (sConnection) {
- sConnection.notifyAll();
+ mLastAccessibilityEvent = AccessibilityEvent.obtain(event);
+ synchronized (this) {
+ notifyAll();
}
}
};
@@ -485,28 +470,11 @@
AccessibilityManager.getInstance(getInstrumentation().getContext());
synchronized (this) {
- if (!accessibilityManager.isEnabled()) {
- // Make sure we wake ourselves as the desired state is propagated.
- accessibilityManager.addAccessibilityStateChangeListener(
- new AccessibilityManager.AccessibilityStateChangeListener() {
- public void onAccessibilityStateChanged(boolean enabled) {
- synchronized (this) {
- notifyAll();
- }
- }
- });
- IAccessibilityManager manager = IAccessibilityManager.Stub.asInterface(
+ IAccessibilityManager manager = IAccessibilityManager.Stub.asInterface(
ServiceManager.getService(Context.ACCESSIBILITY_SERVICE));
- sConnection = manager.registerEventListener(listener);
-
- wait(TIMEOUT_PROPAGATE_ACCESSIBLITY_SETTING);
- } else {
- IAccessibilityManager manager = IAccessibilityManager.Stub.asInterface(
- ServiceManager.getService(Context.ACCESSIBILITY_SERVICE));
- sConnection = manager.registerEventListener(listener);
- }
+ manager.registerEventListener(listener);
+ wait(TIMEOUT_PROPAGATE_ACCESSIBLITY_SETTING);
}
}
- return sConnection;
}
}
diff --git a/docs/html/guide/market/billing/billing_admin.jd b/docs/html/guide/market/billing/billing_admin.jd
index cbb4b29..a84eb4e 100755
--- a/docs/html/guide/market/billing/billing_admin.jd
+++ b/docs/html/guide/market/billing/billing_admin.jd
@@ -39,12 +39,12 @@
site, registering test accounts, and handling refunds when necessary.</p>
<p>You must have an Android Market publisher account to register test accounts. And you must have a
-Google Checkout Merchant account to create a product list and issue refunds to your users. If you
+Google Checkout merchant account to create a product list and issue refunds to your users. If you
already have a publisher account on Android Market, you can use your existing account. You do not
need to register for a new account to support in-app billing. If you do not have a publisher
account, you can register as an Android Market developer and set up a publisher account at the
Android Market <a href="http://market.android.com/publish">publisher site</a>. If you do not have a
-Google Checkout Merchant account, you can register for one at the <a
+Google Checkout merchant account, you can register for one at the <a
href="http://checkout.google.com">Google Checkout site</a>.</p>
<h2 id="billing-list-setup">Creating a Product List</h2>
@@ -57,7 +57,7 @@
<p>You can access an application's product list by clicking the <strong>In-App Products</strong>
link that appears under each of the applications that are listed for your publisher account (see
figure 1). The <strong>In-App Products</strong> link appears only if you have a Google Checkout
-Merchant account and an application's manifest includes the <code>com.android.vending.BILLING</code>
+merchant account and an application's manifest includes the <code>com.android.vending.BILLING</code>
permission.</p>
<img src="{@docRoot}images/billing_product_list_entry.png" height="548" id="figure1" />
@@ -71,20 +71,37 @@
you are selling in your application. It does not store any digital content. You are responsible for
storing and delivering the digital content that you sell in your applications.</p>
-<img src="{@docRoot}images/billing_product_list.png" height="560" id="figure2" />
+<img src="{@docRoot}images/billing_product_list.png" height="658" id="figure2" />
<p class="img-caption">
<strong>Figure 2.</strong> An application's product list.
</p>
-<p>You can create a product list for a published application or a draft application that's been
-uploaded and saved to the Android Market site. However, you must have a Google Checkout Merchant
+<p>You can create a product list for any published application or any draft application that's been
+uploaded and saved to the Android Market site. However, you must have a Google Checkout merchant
account and the application's manifest must include the <code>com.android.vending.BILLING</code>
permission. If an application's manifest does not include this permission, you will be able to edit
existing items in the product list but you will not be able to add new items to the list. For more
-information, see <a href="#billing-permission">Modifying your application's AndroidManifest.xml
-file</a>.</p>
+information about this permission, see
+<a href="{@docRoot}guide/market/billing/billing_integrate.html#billing-permission">Updating Your
+Application's Manifest</a>.</p>
-<p>To create a product list for an application, follow these steps:</p>
+<p>In addition, an application package can have only one product list. If you create a product
+list for an application, and you use the <a
+href="{@docRoot}guide/market/publishing/multiple-apks.html">multiple APK feature</a> to distribute
+more than one APK for that application, the product list applies to all APK versions that are
+associated with the application listing. You cannot create individual product lists for each APK if
+you are using the multiple APK feature.</p>
+
+<p>You can add items to a product list two ways: you can add items one at a time by using the In-app
+Products UI (see figure 3), or you can add a batch of items by importing the items from a
+comma-separated values (CSV) file (see figure 2). Adding items one at a time is useful if your
+application has only a few in-app items or you are adding only a few items to a
+product list for testing purposes. The CSV file method is useful if your application has a large
+number of in-app items.</p>
+
+<h3 id="billing-form-add">Adding items one at a time to a product list</h3>
+
+<p>To add an item to a product list using the In-app Products UI, follow these steps:</p>
<ol>
<li><a href="http://market.android.com/publish">Log in</a> to your publisher account.</li>
@@ -92,7 +109,7 @@
<strong>In-app Products</strong>.</li>
<li>On the In-app Products List page, click <strong>Add in-app product</strong>.</li>
<li>On the Create New In-app Product page (see figure 3), provide details about the item you are
- selling and then click <strong>Save</strong>.</li>
+ selling and then click <strong>Save</strong> or <strong>Publish</strong>.</li>
</ol>
<img src="{@docRoot}images/billing_list_form.png" height="840" id="figure3" />
@@ -109,25 +126,31 @@
(0-9), underlines (_), and dots (.). The product ID "android.test" is reserved, as are all
product IDs that start with "android.test."</p>
<p>In addition, you cannot modify an item's product ID after it is created, and you cannot reuse
- a product ID, even if you delete the item previously using the product ID.</p>
+ a product ID.</p>
</li>
- <li><strong>Purchase type</strong>
- <p>The purchase type can be "managed per user account" or "unmanaged." You can specify an item's
- purchase type only through the publisher site and you can never change an item's purchase type
- once you specify it. For more information, see <a href="#billing_purchase_type">Choosing a
- purchase type</a> later in this document.</p>
+ <li><strong>Purchase Type</strong>
+ <p>The purchase type can be <strong>Managed per user account</strong> or <strong>
+ Unmanaged</strong>. You can never change an item's purchase type after you set it. For more
+ information, see <a href="#billing-purchase-type">Choosing a purchase type</a> later in this
+ document.</p>
</li>
<li><strong>Publishing State</strong>
- <p>An item's publishing state can be "published" or "unpublished." However, to be visible to a
- user during checkout, an item's publishing state must be set to "published" and the item's
- application must be published on Android Market.</p>
+ <p>An item's publishing state can be <strong>Published</strong> or <strong>Unpublished
+ </strong>. To be visible to a user during checkout, an item's publishing state must be set to
+ <strong>Published</strong> and the item's application must be published on Android Market.</p>
<p class="note"><strong>Note:</strong> This is not true for test accounts. An item is visible to
a test account if the application is not published and the item is published. See <a
href="{@docRoot}guide/market/billing/billing_testing.html#billing-testing-real">Testing In-app
Billing</a> for more information.</p>
</li>
<li><strong>Language</strong>
- <p>A product list inherits its language from the parent application.</p>
+ <p>The language setting determines which languages are used to display the item title and
+ item description during checkout. A product list inherits its default language from the
+ parent application. You can add more languages by clicking <strong>add language</strong>. You
+ can also choose to have the title and description automatically translated from the default
+ language by selecting the <strong>Fill fields with auto translation</strong> checkbox (see
+ figure 4). If you do not use the auto translation feature, you must provide the translated
+ versions of the title and description.</p>
</li>
<li><strong>Title</strong>
<p>The title is a short descriptor for the item. For example, "Sleeping potion." Titles must be
@@ -141,9 +164,20 @@
visible to users during checkout. Descriptions can be up to 80 characters in length.</p>
</li>
<li><strong>Price</strong>
- <p>Every item must have a price greater than zero; you cannot set a price of "0" (free).</p>
+ <p>You must provide a default price in your home currency. You can also provide prices in other
+ currencies, but you can do this only if a currency's corresponding country is listed as a
+ target country for your application. You can specify target countries on the Edit Application
+ page in the Android Market developer console.</p>
+ <p>To specify prices in other currencies, you can manually enter the price for each
+ currency or you can click <strong>Auto Fill</strong> and let Android Market do a one-time
+ conversion from your home currency to the currencies you are targeting (see figure 4).</p>
</li>
</ul>
+<img src="{@docRoot}images/billing_list_form_2.png" height="1226" id="figure4" />
+<p class="img-caption">
+ <strong>Figure 4.</strong> Specifying additional currencies and additional languages for the
+ item title and description.
+</p>
<p>For more information about product IDs and product lists, see <a
href="http://market.android.com/support/bin/answer.py?answer=1072599">Creating In-App Product
@@ -154,6 +188,197 @@
<p class="note"><strong>Note</strong>: Be sure to plan your product ID namespace. You cannot reuse
or modify product IDs after you save them.</p>
+<h3 id="billing-bulk-add">Adding a batch of items to a product list</h3>
+
+<p>To add a batch of items to a product list using a CSV file, you first need to create your CSV
+file. The data values that you specify in the CSV file represent the same data values you specify
+manually through the In-app Products UI (see <a href="#billing-form-add">Adding items one at a time
+to a product list</a>). The CSV file uses commas (,) and semi-colons (;) to separate data values.
+Commas are used to separate primary data values, and semi-colons are used to separate subvalues. For
+example, the syntax for the CSV file is as follows:</p>
+
+<p>"<em>product_id</em>","<em>publish_state</em>","<em>purchase_type</em>","<em>autotranslate</em>
+","<em>locale</em>; <em>title</em>; <em>description</em>","<em>autofill</em>","<em>country</em>;
+<em>price</em>"
+</p>
+
+<p>Descriptions and usage details are provided below.</p>
+
+<ul>
+ <li><em>product_id</em>
+ <p>This is equivalent to the In-app Product ID setting in the In-app Products UI. If you specify
+ a <em>product_id</em> that already exists in a product list, and you choose to overwrite
+ the product list while importing the CSV file, the data for the existing item is overwritten with
+ the values specified in the CSV file. The overwrite feature does not delete items that are on a
+ product list but not present in the CSV file.</p>
+ </li>
+ <li><em>publish_state</em>
+ <p>This is equivalent to the Publishing State setting in the In-app Products UI. Can be <code>
+ published</code> or <code>unpublished</code>.</p>
+ </li>
+ <li><em>purchase_type</em>
+ <p>This is equivalent to the Purchase Type setting in the In-app Products UI. Can be <code>
+ managed_by_android</code>, which is equivalent to <strong>Managed per user account
+ </strong> in the In-app Products UI, or <code>managed_by_publisher</code>, which is equivalent
+ to <strong>Unmanaged</strong> in the In-app Products UI.</p>
+ </li>
+ <li><em>autotranslate</em>
+ <p>This is equivalent to selecting the <strong>Fill fields with auto translation</strong>
+ checkbox in the In-app Products UI. Can be <code>true</code> or <code>false</code>.</p>
+ </li>
+ <li><em>locale</em>
+ <p>This is equivalent to the Language setting in the In-app Products UI. You must have an entry
+ for the default locale. The default locale must be the first entry in the list of
+ locales, and it must include a <em>title</em> and <em>description</em>. If you want to provide
+ translated versions of the <em>title</em> and <em>description</em> in addition to the default,
+ you must use the following syntax rules:</p>
+ <p>If <em>autotranslate</em> is <code>true</code>, you must specify the default locale,
+ default title, default description, and other locales using the following format:</p>
+ <p>"true,"<em>default_locale</em>; <em>default_locale_title</em>;
+ <em>default_locale_description</em>; <em>locale_2</em>; <em>locale_3</em>, ..."</p>
+ <p>If <em>autotranslate</em> is <code>false</code>, you must specify the default locale,
+ default title, and default description as well as the translated titles and descriptions using
+ the following format:</p>
+ <p>"false,"<em>default_locale</em>; <em>default_locale_title</em>;
+ <em>default_locale_description</em>; <em>locale_2</em>; <em>locale_2_title</em>;
+ <em>local_2_description</em>; <em>locale_3</em>; <em>locale_3_title</em>;
+ <em>locale_3_description</em>; ..."</p>
+ <p>See table 1 for a list of the language codes you can use with the <em>locale</em> field.</p>
+ </li>
+ <li><em>title</em>
+ <p>This is equivalent to the Title setting in the In-app Products UI. If the <em>title</em>
+ contains a semicolon, it must be escaped with a backslash (for example, "\;"). A backslash
+ should also be escaped with a backslash (for example, "\\">.</p>
+ </li>
+ <li><em>description</em>
+ <p>This is equivalent to the Description in the In-app Products UI. If the <em>description</em>
+ contains a semicolon, it must be escaped with a backslash (for example, "\;"). A backslash
+ should also be escaped with a backslash (for example, "\\">.</p>
+ </li>
+ <li><em>autofill</em>
+ <p>This is equivalent to clicking <strong>Auto Fill</strong> in the In-app Products UI. Can be
+ <code>true</code> or <code>false</code>. The syntax for specifying the <em>country</em>
+ and <em>price</em> varies depending on which <em>autofill</em> setting you use.</p>
+ <p>If <em>autofill</em> is set to <code>true</code>, you need to specify only the default
+ price in your home currency and you must use this syntax:</p>
+ <p>"true","<em>default_price_in_home_currency</em>"
+ <p>If <em>autofill</em> is set to <code>false</code>, you need to specify a <em>country</em>
+ and a <em>price</em> for each currency and you must use the following syntax:</p>
+ <p>"false", "<em>home_country</em>; <em>default_price_in_home_currency</em>; <em>country_2</em>;
+ <em>country_2_price</em>; <em>country_3</em>; <em>country_3_price</em>; ..."</p>
+ </li>
+ <li><em>country</em>
+ <p>The country for which you are specifying a price. You can only list countries that your
+ application is targeting. The country codes are two-letter uppercase
+ ISO country codes (such as "US") as defined by
+ <a href="http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO 3166-2</a>.</p>
+ </li>
+ <li><em>price</em>
+ <p>This is equivalent to the Price in the In-app Products UI. The price must be specified in
+ micro-units. To convert a currency value to micro-units, you multiply the real value by 1,000,000.
+ For example, if you want to sell an in-app item for $1.99 you specify 1990000 in the
+ <em>price</em> field.</p>
+ </li>
+</ul>
+
+<p class="table-caption" id="language-table"><strong>Table 1.</strong> Language codes you can use
+with the <em>locale</em> field.</p>
+
+<table>
+
+<tr>
+<th>Language</th>
+<th>Code</th>
+<th>Language</th>
+<th>Code</th>
+</tr>
+<tr>
+<td>Chinese</td>
+<td>zh_TW</td>
+<td>Italian</td>
+<td>it_IT</td>
+</tr>
+<tr>
+<td>Czech</td>
+<td>cs_CZ</td>
+<td>Japanese</td>
+<td>ja_JP</td>
+</tr>
+<tr>
+<td>Danish</td>
+<td>da_DK</td>
+<td>Korean</td>
+<td>ko_KR</td>
+</tr>
+<tr>
+<td>Dutch</td>
+<td>nl_NL</td>
+<td>Norwegian</td>
+<td>no_NO</td>
+</tr>
+<tr>
+<td>English</td>
+<td>en_US</td>
+<td>Polish</td>
+<td>pl_PL</td>
+</tr>
+<tr>
+<td>French</td>
+<td>fr_FR</td>
+<td>Portuguese</td>
+<td>pt_PT</td>
+</tr>
+<tr>
+<td>Finnish</td>
+<td>fi_FI</td>
+<td>Russian</td>
+<td>ru_RU</td>
+</tr>
+<tr>
+<td>German</td>
+<td>de_DE</td>
+<td>Spanish</td>
+<td>es_ES</td>
+</tr>
+<tr>
+<td>Hebrew</td>
+<td>iw_IL</td>
+<td>Swedish</td>
+<td>sv_SE</td>
+</tr>
+<tr>
+<td>Hindi</td>
+<td>hi_IN</td>
+<td>--</td>
+<td>--</td>
+</tr>
+</table>
+
+<p>To import the items that are specified in your CSV file, do the following:</p>
+
+<ol>
+ <li><a href="http://market.android.com/publish">Log in</a> to your publisher account.</li>
+ <li>In the <strong>All Android Market listings</strong> panel, under the application name, click
+ <strong>In-app Products</strong>.</li>
+ <li>On the In-app Products List page, click <strong>Choose File</strong> and select your CSV
+file.
+ <p>The CSV file must be on your local computer or on a local disk that is connected to your
+ computer.</p>
+ </li>
+ <li>Select the <strong>Overwrite</strong> checkbox if you want to overwrite existing items in
+ your product list.
+ <p>This option overwrites values of existing items only if the value of the <em>product_id</em>
+ in the CSV file matches the In-app Product ID for an existing item in the product list.
+ Overwriting does not delete items that are on a product list but not present in the CSV
+ file.</p>
+ </li>
+ <li>On the In-app Products List page, click <strong>Import from CSV</strong>.</li>
+</ol>
+
+<p>You can also export an existing product list to a CSV file by clicking <strong>Export to CSV
+</strong> on the In-app Product List page. This is useful if you have manually added items to
+a product list and you want to start managing the product list through a CSV file.</p>
+
<h3 id="billing-purchase-type">Choosing a Purchase Type</h3>
<p>An item's purchase type controls how Android Market manages the purchase of the item. There are
@@ -194,7 +419,7 @@
<p>In-app billing does not allow users to send a refund request to Android Market. Refunds for
in-app purchases must be directed to you (the application developer). You can then process the
-refund through your Google Checkout Merchant account. When you do this, Android Market receives a
+refund through your Google Checkout merchant account. When you do this, Android Market receives a
refund notification from Google Checkout, and Android Market sends a refund message to your
application. For more information, see <a
href="{@docRoot}guide/market/billing/billing_overview.html#billing-action-notify">Handling
@@ -236,15 +461,15 @@
<li><a href="http://market.android.com/publish">Log in</a> to your publisher account.</li>
<li>On the upper left part of the page, under your name, click <strong>Edit profile</strong>.</li>
<li>On the Edit Profile page, scroll down to the Licensing & In-app Billing panel (see figure
- 4).</li>
+ 5).</li>
<li>In Test Accounts, add the email addresses for the test accounts you want to register,
separating each account with a comma.</li>
<li>Click <strong>Save</strong> to save your profile changes.</li>
</ol>
-<img src="{@docRoot}images/billing_public_key.png" height="510" id="figure4" />
+<img src="{@docRoot}images/billing_public_key.png" height="510" id="figure5" />
<p class="img-caption">
- <strong>Figure 4.</strong> The Licensing and In-app Billing panel of your account's Edit Profile
+ <strong>Figure 5.</strong> The Licensing and In-app Billing panel of your account's Edit Profile
page lets you register test accounts.
</p>
diff --git a/docs/html/guide/practices/ui_guidelines/widget_design.jd b/docs/html/guide/practices/ui_guidelines/widget_design.jd
index de20e00..f63f3c4 100644
--- a/docs/html/guide/practices/ui_guidelines/widget_design.jd
+++ b/docs/html/guide/practices/ui_guidelines/widget_design.jd
@@ -250,13 +250,15 @@
sizes, widget layouts must adapt to different Home screen grid cell sizes.</p>
<p>Below is an example layout that a music widget showing text information and two buttons can use.
-It builds upon the previous discussion of adding margins depending on OS version.</p>
+It builds upon the previous discussion of adding margins depending on OS version. Note that the
+most robust and resilient way to add margins to the widget is to wrap the widget frame and contents
+in a padded {@link android.widget.FrameLayout}.</p>
<pre>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:layout_margin="@dimen/widget_margin">
+ android:padding="@dimen/widget_margin">
<LinearLayout
android:layout_width="match_parent"
@@ -295,16 +297,16 @@
<p>When a user adds the widget to their home screen, on an example Android 4.0 device where each
-grid cell is 80dp × 100dp in size and 16dp of margins are automatically applied on all sizes,
+grid cell is 80dp × 100dp in size and 8dp of margins are automatically applied on all sizes,
the widget will be stretched, like so:</p>
<img src="{@docRoot}images/widget_design/music_example_stretched.png"
- alt="Music widget sitting on an example 80dp x 100dp grid with 16dp of automatic margins
+ alt="Music widget sitting on an example 80dp x 100dp grid with 8dp of automatic margins
added by the system" id="music_example_stretched">
<p class="img-caption"><strong>Figure 7.</strong> Music widget sitting on an example 80dp x 100dp
-grid with 16dp of automatic margins added by the system.</p>
+grid with 8dp of automatic margins added by the system.</p>
<h2 id="templates">Using the App Widget Templates Pack</h2>
diff --git a/docs/html/guide/topics/appwidgets/index.jd b/docs/html/guide/topics/appwidgets/index.jd
index 61337b7..2cb23c1 100644
--- a/docs/html/guide/topics/appwidgets/index.jd
+++ b/docs/html/guide/topics/appwidgets/index.jd
@@ -346,7 +346,7 @@
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
- <strong>android:layout_margin="@dimen/widget_margin"></strong>
+ <strong>android:padding="@dimen/widget_margin"></strong>
<LinearLayout
android:layout_width="match_parent"
@@ -363,7 +363,7 @@
<li>Create two dimensions resources, one in <code>res/values/</code> to provide the pre-Android 4.0 custom margins, and one in <code>res/values-v14/</code> to provide no extra padding for Android 4.0 widgets:
<p><strong>res/values/dimens.xml</strong>:<br>
- <pre><dimen name="widget_margin">15dp</dimen></pre></p>
+ <pre><dimen name="widget_margin">8dp</dimen></pre></p>
<p><strong>res/values-v14/dimens.xml</strong>:<br>
<pre><dimen name="widget_margin">0dp</dimen></pre></p>
diff --git a/docs/html/guide/topics/renderscript/index.jd b/docs/html/guide/topics/renderscript/index.jd
index eb77310..148705c 100644
--- a/docs/html/guide/topics/renderscript/index.jd
+++ b/docs/html/guide/topics/renderscript/index.jd
@@ -151,10 +151,9 @@
defining two-, three-, or four-vectors.</li>
</ul>
- <p>The <a href="{@docRoot}guide/topics/renderscript/rs-api/files.html">RenderScript header files</a>
- and LLVM front-end libraries are located in the <code>include</code> and
- <code>clang-include</code> directories in the
- <code><sdk_root>/platforms/android-11/renderscript</code> directory of the Android SDK. The
+ <p>The RenderScript header files and LLVM front-end libraries are located in the <code>include/</code> and
+ <code>clang-include/</code> directories in the
+ <code><sdk_root>/platforms/android-11/renderscript/</code> directory of the Android SDK. The
headers are automatically included for you, except for the RenderScript graphics specific header file, which
you can include as follows:</p>
<pre>
diff --git a/docs/html/images/billing_list_form_2.png b/docs/html/images/billing_list_form_2.png
new file mode 100755
index 0000000..d321a20
--- /dev/null
+++ b/docs/html/images/billing_list_form_2.png
Binary files differ
diff --git a/docs/html/images/billing_product_list.png b/docs/html/images/billing_product_list.png
index 49a7e79..a89f21b 100755
--- a/docs/html/images/billing_product_list.png
+++ b/docs/html/images/billing_product_list.png
Binary files differ
diff --git a/docs/html/resources/dashboard/opengl.jd b/docs/html/resources/dashboard/opengl.jd
index 07a0e43..4d0abec 100644
--- a/docs/html/resources/dashboard/opengl.jd
+++ b/docs/html/resources/dashboard/opengl.jd
@@ -57,7 +57,7 @@
<div class="dashboard-panel">
<img alt="" width="400" height="250"
-src="http://chart.googleapis.com/chart?cht=p&chs=400x250&chco=c4df9b,6fad0c&chl=GL%201.1|GL%202.0%20%26%201.1&chd=t%3A9.8,90.2" />
+src="http://chart.googleapis.com/chart?cht=p&chs=400x250&chco=c4df9b,6fad0c&chl=GL%201.1|GL%202.0%20%26%201.1&chd=t%3A10.1,89.9" />
<table>
<tr>
@@ -66,14 +66,14 @@
</tr>
<tr>
<td>1.1</th>
-<td>9.8%</td>
+<td>10.1%</td>
</tr>
<tr>
<td>2.0</th>
-<td>90.2%</td>
+<td>89.9%</td>
</tr>
</table>
-<p><em>Data collected during a 7-day period ending on November 3, 2011</em></p>
+<p><em>Data collected during a 7-day period ending on December 1, 2011</em></p>
</div>
diff --git a/docs/html/resources/dashboard/platform-versions.jd b/docs/html/resources/dashboard/platform-versions.jd
index 8041096..72370bb 100644
--- a/docs/html/resources/dashboard/platform-versions.jd
+++ b/docs/html/resources/dashboard/platform-versions.jd
@@ -52,7 +52,7 @@
<div class="dashboard-panel">
<img alt="" height="250" width="470"
-src="http://chart.apis.google.com/chart?&cht=p&chs=460x250&chd=t:0.9,1.4,10.7,40.7,0.5,43.9,0.1,0.9,0.9&chl=Android%201.5|Android%201.6|Android%202.1|Android%202.2|Android%202.3|Android%202.3.3|Android%203.0|Android%203.1|Android%203.2&chco=c4df9b,6fad0c" />
+src="http://chart.apis.google.com/chart?&cht=p&chs=460x250&chd=t:0.8,1.3,9.6,35.3,0.5,50.1,0.1,1.1,1.2&chl=Android%201.5|Android%201.6|Android%202.1|Android%202.2|Android%202.3|Android%202.3.3|Android%203.0|Android%203.1|Android%203.2&chco=c4df9b,6fad0c" />
<table>
<tr>
@@ -61,21 +61,21 @@
<th>API Level</th>
<th>Distribution</th>
</tr>
-<tr><td><a href="{@docRoot}sdk/android-1.5.html">Android 1.5</a></td><td>Cupcake</td> <td>3</td><td>0.9%</td></tr>
-<tr><td><a href="{@docRoot}sdk/android-1.6.html">Android 1.6</a></td><td>Donut</td> <td>4</td><td>1.4%</td></tr>
-<tr><td><a href="{@docRoot}sdk/android-2.1.html">Android 2.1</a></td><td>Eclair</td> <td>7</td><td>10.7%</td></tr>
-<tr><td><a href="{@docRoot}sdk/android-2.2.html">Android 2.2</a></td><td>Froyo</td> <td>8</td><td>40.7%</td></tr>
+<tr><td><a href="{@docRoot}sdk/android-1.5.html">Android 1.5</a></td><td>Cupcake</td> <td>3</td><td>0.8%</td></tr>
+<tr><td><a href="{@docRoot}sdk/android-1.6.html">Android 1.6</a></td><td>Donut</td> <td>4</td><td>1.3%</td></tr>
+<tr><td><a href="{@docRoot}sdk/android-2.1.html">Android 2.1</a></td><td>Eclair</td> <td>7</td><td>9.6%</td></tr>
+<tr><td><a href="{@docRoot}sdk/android-2.2.html">Android 2.2</a></td><td>Froyo</td> <td>8</td><td>35.3%</td></tr>
<tr><td><a href="{@docRoot}sdk/android-2.3.html">Android 2.3 -<br/>
Android 2.3.2</a></td><td rowspan="2">Gingerbread</td> <td>9</td><td>0.5%</td></tr>
<tr><td><a href="{@docRoot}sdk/android-2.3.3.html">Android 2.3.3 -<br/>
- Android 2.3.7</a></td><!-- Gingerbread --> <td>10</td><td>43.9%</td></tr>
+ Android 2.3.7</a></td><!-- Gingerbread --> <td>10</td><td>50.1%</td></tr>
<tr><td><a href="{@docRoot}sdk/android-3.0.html">Android 3.0</a></td>
<td rowspan="3">Honeycomb</td> <td>11</td><td>0.1%</td></tr>
-<tr><td><a href="{@docRoot}sdk/android-3.1.html">Android 3.1</a></td><!-- Honeycomb --><td>12</td><td>0.9%</td></tr>
-<tr><td><a href="{@docRoot}sdk/android-3.2.html">Android 3.2</a></td><!-- Honeycomb --><td>13</td><td>0.9%</td></tr>
+<tr><td><a href="{@docRoot}sdk/android-3.1.html">Android 3.1</a></td><!-- Honeycomb --><td>12</td><td>1.1%</td></tr>
+<tr><td><a href="{@docRoot}sdk/android-3.2.html">Android 3.2</a></td><!-- Honeycomb --><td>13</td><td>1.2%</td></tr>
</table>
-<p><em>Data collected during a 14-day period ending on November 3, 2011</em></p>
+<p><em>Data collected during a 14-day period ending on December 1, 2011</em></p>
<!--
<p style="font-size:.9em">* <em>Other: 0.1% of devices running obsolete versions</em></p>
-->
@@ -104,9 +104,9 @@
<div class="dashboard-panel">
<img alt="" height="250" width="660" style="padding:5px;background:#fff"
-src="http://chart.apis.google.com/chart?&cht=lc&chs=660x250&chxt=x,x,y,r&chxr=0,0,12|1,0,12|2,0,100|3,0,100&chxl=0%3A%7C05/01%7C05/15%7C06/01%7C06/15%7C07/01%7C07/15%7C08/01%7C08/15%7C09/01%7C09/15%7C10/01%7C10/15%7C11/01%7C1%3A%7C2011%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C2011%7C2%3A%7C0%25%7C25%25%7C50%25%7C75%25%7C100%25%7C3%3A%7C0%25%7C25%25%7C50%25%7C75%25%7C100%25&chxp=0,0,1,2,3,4,5,6,7,8,9,10,11,12&chxtc=0,5&chd=t:99.6,99.5,99.4,99.3,99.2,99.0,98.8,98.7,98.5,98.5,98.2,98.1,98.0|97.3,97.5,97.5,97.5,97.7,97.6,97.5,97.5,97.5,97.5,97.1,97.1,97.1|94.3,94.8,95.0,95.2,95.5,95.5,95.5,95.6,95.7,95.8,95.6,95.9,95.7|69.8,71.5,73.9,75.4,77.6,79.0,80.2,81.1,82.4,83.3,83.8,84.9,85.0|4.0,6.1,9.5,13.6,17.8,20.6,24.3,27.5,31.2,34.7,38.3,41.3,44.0|3.0,5.1,8.4,12.6,16.8,20.0,23.7,26.9,30.6,34.1,37.8,40.8,43.5&chm=b,c3df9b,0,1,0|b,b4db77,1,2,0|tAndroid 2.1,547a19,2,0,15,,t::-5|b,a5db51,2,3,0|tAndroid 2.2,3f5e0e,3,0,15,,t::-5|b,96dd28,3,4,0|b,83c916,4,5,0|tAndroid 2.3.3,131d02,5,3,15,,t::-5|B,6fad0c,5,6,0&chg=7,25&chdl=Android 1.5|Android 1.6|Android 2.1|Android 2.2|Android 2.3|Android 2.3.3&chco=add274,9dd14f,8ece2a,7ab61c,659b11,507d08" />
+src="http://chart.apis.google.com/chart?&cht=lc&chs=660x250&chxt=x,x,y,r&chxr=0,0,12|1,0,12|2,0,100|3,0,100&chxl=0%3A|06/01|06/15|07/01|07/15|08/01|08/15|09/01|09/15|10/01|10/15|11/01|11/15|12/01|1%3A|2011||||||||||||2011|2%3A|0%25|25%25|50%25|75%25|100%25|3%3A|0%25|25%25|50%25|75%25|100%25&chxp=0,0,1,2,3,4,5,6,7,8,9,10,11,12&chxtc=0,5&chd=t:99.4,99.3,99.2,99.0,98.8,98.7,98.5,98.5,98.2,98.1,98.0,99.9,99.9|97.5,97.5,97.7,97.6,97.5,97.5,97.5,97.5,97.1,97.1,97.0,99.1,99.1|95.0,95.2,95.5,95.5,95.5,95.6,95.7,95.8,95.6,95.9,95.7,97.7,97.8|73.9,75.4,77.6,79.0,80.2,81.1,82.4,83.3,83.8,84.9,85.1,87.5,88.2|9.5,13.6,17.8,20.6,24.3,27.5,31.2,34.7,38.3,41.3,44.0,48.9,52.9|8.4,12.6,16.8,20.0,23.7,26.9,30.6,34.1,37.8,40.8,43.5,48.4,52.4|0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,2.0,2.3|0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.0,1.2&chm=b,c3df9b,0,1,0|b,b8dc82,1,2,0|tAndroid%202.1,608920,2,0,15,,t::-5|b,addb67,2,3,0|tAndroid%202.2,517617,3,0,15,,t::-5|b,a3db4b,3,4,0|b,98dc2e,4,5,0|tAndroid%202.3.3,334d0a,5,1,15,,t::-5|b,8cd41b,5,6,0|b,7ec113,6,7,0|B,6fad0c,7,8,0&chg=7,25&chdl=Android%201.5|Android%201.6|Android%202.1|Android%202.2|Android%202.3|Android%202.3.3|Android%203.1|Android%203.2&chco=add274,a2d15a,97d13e,8bcb28,7dba1e,6ea715,5f920e,507d08" />
-<p><em>Last historical dataset collected during a 14-day period ending on November 3, 2011</em></p>
+<p><em>Last historical dataset collected during a 14-day period ending on December 1, 2011</em></p>
</div><!-- end dashboard-panel -->
diff --git a/docs/html/resources/dashboard/screens.jd b/docs/html/resources/dashboard/screens.jd
index ec3034d..79d59d9 100644
--- a/docs/html/resources/dashboard/screens.jd
+++ b/docs/html/resources/dashboard/screens.jd
@@ -60,7 +60,7 @@
<div class="dashboard-panel">
<img alt="" width="400" height="250"
-src="http://chart.googleapis.com/chart?cht=p&chs=400x250&chco=c4df9b,6fad0c&chl=Xlarge%20/%20mdpi|Large%20/%20ldpi|Large%20/%20mdpi|Normal%20/%20hdpi|Normal%20/%20ldpi|Normal%20/%20mdpi|Small%20/%20hdpi|Small%20/%20ldpi&chd=t%3A2.9,0.1,3.1,70.8,1.0,17.7,3.0,1.3" />
+src="http://chart.googleapis.com/chart?cht=p&chs=400x250&chco=c4df9b,6fad0c&chl=Xlarge%20/%20mdpi|Large%20/%20ldpi|Large%20/%20mdpi|Normal%20/%20hdpi|Normal%20/%20ldpi|Normal%20/%20mdpi|Small%20/%20hdpi|Small%20/%20ldpi&chd=t%3A3.1,0.1,3.1,71.0,1.0,17.5,2.9,1.3" />
<table>
<tr>
@@ -73,13 +73,13 @@
<tr><th scope="row">small</th>
<td>1.3%</td> <!-- small/ldpi -->
<td></td> <!-- small/mdpi -->
-<td>3.0%</td> <!-- small/hdpi -->
+<td>2.9%</td> <!-- small/hdpi -->
<td></td> <!-- small/xhdpi -->
</tr>
<tr><th scope="row">normal</th>
<td>1.0%</td> <!-- normal/ldpi -->
-<td>17.7%</td> <!-- normal/mdpi -->
-<td>70.8%</td> <!-- normal/hdpi -->
+<td>17.5%</td> <!-- normal/mdpi -->
+<td>71%</td> <!-- normal/hdpi -->
<td></td> <!-- normal/xhdpi -->
</tr>
<tr><th scope="row">large</th>
@@ -90,12 +90,12 @@
</tr>
<tr><th scope="row">xlarge</th>
<td></td> <!-- xlarge/ldpi -->
-<td>2.9%</td> <!-- xlarge/mdpi -->
+<td>3.1%</td> <!-- xlarge/mdpi -->
<td></td> <!-- xlarge/hdpi -->
<td></td> <!-- xlarge/xhdpi -->
</tr>
</table>
-<p><em>Data collected during a 7-day period ending on November 3, 2011</em></p>
+<p><em>Data collected during a 7-day period ending on December 1, 2011</em></p>
</div>
diff --git a/libs/binder/IPCThreadState.cpp b/libs/binder/IPCThreadState.cpp
index 6965702..641134a 100644
--- a/libs/binder/IPCThreadState.cpp
+++ b/libs/binder/IPCThreadState.cpp
@@ -773,6 +773,7 @@
bwr.read_buffer = (long unsigned int)mIn.data();
} else {
bwr.read_size = 0;
+ bwr.read_buffer = 0;
}
IF_LOG_COMMANDS() {
diff --git a/libs/hwui/DisplayListRenderer.cpp b/libs/hwui/DisplayListRenderer.cpp
index 3372d1c..ae7a3b5 100644
--- a/libs/hwui/DisplayListRenderer.cpp
+++ b/libs/hwui/DisplayListRenderer.cpp
@@ -477,8 +477,9 @@
float x = getFloat();
float y = getFloat();
SkPaint* paint = getPaint();
- LOGD("%s%s %s, %d, %d, %.2f, %.2f, %p", (char*) indent, OP_NAMES[op],
- text.text(), text.length(), count, x, y, paint);
+ float length = getFloat();
+ LOGD("%s%s %s, %d, %d, %.2f, %.2f, %p, %.2f", (char*) indent, OP_NAMES[op],
+ text.text(), text.length(), count, x, y, paint, length);
}
break;
case ResetShader: {
@@ -837,9 +838,10 @@
float x = getFloat();
float y = getFloat();
SkPaint* paint = getPaint();
- DISPLAY_LIST_LOGD("%s%s %s, %d, %d, %.2f, %.2f, %p", (char*) indent, OP_NAMES[op],
- text.text(), text.length(), count, x, y, paint);
- renderer.drawText(text.text(), text.length(), count, x, y, paint);
+ float length = getFloat();
+ DISPLAY_LIST_LOGD("%s%s %s, %d, %d, %.2f, %.2f, %p, %.2f", (char*) indent,
+ OP_NAMES[op], text.text(), text.length(), count, x, y, paint, length);
+ renderer.drawText(text.text(), text.length(), count, x, y, paint, length);
}
break;
case ResetShader: {
@@ -1196,13 +1198,14 @@
}
void DisplayListRenderer::drawText(const char* text, int bytesCount, int count,
- float x, float y, SkPaint* paint) {
+ float x, float y, SkPaint* paint, float length) {
if (count <= 0) return;
addOp(DisplayList::DrawText);
addText(text, bytesCount);
addInt(count);
addPoint(x, y);
addPaint(paint);
+ addFloat(length < 0.0f ? paint->measureText(text, bytesCount) : length);
}
void DisplayListRenderer::resetShader() {
diff --git a/libs/hwui/DisplayListRenderer.h b/libs/hwui/DisplayListRenderer.h
index ab475bf..ab483fb 100644
--- a/libs/hwui/DisplayListRenderer.h
+++ b/libs/hwui/DisplayListRenderer.h
@@ -290,7 +290,7 @@
virtual void drawLines(float* points, int count, SkPaint* paint);
virtual void drawPoints(float* points, int count, SkPaint* paint);
virtual void drawText(const char* text, int bytesCount, int count, float x, float y,
- SkPaint* paint);
+ SkPaint* paint, float length);
virtual void resetShader();
virtual void setupShader(SkiaShader* shader);
diff --git a/libs/hwui/Layer.h b/libs/hwui/Layer.h
index a8ae5c6..ee6ef1a 100644
--- a/libs/hwui/Layer.h
+++ b/libs/hwui/Layer.h
@@ -147,12 +147,12 @@
this->renderTarget = renderTarget;
}
- void setWrap(GLenum wrapS, GLenum wrapT, bool bindTexture = false, bool force = false) {
- texture.setWrap(wrapS, wrapT, bindTexture, force, renderTarget);
+ void setWrap(GLenum wrap, bool bindTexture = false, bool force = false) {
+ texture.setWrap(wrap, bindTexture, force, renderTarget);
}
- void setFilter(GLenum min, GLenum mag, bool bindTexture = false, bool force = false) {
- texture.setFilter(min, mag,bindTexture, force, renderTarget);
+ void setFilter(GLenum filter, bool bindTexture = false, bool force = false) {
+ texture.setFilter(filter, bindTexture, force, renderTarget);
}
inline bool isCacheable() {
diff --git a/libs/hwui/LayerRenderer.cpp b/libs/hwui/LayerRenderer.cpp
index e38b479..6bf6004 100644
--- a/libs/hwui/LayerRenderer.cpp
+++ b/libs/hwui/LayerRenderer.cpp
@@ -294,8 +294,8 @@
if (renderTarget != layer->getRenderTarget()) {
layer->setRenderTarget(renderTarget);
layer->bindTexture();
- layer->setFilter(GL_NEAREST, GL_NEAREST, false, true);
- layer->setWrap(GL_CLAMP_TO_EDGE, GL_CLAMP_TO_EDGE, false, true);
+ layer->setFilter(GL_NEAREST, false, true);
+ layer->setWrap(GL_CLAMP_TO_EDGE, false, true);
}
}
}
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index 718c131..a60ac08 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -47,6 +47,8 @@
// TODO: This should be set in properties
#define ALPHA_THRESHOLD (0x7f / PANEL_BIT_DEPTH)
+#define FILTER(paint) (paint && paint->isFilterBitmap() ? GL_LINEAR : GL_NEAREST)
+
///////////////////////////////////////////////////////////////////////////////
// Globals
///////////////////////////////////////////////////////////////////////////////
@@ -665,10 +667,10 @@
const float x = (int) floorf(rect.left + mSnapshot->transform->getTranslateX() + 0.5f);
const float y = (int) floorf(rect.top + mSnapshot->transform->getTranslateY() + 0.5f);
- layer->setFilter(GL_NEAREST, GL_NEAREST);
+ layer->setFilter(GL_NEAREST);
setupDrawModelView(x, y, x + rect.getWidth(), y + rect.getHeight(), true);
} else {
- layer->setFilter(GL_LINEAR, GL_LINEAR);
+ layer->setFilter(GL_LINEAR);
setupDrawModelView(rect.left, rect.top, rect.right, rect.bottom);
}
setupDrawTextureTransformUniforms(layer->getTexTransform());
@@ -702,9 +704,9 @@
y = (int) floorf(rect.top + mSnapshot->transform->getTranslateY() + 0.5f);
}
- layer->setFilter(GL_NEAREST, GL_NEAREST, true);
+ layer->setFilter(GL_NEAREST, true);
} else {
- layer->setFilter(GL_LINEAR, GL_LINEAR, true);
+ layer->setFilter(GL_LINEAR, true);
}
drawTextureMesh(x, y, x + rect.getWidth(), y + rect.getHeight(),
@@ -760,10 +762,10 @@
const float x = (int) floorf(rect.left + mSnapshot->transform->getTranslateX() + 0.5f);
const float y = (int) floorf(rect.top + mSnapshot->transform->getTranslateY() + 0.5f);
- layer->setFilter(GL_NEAREST, GL_NEAREST);
+ layer->setFilter(GL_NEAREST);
setupDrawModelViewTranslate(x, y, x + rect.getWidth(), y + rect.getHeight(), true);
} else {
- layer->setFilter(GL_LINEAR, GL_LINEAR);
+ layer->setFilter(GL_LINEAR);
setupDrawModelViewTranslate(rect.left, rect.top, rect.right, rect.bottom);
}
setupDrawMesh(&mesh[0].position[0], &mesh[0].texture[0]);
@@ -1320,6 +1322,8 @@
y = (int) floorf(top + mSnapshot->transform->getTranslateY() + 0.5f);
ignoreTransform = true;
filter = GL_NEAREST;
+ } else {
+ filter = FILTER(paint);
}
setupDraw();
@@ -1334,8 +1338,8 @@
setupDrawModelView(x, y, x + texture->width, y + texture->height, ignoreTransform);
setupDrawTexture(texture->id);
- texture->setWrap(GL_CLAMP_TO_EDGE, GL_CLAMP_TO_EDGE);
- texture->setFilter(filter, filter);
+ texture->setWrap(GL_CLAMP_TO_EDGE);
+ texture->setFilter(filter);
setupDrawPureColorUniforms();
setupDrawColorFilterUniforms();
@@ -1401,8 +1405,8 @@
if (!texture) return;
const AutoTexture autoCleanup(texture);
- texture->setWrap(GL_CLAMP_TO_EDGE, GL_CLAMP_TO_EDGE, true);
- texture->setFilter(GL_LINEAR, GL_LINEAR, true);
+ texture->setWrap(GL_CLAMP_TO_EDGE, true);
+ texture->setFilter(FILTER(paint), true);
int alpha;
SkXfermode::Mode mode;
@@ -1485,7 +1489,6 @@
Texture* texture = mCaches.textureCache.get(bitmap);
if (!texture) return;
const AutoTexture autoCleanup(texture);
- texture->setWrap(GL_CLAMP_TO_EDGE, GL_CLAMP_TO_EDGE, true);
const float width = texture->width;
const float height = texture->height;
@@ -1502,6 +1505,8 @@
SkXfermode::Mode mode;
getAlphaAndMode(paint, &alpha, &mode);
+ texture->setWrap(GL_CLAMP_TO_EDGE, true);
+
if (mSnapshot->transform->isPureTranslate()) {
const float x = (int) floorf(dstLeft + mSnapshot->transform->getTranslateX() + 0.5f);
const float y = (int) floorf(dstTop + mSnapshot->transform->getTranslateY() + 0.5f);
@@ -1509,17 +1514,16 @@
GLenum filter = GL_NEAREST;
// Enable linear filtering if the source rectangle is scaled
if (srcRight - srcLeft != dstRight - dstLeft || srcBottom - srcTop != dstBottom - dstTop) {
- filter = GL_LINEAR;
+ filter = FILTER(paint);
}
- texture->setFilter(filter, filter, true);
+ texture->setFilter(filter, true);
drawTextureMesh(x, y, x + (dstRight - dstLeft), y + (dstBottom - dstTop),
texture->id, alpha / 255.0f, mode, texture->blend,
&mMeshVertices[0].position[0], &mMeshVertices[0].texture[0],
GL_TRIANGLE_STRIP, gMeshCount, false, true);
} else {
- texture->setFilter(GL_LINEAR, GL_LINEAR, true);
-
+ texture->setFilter(FILTER(paint), true);
drawTextureMesh(dstLeft, dstTop, dstRight, dstBottom, texture->id, alpha / 255.0f,
mode, texture->blend, &mMeshVertices[0].position[0], &mMeshVertices[0].texture[0],
GL_TRIANGLE_STRIP, gMeshCount);
@@ -1539,8 +1543,8 @@
Texture* texture = mCaches.textureCache.get(bitmap);
if (!texture) return;
const AutoTexture autoCleanup(texture);
- texture->setWrap(GL_CLAMP_TO_EDGE, GL_CLAMP_TO_EDGE, true);
- texture->setFilter(GL_LINEAR, GL_LINEAR, true);
+ texture->setWrap(GL_CLAMP_TO_EDGE, true);
+ texture->setFilter(GL_LINEAR, true);
int alpha;
SkXfermode::Mode mode;
@@ -2059,7 +2063,7 @@
}
void OpenGLRenderer::drawText(const char* text, int bytesCount, int count,
- float x, float y, SkPaint* paint) {
+ float x, float y, SkPaint* paint, float length) {
if (text == NULL || count == 0) {
return;
}
@@ -2076,20 +2080,26 @@
paint->setTextEncoding(SkPaint::kGlyphID_TextEncoding);
#endif
- float length = -1.0f;
switch (paint->getTextAlign()) {
case SkPaint::kCenter_Align:
- length = paint->measureText(text, bytesCount);
+ if (length < 0.0f) length = paint->measureText(text, bytesCount);
x -= length / 2.0f;
break;
case SkPaint::kRight_Align:
- length = paint->measureText(text, bytesCount);
+ if (length < 0.0f) length = paint->measureText(text, bytesCount);
x -= length;
break;
default:
break;
}
+ SkPaint::FontMetrics metrics;
+ paint->getFontMetrics(&metrics, 0.0f);
+ if (quickReject(x, y + metrics.fTop,
+ x + (length >= 0.0f ? length : INT_MAX / 2), y + metrics.fBottom)) {
+ return;
+ }
+
const float oldX = x;
const float oldY = y;
const bool pureTranslate = mSnapshot->transform->isPureTranslate();
@@ -2250,11 +2260,11 @@
x = (int) floorf(x + mSnapshot->transform->getTranslateX() + 0.5f);
y = (int) floorf(y + mSnapshot->transform->getTranslateY() + 0.5f);
- layer->setFilter(GL_NEAREST, GL_NEAREST);
+ layer->setFilter(GL_NEAREST);
setupDrawModelViewTranslate(x, y,
x + layer->layer.getWidth(), y + layer->layer.getHeight(), true);
} else {
- layer->setFilter(GL_LINEAR, GL_LINEAR);
+ layer->setFilter(GL_LINEAR);
setupDrawModelViewTranslate(x, y,
x + layer->layer.getWidth(), y + layer->layer.getHeight());
}
@@ -2447,18 +2457,18 @@
SkXfermode::Mode mode;
getAlphaAndMode(paint, &alpha, &mode);
- texture->setWrap(GL_CLAMP_TO_EDGE, GL_CLAMP_TO_EDGE, true);
+ texture->setWrap(GL_CLAMP_TO_EDGE, true);
if (mSnapshot->transform->isPureTranslate()) {
const float x = (int) floorf(left + mSnapshot->transform->getTranslateX() + 0.5f);
const float y = (int) floorf(top + mSnapshot->transform->getTranslateY() + 0.5f);
- texture->setFilter(GL_NEAREST, GL_NEAREST, true);
+ texture->setFilter(GL_NEAREST, true);
drawTextureMesh(x, y, x + texture->width, y + texture->height, texture->id,
alpha / 255.0f, mode, texture->blend, (GLvoid*) NULL,
(GLvoid*) gMeshTextureOffset, GL_TRIANGLE_STRIP, gMeshCount, false, true);
} else {
- texture->setFilter(GL_LINEAR, GL_LINEAR, true);
+ texture->setFilter(FILTER(paint), true);
drawTextureMesh(left, top, right, bottom, texture->id, alpha / 255.0f, mode,
texture->blend, (GLvoid*) NULL, (GLvoid*) gMeshTextureOffset,
GL_TRIANGLE_STRIP, gMeshCount);
diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h
index 2fc88e1..cd9ff93 100644
--- a/libs/hwui/OpenGLRenderer.h
+++ b/libs/hwui/OpenGLRenderer.h
@@ -123,7 +123,7 @@
virtual void drawLines(float* points, int count, SkPaint* paint);
virtual void drawPoints(float* points, int count, SkPaint* paint);
virtual void drawText(const char* text, int bytesCount, int count, float x, float y,
- SkPaint* paint);
+ SkPaint* paint, float length = -1.0f);
virtual void resetShader();
virtual void setupShader(SkiaShader* shader);
diff --git a/libs/hwui/ShapeCache.h b/libs/hwui/ShapeCache.h
index 0660b69..8b88d30 100644
--- a/libs/hwui/ShapeCache.h
+++ b/libs/hwui/ShapeCache.h
@@ -584,8 +584,8 @@
glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, texture->width, texture->height, 0,
GL_ALPHA, GL_UNSIGNED_BYTE, bitmap.getPixels());
- texture->setFilter(GL_LINEAR, GL_LINEAR);
- texture->setWrap(GL_CLAMP_TO_EDGE, GL_CLAMP_TO_EDGE);
+ texture->setFilter(GL_LINEAR);
+ texture->setWrap(GL_CLAMP_TO_EDGE);
}
}; // namespace uirenderer
diff --git a/libs/hwui/SkiaShader.cpp b/libs/hwui/SkiaShader.cpp
index 2428295..32e7533 100644
--- a/libs/hwui/SkiaShader.cpp
+++ b/libs/hwui/SkiaShader.cpp
@@ -77,7 +77,7 @@
void SkiaShader::bindTexture(Texture* texture, GLenum wrapS, GLenum wrapT) {
glBindTexture(GL_TEXTURE_2D, texture->id);
- texture->setWrap(wrapS, wrapT);
+ texture->setWrapST(wrapS, wrapT);
}
void SkiaShader::computeScreenSpaceMatrix(mat4& screenSpace, const mat4& modelView) {
@@ -148,7 +148,7 @@
// ::updateTransforms() but we don't have the texture object
// available at that point. The optimization is not worth the
// effort for now.
- texture->setFilter(GL_LINEAR, GL_LINEAR);
+ texture->setFilter(GL_LINEAR);
glUniform1i(program->getUniform("bitmapSampler"), textureSlot);
glUniformMatrix4fv(program->getUniform("textureTransform"), 1,
diff --git a/libs/hwui/Texture.h b/libs/hwui/Texture.h
index 48229b6..a4aed07 100644
--- a/libs/hwui/Texture.h
+++ b/libs/hwui/Texture.h
@@ -40,7 +40,12 @@
firstWrap = true;
}
- void setWrap(GLenum wrapS, GLenum wrapT, bool bindTexture = false, bool force = false,
+ void setWrap(GLenum wrap, bool bindTexture = false, bool force = false,
+ GLenum renderTarget = GL_TEXTURE_2D) {
+ setWrapST(wrap, wrap, bindTexture, force, renderTarget);
+ }
+
+ void setWrapST(GLenum wrapS, GLenum wrapT, bool bindTexture = false, bool force = false,
GLenum renderTarget = GL_TEXTURE_2D) {
if (firstWrap || force || wrapS != this->wrapS || wrapT != this->wrapT) {
@@ -58,7 +63,12 @@
}
}
- void setFilter(GLenum min, GLenum mag, bool bindTexture = false, bool force = false,
+ void setFilter(GLenum filter, bool bindTexture = false, bool force = false,
+ GLenum renderTarget = GL_TEXTURE_2D) {
+ setFilterMinMag(filter, filter, bindTexture, force, renderTarget);
+ }
+
+ void setFilterMinMag(GLenum min, GLenum mag, bool bindTexture = false, bool force = false,
GLenum renderTarget = GL_TEXTURE_2D) {
if (firstFilter || force || min != minFilter || mag != magFilter) {
diff --git a/libs/hwui/TextureCache.cpp b/libs/hwui/TextureCache.cpp
index 018ce3e..711277a 100644
--- a/libs/hwui/TextureCache.cpp
+++ b/libs/hwui/TextureCache.cpp
@@ -217,11 +217,15 @@
texture->height = bitmap->height();
glBindTexture(GL_TEXTURE_2D, texture->id);
- glPixelStorei(GL_UNPACK_ALIGNMENT, bitmap->bytesPerPixel());
+ if (!regenerate) {
+ glPixelStorei(GL_UNPACK_ALIGNMENT, bitmap->bytesPerPixel());
+ }
switch (bitmap->getConfig()) {
case SkBitmap::kA8_Config:
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
+ if (!regenerate) {
+ glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
+ }
uploadToTexture(resize, GL_ALPHA, bitmap->rowBytesAsPixels(), texture->height,
GL_UNSIGNED_BYTE, bitmap->getPixels());
texture->blend = true;
@@ -248,8 +252,10 @@
break;
}
- texture->setFilter(GL_LINEAR, GL_LINEAR);
- texture->setWrap(GL_CLAMP_TO_EDGE, GL_CLAMP_TO_EDGE);
+ if (!regenerate) {
+ texture->setFilter(GL_NEAREST);
+ texture->setWrap(GL_CLAMP_TO_EDGE);
+ }
}
void TextureCache::uploadLoFiTexture(bool resize, SkBitmap* bitmap,
diff --git a/media/java/android/media/AudioManager.java b/media/java/android/media/AudioManager.java
index a0881a7..936ec0f 100644
--- a/media/java/android/media/AudioManager.java
+++ b/media/java/android/media/AudioManager.java
@@ -22,8 +22,6 @@
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
-import android.database.ContentObserver;
-import android.graphics.Bitmap;
import android.os.Binder;
import android.os.Handler;
import android.os.IBinder;
@@ -37,7 +35,6 @@
import android.view.KeyEvent;
import android.view.VolumePanel;
-import java.util.Iterator;
import java.util.HashMap;
/**
@@ -49,11 +46,9 @@
public class AudioManager {
private final Context mContext;
- private final Handler mHandler;
private long mVolumeKeyUpTime;
private int mVolumeControlStream = -1;
private static String TAG = "AudioManager";
- private static boolean localLOGV = false;
/**
* Broadcast intent, a hint for applications that audio is about to become
@@ -359,7 +354,6 @@
*/
public AudioManager(Context context) {
mContext = context;
- mHandler = new Handler(context.getMainLooper());
}
private static IAudioService getService()
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java
index f13a6a2..687e2f6 100644
--- a/media/java/android/media/AudioService.java
+++ b/media/java/android/media/AudioService.java
@@ -1572,49 +1572,83 @@
private BluetoothProfile.ServiceListener mBluetoothProfileServiceListener =
new BluetoothProfile.ServiceListener() {
public void onServiceConnected(int profile, BluetoothProfile proxy) {
- synchronized (mScoClients) {
- // Discard timeout message
- mAudioHandler.removeMessages(MSG_BT_HEADSET_CNCT_FAILED);
- mBluetoothHeadset = (BluetoothHeadset) proxy;
- List<BluetoothDevice> deviceList = mBluetoothHeadset.getConnectedDevices();
+ BluetoothDevice btDevice;
+ List<BluetoothDevice> deviceList;
+ switch(profile) {
+ case BluetoothProfile.A2DP:
+ BluetoothA2dp a2dp = (BluetoothA2dp) proxy;
+ deviceList = a2dp.getConnectedDevices();
if (deviceList.size() > 0) {
- mBluetoothHeadsetDevice = deviceList.get(0);
- } else {
- mBluetoothHeadsetDevice = null;
+ btDevice = deviceList.get(0);
+ handleA2dpConnectionStateChange(btDevice, a2dp.getConnectionState(btDevice));
}
- // Refresh SCO audio state
- checkScoAudioState();
- // Continue pending action if any
- if (mScoAudioState == SCO_STATE_ACTIVATE_REQ ||
- mScoAudioState == SCO_STATE_DEACTIVATE_REQ ||
- mScoAudioState == SCO_STATE_DEACTIVATE_EXT_REQ) {
- boolean status = false;
- if (mBluetoothHeadsetDevice != null) {
- switch (mScoAudioState) {
- case SCO_STATE_ACTIVATE_REQ:
- mScoAudioState = SCO_STATE_ACTIVE_INTERNAL;
- status = mBluetoothHeadset.startScoUsingVirtualVoiceCall(
- mBluetoothHeadsetDevice);
- break;
- case SCO_STATE_DEACTIVATE_REQ:
- status = mBluetoothHeadset.stopScoUsingVirtualVoiceCall(
- mBluetoothHeadsetDevice);
- break;
- case SCO_STATE_DEACTIVATE_EXT_REQ:
- status = mBluetoothHeadset.stopVoiceRecognition(
- mBluetoothHeadsetDevice);
+ break;
+
+ case BluetoothProfile.HEADSET:
+ synchronized (mScoClients) {
+ // Discard timeout message
+ mAudioHandler.removeMessages(MSG_BT_HEADSET_CNCT_FAILED);
+ mBluetoothHeadset = (BluetoothHeadset) proxy;
+ deviceList = mBluetoothHeadset.getConnectedDevices();
+ if (deviceList.size() > 0) {
+ mBluetoothHeadsetDevice = deviceList.get(0);
+ } else {
+ mBluetoothHeadsetDevice = null;
+ }
+ // Refresh SCO audio state
+ checkScoAudioState();
+ // Continue pending action if any
+ if (mScoAudioState == SCO_STATE_ACTIVATE_REQ ||
+ mScoAudioState == SCO_STATE_DEACTIVATE_REQ ||
+ mScoAudioState == SCO_STATE_DEACTIVATE_EXT_REQ) {
+ boolean status = false;
+ if (mBluetoothHeadsetDevice != null) {
+ switch (mScoAudioState) {
+ case SCO_STATE_ACTIVATE_REQ:
+ mScoAudioState = SCO_STATE_ACTIVE_INTERNAL;
+ status = mBluetoothHeadset.startScoUsingVirtualVoiceCall(
+ mBluetoothHeadsetDevice);
+ break;
+ case SCO_STATE_DEACTIVATE_REQ:
+ status = mBluetoothHeadset.stopScoUsingVirtualVoiceCall(
+ mBluetoothHeadsetDevice);
+ break;
+ case SCO_STATE_DEACTIVATE_EXT_REQ:
+ status = mBluetoothHeadset.stopVoiceRecognition(
+ mBluetoothHeadsetDevice);
+ }
+ }
+ if (!status) {
+ sendMsg(mAudioHandler, MSG_BT_HEADSET_CNCT_FAILED, 0,
+ SENDMSG_REPLACE, 0, 0, null, 0);
}
}
- if (!status) {
- sendMsg(mAudioHandler, MSG_BT_HEADSET_CNCT_FAILED, 0,
- SENDMSG_REPLACE, 0, 0, null, 0);
- }
}
+ break;
+
+ default:
+ break;
}
}
public void onServiceDisconnected(int profile) {
- synchronized (mScoClients) {
- mBluetoothHeadset = null;
+ switch(profile) {
+ case BluetoothProfile.A2DP:
+ synchronized (mConnectedDevices) {
+ if (mConnectedDevices.containsKey(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP)) {
+ makeA2dpDeviceUnavailableNow(
+ mConnectedDevices.get(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP));
+ }
+ }
+ break;
+
+ case BluetoothProfile.HEADSET:
+ synchronized (mScoClients) {
+ mBluetoothHeadset = null;
+ }
+ break;
+
+ default:
+ break;
}
}
};
@@ -2191,15 +2225,17 @@
AudioSystem.setParameters("restarting=true");
// Restore device connection states
- Set set = mConnectedDevices.entrySet();
- Iterator i = set.iterator();
- while(i.hasNext()){
- Map.Entry device = (Map.Entry)i.next();
- AudioSystem.setDeviceConnectionState(((Integer)device.getKey()).intValue(),
- AudioSystem.DEVICE_STATE_AVAILABLE,
- (String)device.getValue());
+ synchronized (mConnectedDevices) {
+ Set set = mConnectedDevices.entrySet();
+ Iterator i = set.iterator();
+ while(i.hasNext()){
+ Map.Entry device = (Map.Entry)i.next();
+ AudioSystem.setDeviceConnectionState(
+ ((Integer)device.getKey()).intValue(),
+ AudioSystem.DEVICE_STATE_AVAILABLE,
+ (String)device.getValue());
+ }
}
-
// Restore call state
AudioSystem.setPhoneState(mMode);
@@ -2238,7 +2274,9 @@
case MSG_BTA2DP_DOCK_TIMEOUT:
// msg.obj == address of BTA2DP device
- makeA2dpDeviceUnavailableNow( (String) msg.obj );
+ synchronized (mConnectedDevices) {
+ makeA2dpDeviceUnavailableNow( (String) msg.obj );
+ }
break;
case MSG_SET_FORCE_USE:
@@ -2298,6 +2336,7 @@
}
}
+ // must be called synchronized on mConnectedDevices
private void makeA2dpDeviceAvailable(String address) {
AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP,
AudioSystem.DEVICE_STATE_AVAILABLE,
@@ -2308,6 +2347,7 @@
address);
}
+ // must be called synchronized on mConnectedDevices
private void makeA2dpDeviceUnavailableNow(String address) {
Intent noisyIntent = new Intent(AudioManager.ACTION_AUDIO_BECOMING_NOISY);
mContext.sendBroadcast(noisyIntent);
@@ -2317,6 +2357,7 @@
mConnectedDevices.remove(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP);
}
+ // must be called synchronized on mConnectedDevices
private void makeA2dpDeviceUnavailableLater(String address) {
// prevent any activity on the A2DP audio output to avoid unwanted
// reconnection of the sink.
@@ -2329,14 +2370,60 @@
}
+ // must be called synchronized on mConnectedDevices
private void cancelA2dpDeviceTimeout() {
mAudioHandler.removeMessages(MSG_BTA2DP_DOCK_TIMEOUT);
}
+ // must be called synchronized on mConnectedDevices
private boolean hasScheduledA2dpDockTimeout() {
return mAudioHandler.hasMessages(MSG_BTA2DP_DOCK_TIMEOUT);
}
+ private void handleA2dpConnectionStateChange(BluetoothDevice btDevice, int state)
+ {
+ if (btDevice == null) {
+ return;
+ }
+ String address = btDevice.getAddress();
+ if (!BluetoothAdapter.checkBluetoothAddress(address)) {
+ address = "";
+ }
+ synchronized (mConnectedDevices) {
+ boolean isConnected =
+ (mConnectedDevices.containsKey(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP) &&
+ mConnectedDevices.get(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP).equals(address));
+
+ if (isConnected && state != BluetoothProfile.STATE_CONNECTED) {
+ if (btDevice.isBluetoothDock()) {
+ if (state == BluetoothProfile.STATE_DISCONNECTED) {
+ // introduction of a delay for transient disconnections of docks when
+ // power is rapidly turned off/on, this message will be canceled if
+ // we reconnect the dock under a preset delay
+ makeA2dpDeviceUnavailableLater(address);
+ // the next time isConnected is evaluated, it will be false for the dock
+ }
+ } else {
+ makeA2dpDeviceUnavailableNow(address);
+ }
+ } else if (!isConnected && state == BluetoothProfile.STATE_CONNECTED) {
+ if (btDevice.isBluetoothDock()) {
+ // this could be a reconnection after a transient disconnection
+ cancelA2dpDeviceTimeout();
+ mDockAddress = address;
+ } else {
+ // this could be a connection of another A2DP device before the timeout of
+ // a dock: cancel the dock timeout, and make the dock unavailable now
+ if(hasScheduledA2dpDockTimeout()) {
+ cancelA2dpDeviceTimeout();
+ makeA2dpDeviceUnavailableNow(mDockAddress);
+ }
+ }
+ makeA2dpDeviceAvailable(address);
+ }
+ }
+ }
+
/* cache of the address of the last dock the device was connected to */
private String mDockAddress;
@@ -2374,44 +2461,8 @@
int state = intent.getIntExtra(BluetoothProfile.EXTRA_STATE,
BluetoothProfile.STATE_DISCONNECTED);
BluetoothDevice btDevice = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
- if (btDevice == null) {
- return;
- }
- String address = btDevice.getAddress();
- if (!BluetoothAdapter.checkBluetoothAddress(address)) {
- address = "";
- }
- boolean isConnected =
- (mConnectedDevices.containsKey(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP) &&
- mConnectedDevices.get(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP).equals(address));
- if (isConnected && state != BluetoothProfile.STATE_CONNECTED) {
- if (btDevice.isBluetoothDock()) {
- if (state == BluetoothProfile.STATE_DISCONNECTED) {
- // introduction of a delay for transient disconnections of docks when
- // power is rapidly turned off/on, this message will be canceled if
- // we reconnect the dock under a preset delay
- makeA2dpDeviceUnavailableLater(address);
- // the next time isConnected is evaluated, it will be false for the dock
- }
- } else {
- makeA2dpDeviceUnavailableNow(address);
- }
- } else if (!isConnected && state == BluetoothProfile.STATE_CONNECTED) {
- if (btDevice.isBluetoothDock()) {
- // this could be a reconnection after a transient disconnection
- cancelA2dpDeviceTimeout();
- mDockAddress = address;
- } else {
- // this could be a connection of another A2DP device before the timeout of
- // a dock: cancel the dock timeout, and make the dock unavailable now
- if(hasScheduledA2dpDockTimeout()) {
- cancelA2dpDeviceTimeout();
- makeA2dpDeviceUnavailableNow(mDockAddress);
- }
- }
- makeA2dpDeviceAvailable(address);
- }
+ handleA2dpConnectionStateChange(btDevice, state);
} else if (action.equals(BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED)) {
int state = intent.getIntExtra(BluetoothProfile.EXTRA_STATE,
BluetoothProfile.STATE_DISCONNECTED);
@@ -2440,103 +2491,126 @@
if (!BluetoothAdapter.checkBluetoothAddress(address)) {
address = "";
}
- boolean isConnected = (mConnectedDevices.containsKey(device) &&
- mConnectedDevices.get(device).equals(address));
- synchronized (mScoClients) {
- if (isConnected && state != BluetoothProfile.STATE_CONNECTED) {
- AudioSystem.setDeviceConnectionState(device,
+ synchronized (mConnectedDevices) {
+ boolean isConnected = (mConnectedDevices.containsKey(device) &&
+ mConnectedDevices.get(device).equals(address));
+
+ synchronized (mScoClients) {
+ if (isConnected && state != BluetoothProfile.STATE_CONNECTED) {
+ AudioSystem.setDeviceConnectionState(device,
AudioSystem.DEVICE_STATE_UNAVAILABLE,
address);
- mConnectedDevices.remove(device);
- mBluetoothHeadsetDevice = null;
- resetBluetoothSco();
- } else if (!isConnected && state == BluetoothProfile.STATE_CONNECTED) {
- AudioSystem.setDeviceConnectionState(device,
- AudioSystem.DEVICE_STATE_AVAILABLE,
- address);
- mConnectedDevices.put(new Integer(device), address);
- mBluetoothHeadsetDevice = btDevice;
+ mConnectedDevices.remove(device);
+ mBluetoothHeadsetDevice = null;
+ resetBluetoothSco();
+ } else if (!isConnected && state == BluetoothProfile.STATE_CONNECTED) {
+ AudioSystem.setDeviceConnectionState(device,
+ AudioSystem.DEVICE_STATE_AVAILABLE,
+ address);
+ mConnectedDevices.put(new Integer(device), address);
+ mBluetoothHeadsetDevice = btDevice;
+ }
}
}
} else if (action.equals(Intent.ACTION_HEADSET_PLUG)) {
int state = intent.getIntExtra("state", 0);
int microphone = intent.getIntExtra("microphone", 0);
- if (microphone != 0) {
- boolean isConnected =
- mConnectedDevices.containsKey(AudioSystem.DEVICE_OUT_WIRED_HEADSET);
- if (state == 0 && isConnected) {
- AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_WIRED_HEADSET,
- AudioSystem.DEVICE_STATE_UNAVAILABLE,
- "");
- mConnectedDevices.remove(AudioSystem.DEVICE_OUT_WIRED_HEADSET);
- } else if (state == 1 && !isConnected) {
- AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_WIRED_HEADSET,
- AudioSystem.DEVICE_STATE_AVAILABLE,
- "");
- mConnectedDevices.put(
- new Integer(AudioSystem.DEVICE_OUT_WIRED_HEADSET), "");
- }
- } else {
- boolean isConnected =
- mConnectedDevices.containsKey(AudioSystem.DEVICE_OUT_WIRED_HEADPHONE);
- if (state == 0 && isConnected) {
- AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_WIRED_HEADPHONE,
- AudioSystem.DEVICE_STATE_UNAVAILABLE,
- "");
- mConnectedDevices.remove(AudioSystem.DEVICE_OUT_WIRED_HEADPHONE);
- } else if (state == 1 && !isConnected) {
- AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_WIRED_HEADPHONE,
- AudioSystem.DEVICE_STATE_AVAILABLE,
- "");
- mConnectedDevices.put(
- new Integer(AudioSystem.DEVICE_OUT_WIRED_HEADPHONE), "");
+ synchronized (mConnectedDevices) {
+ if (microphone != 0) {
+ boolean isConnected =
+ mConnectedDevices.containsKey(AudioSystem.DEVICE_OUT_WIRED_HEADSET);
+ if (state == 0 && isConnected) {
+ AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_WIRED_HEADSET,
+ AudioSystem.DEVICE_STATE_UNAVAILABLE,
+ "");
+ mConnectedDevices.remove(AudioSystem.DEVICE_OUT_WIRED_HEADSET);
+ } else if (state == 1 && !isConnected) {
+ AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_WIRED_HEADSET,
+ AudioSystem.DEVICE_STATE_AVAILABLE,
+ "");
+ mConnectedDevices.put(
+ new Integer(AudioSystem.DEVICE_OUT_WIRED_HEADSET), "");
+ }
+ } else {
+ boolean isConnected =
+ mConnectedDevices.containsKey(AudioSystem.DEVICE_OUT_WIRED_HEADPHONE);
+ if (state == 0 && isConnected) {
+ AudioSystem.setDeviceConnectionState(
+ AudioSystem.DEVICE_OUT_WIRED_HEADPHONE,
+ AudioSystem.DEVICE_STATE_UNAVAILABLE,
+ "");
+ mConnectedDevices.remove(AudioSystem.DEVICE_OUT_WIRED_HEADPHONE);
+ } else if (state == 1 && !isConnected) {
+ AudioSystem.setDeviceConnectionState(
+ AudioSystem.DEVICE_OUT_WIRED_HEADPHONE,
+ AudioSystem.DEVICE_STATE_AVAILABLE,
+ "");
+ mConnectedDevices.put(
+ new Integer(AudioSystem.DEVICE_OUT_WIRED_HEADPHONE), "");
+ }
}
}
} else if (action.equals(Intent.ACTION_USB_ANLG_HEADSET_PLUG)) {
int state = intent.getIntExtra("state", 0);
Log.v(TAG, "Broadcast Receiver: Got ACTION_USB_ANLG_HEADSET_PLUG, state = "+state);
- boolean isConnected =
- mConnectedDevices.containsKey(AudioSystem.DEVICE_OUT_ANLG_DOCK_HEADSET);
- if (state == 0 && isConnected) {
- AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_ANLG_DOCK_HEADSET,
- AudioSystem.DEVICE_STATE_UNAVAILABLE, "");
- mConnectedDevices.remove(AudioSystem.DEVICE_OUT_ANLG_DOCK_HEADSET);
- } else if (state == 1 && !isConnected) {
- AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_ANLG_DOCK_HEADSET,
- AudioSystem.DEVICE_STATE_AVAILABLE, "");
- mConnectedDevices.put(
- new Integer(AudioSystem.DEVICE_OUT_ANLG_DOCK_HEADSET), "");
+ synchronized (mConnectedDevices) {
+ boolean isConnected =
+ mConnectedDevices.containsKey(AudioSystem.DEVICE_OUT_ANLG_DOCK_HEADSET);
+ if (state == 0 && isConnected) {
+ AudioSystem.setDeviceConnectionState(
+ AudioSystem.DEVICE_OUT_ANLG_DOCK_HEADSET,
+ AudioSystem.DEVICE_STATE_UNAVAILABLE,
+ "");
+ mConnectedDevices.remove(AudioSystem.DEVICE_OUT_ANLG_DOCK_HEADSET);
+ } else if (state == 1 && !isConnected) {
+ AudioSystem.setDeviceConnectionState(
+ AudioSystem.DEVICE_OUT_ANLG_DOCK_HEADSET,
+ AudioSystem.DEVICE_STATE_AVAILABLE,
+ "");
+ mConnectedDevices.put(
+ new Integer(AudioSystem.DEVICE_OUT_ANLG_DOCK_HEADSET), "");
+ }
}
} else if (action.equals(Intent.ACTION_HDMI_AUDIO_PLUG)) {
int state = intent.getIntExtra("state", 0);
Log.v(TAG, "Broadcast Receiver: Got ACTION_HDMI_AUDIO_PLUG, state = "+state);
- boolean isConnected =
- mConnectedDevices.containsKey(AudioSystem.DEVICE_OUT_AUX_DIGITAL);
- if (state == 0 && isConnected) {
- AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_AUX_DIGITAL,
- AudioSystem.DEVICE_STATE_UNAVAILABLE, "");
- mConnectedDevices.remove(AudioSystem.DEVICE_OUT_AUX_DIGITAL);
- } else if (state == 1 && !isConnected) {
- AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_AUX_DIGITAL,
- AudioSystem.DEVICE_STATE_AVAILABLE, "");
- mConnectedDevices.put( new Integer(AudioSystem.DEVICE_OUT_AUX_DIGITAL), "");
+ synchronized (mConnectedDevices) {
+ boolean isConnected =
+ mConnectedDevices.containsKey(AudioSystem.DEVICE_OUT_AUX_DIGITAL);
+ if (state == 0 && isConnected) {
+ AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_AUX_DIGITAL,
+ AudioSystem.DEVICE_STATE_UNAVAILABLE,
+ "");
+ mConnectedDevices.remove(AudioSystem.DEVICE_OUT_AUX_DIGITAL);
+ } else if (state == 1 && !isConnected) {
+ AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_AUX_DIGITAL,
+ AudioSystem.DEVICE_STATE_AVAILABLE,
+ "");
+ mConnectedDevices.put( new Integer(AudioSystem.DEVICE_OUT_AUX_DIGITAL), "");
+ }
}
} else if (action.equals(Intent.ACTION_USB_DGTL_HEADSET_PLUG)) {
int state = intent.getIntExtra("state", 0);
Log.v(TAG, "Broadcast Receiver: Got ACTION_USB_DGTL_HEADSET_PLUG, state = "+state);
- boolean isConnected =
- mConnectedDevices.containsKey(AudioSystem.DEVICE_OUT_DGTL_DOCK_HEADSET);
- if (state == 0 && isConnected) {
- AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_DGTL_DOCK_HEADSET,
- AudioSystem.DEVICE_STATE_UNAVAILABLE, "");
- mConnectedDevices.remove(AudioSystem.DEVICE_OUT_DGTL_DOCK_HEADSET);
- } else if (state == 1 && !isConnected) {
- AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_DGTL_DOCK_HEADSET,
- AudioSystem.DEVICE_STATE_AVAILABLE, "");
- mConnectedDevices.put(
- new Integer(AudioSystem.DEVICE_OUT_DGTL_DOCK_HEADSET), "");
+ synchronized (mConnectedDevices) {
+ boolean isConnected =
+ mConnectedDevices.containsKey(AudioSystem.DEVICE_OUT_DGTL_DOCK_HEADSET);
+ if (state == 0 && isConnected) {
+ AudioSystem.setDeviceConnectionState(
+ AudioSystem.DEVICE_OUT_DGTL_DOCK_HEADSET,
+ AudioSystem.DEVICE_STATE_UNAVAILABLE,
+ "");
+ mConnectedDevices.remove(AudioSystem.DEVICE_OUT_DGTL_DOCK_HEADSET);
+ } else if (state == 1 && !isConnected) {
+ AudioSystem.setDeviceConnectionState(
+ AudioSystem.DEVICE_OUT_DGTL_DOCK_HEADSET,
+ AudioSystem.DEVICE_STATE_AVAILABLE,
+ "");
+ mConnectedDevices.put(
+ new Integer(AudioSystem.DEVICE_OUT_DGTL_DOCK_HEADSET), "");
+ }
}
} else if (action.equals(BluetoothHeadset.ACTION_AUDIO_STATE_CHANGED)) {
boolean broadcast = false;
@@ -2600,6 +2674,12 @@
newIntent.putExtra(AudioManager.EXTRA_SCO_AUDIO_STATE,
AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
mContext.sendStickyBroadcast(newIntent);
+
+ BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
+ if (adapter != null) {
+ adapter.getProfileProxy(mContext, mBluetoothProfileServiceListener,
+ BluetoothProfile.A2DP);
+ }
} else if (action.equals(Intent.ACTION_PACKAGE_REMOVED)) {
if (!intent.getBooleanExtra(Intent.EXTRA_REPLACING, false)) {
// a package is being removed, not replaced
@@ -3401,7 +3481,7 @@
updateRemoteControlDisplay_syncAfRcs(infoChangedFlags);
}
- /**
+ /**
* see AudioManager.registerMediaButtonIntent(PendingIntent pi, ComponentName c)
* precondition: mediaIntent != null, target != null
*/
@@ -3417,7 +3497,7 @@
}
}
- /**
+ /**
* see AudioManager.unregisterMediaButtonIntent(PendingIntent mediaIntent)
* precondition: mediaIntent != null, eventReceiver != null
*/
diff --git a/media/java/android/media/videoeditor/MediaArtistNativeHelper.java b/media/java/android/media/videoeditor/MediaArtistNativeHelper.java
index 03ae62a..4756078 100644
--- a/media/java/android/media/videoeditor/MediaArtistNativeHelper.java
+++ b/media/java/android/media/videoeditor/MediaArtistNativeHelper.java
@@ -1845,7 +1845,7 @@
@SuppressWarnings("unused")
private void onPreviewProgressUpdate(int progress, boolean isFinished,
- boolean updateOverlay, String filename, int renderingMode) {
+ boolean updateOverlay, String filename, int renderingMode, int error) {
if (mPreviewProgressListener != null) {
if (mIsFirstProgress) {
mPreviewProgressListener.onStart(mVideoEditor);
@@ -1870,6 +1870,8 @@
if (isFinished) {
mPreviewProgressListener.onStop(mVideoEditor);
+ } else if (error != 0) {
+ mPreviewProgressListener.onError(mVideoEditor, error);
} else {
mPreviewProgressListener.onProgress(mVideoEditor, progress, overlayData);
}
diff --git a/media/java/android/media/videoeditor/VideoEditor.java b/media/java/android/media/videoeditor/VideoEditor.java
index 424e436..08d27d4 100755
--- a/media/java/android/media/videoeditor/VideoEditor.java
+++ b/media/java/android/media/videoeditor/VideoEditor.java
@@ -107,6 +107,17 @@
* @param videoEditor The VideoEditor instance
*/
public void onStop(VideoEditor videoEditor);
+
+ /**
+ * This method notifies the listener when error has occurred during
+ * previewing a project.
+ *
+ * @param videoEditor The VideoEditor instance
+ * @param error The error that has occurred
+ * FIXME: We should pass well-defined error code to the application;
+ * but for now, we just pass whatever error code reported by the native layer.
+ */
+ public void onError(VideoEditor videoEditor, int error);
}
/**
diff --git a/media/java/android/mtp/MtpDatabase.java b/media/java/android/mtp/MtpDatabase.java
index 98617d2..19db1c0 100755
--- a/media/java/android/mtp/MtpDatabase.java
+++ b/media/java/android/mtp/MtpDatabase.java
@@ -51,7 +51,15 @@
private final IContentProvider mMediaProvider;
private final String mVolumeName;
private final Uri mObjectsUri;
- private final String mMediaStoragePath; // path to primary storage
+ // path to primary storage
+ private final String mMediaStoragePath;
+ // if not null, restrict all queries to these subdirectories
+ private final String[] mSubDirectories;
+ // where clause for restricting queries to files in mSubDirectories
+ private String mSubDirectoriesWhere;
+ // where arguments for restricting queries to files in mSubDirectories
+ private String[] mSubDirectoriesWhereArgs;
+
private final HashMap<String, MtpStorage> mStorageMap = new HashMap<String, MtpStorage>();
// cached property groups for single properties
@@ -112,7 +120,8 @@
System.loadLibrary("media_jni");
}
- public MtpDatabase(Context context, String volumeName, String storagePath) {
+ public MtpDatabase(Context context, String volumeName, String storagePath,
+ String[] subDirectories) {
native_setup();
mContext = context;
@@ -122,6 +131,31 @@
mObjectsUri = Files.getMtpObjectsUri(volumeName);
mMediaScanner = new MediaScanner(context);
+ mSubDirectories = subDirectories;
+ if (subDirectories != null) {
+ // Compute "where" string for restricting queries to subdirectories
+ StringBuilder builder = new StringBuilder();
+ builder.append("(");
+ int count = subDirectories.length;
+ for (int i = 0; i < count; i++) {
+ builder.append(Files.FileColumns.DATA + "=? OR "
+ + Files.FileColumns.DATA + " LIKE ?");
+ if (i != count - 1) {
+ builder.append(" OR ");
+ }
+ }
+ builder.append(")");
+ mSubDirectoriesWhere = builder.toString();
+
+ // Compute "where" arguments for restricting queries to subdirectories
+ mSubDirectoriesWhereArgs = new String[count * 2];
+ for (int i = 0, j = 0; i < count; i++) {
+ String path = subDirectories[i];
+ mSubDirectoriesWhereArgs[j++] = path;
+ mSubDirectoriesWhereArgs[j++] = path + "/%";
+ }
+ }
+
// Set locale to MediaScanner.
Locale locale = context.getResources().getConfiguration().locale;
if (locale != null) {
@@ -190,9 +224,44 @@
}
}
+ // check to see if the path is contained in one of our storage subdirectories
+ // returns true if we have no special subdirectories
+ private boolean inStorageSubDirectory(String path) {
+ if (mSubDirectories == null) return true;
+ if (path == null) return false;
+
+ boolean allowed = false;
+ int pathLength = path.length();
+ for (int i = 0; i < mSubDirectories.length && !allowed; i++) {
+ String subdir = mSubDirectories[i];
+ int subdirLength = subdir.length();
+ if (subdirLength < pathLength &&
+ path.charAt(subdirLength) == '/' &&
+ path.startsWith(subdir)) {
+ allowed = true;
+ }
+ }
+ return allowed;
+ }
+
+ // check to see if the path matches one of our storage subdirectories
+ // returns true if we have no special subdirectories
+ private boolean isStorageSubDirectory(String path) {
+ if (mSubDirectories == null) return false;
+ for (int i = 0; i < mSubDirectories.length; i++) {
+ if (path.equals(mSubDirectories[i])) {
+ return true;
+ }
+ }
+ return false;
+ }
+
private int beginSendObject(String path, int format, int parent,
int storageId, long size, long modified) {
- // first make sure the object does not exist
+ // if mSubDirectories is not null, do not allow copying files to any other locations
+ if (!inStorageSubDirectory(path)) return -1;
+
+ // make sure the object does not exist
if (path != null) {
Cursor c = null;
try {
@@ -269,33 +338,40 @@
}
private Cursor createObjectQuery(int storageID, int format, int parent) throws RemoteException {
+ String where;
+ String[] whereArgs;
+
if (storageID == 0xFFFFFFFF) {
// query all stores
if (format == 0) {
// query all formats
if (parent == 0) {
// query all objects
- return mMediaProvider.query(mObjectsUri, ID_PROJECTION, null, null, null);
+ where = null;
+ whereArgs = null;
+ } else {
+ if (parent == 0xFFFFFFFF) {
+ // all objects in root of store
+ parent = 0;
+ }
+ where = PARENT_WHERE;
+ whereArgs = new String[] { Integer.toString(parent) };
}
- if (parent == 0xFFFFFFFF) {
- // all objects in root of store
- parent = 0;
- }
- return mMediaProvider.query(mObjectsUri, ID_PROJECTION, PARENT_WHERE,
- new String[] { Integer.toString(parent) }, null);
} else {
// query specific format
if (parent == 0) {
// query all objects
- return mMediaProvider.query(mObjectsUri, ID_PROJECTION, FORMAT_WHERE,
- new String[] { Integer.toString(format) }, null);
+ where = FORMAT_WHERE;
+ whereArgs = new String[] { Integer.toString(format) };
+ } else {
+ if (parent == 0xFFFFFFFF) {
+ // all objects in root of store
+ parent = 0;
+ }
+ where = FORMAT_PARENT_WHERE;
+ whereArgs = new String[] { Integer.toString(format),
+ Integer.toString(parent) };
}
- if (parent == 0xFFFFFFFF) {
- // all objects in root of store
- parent = 0;
- }
- return mMediaProvider.query(mObjectsUri, ID_PROJECTION, FORMAT_PARENT_WHERE,
- new String[] { Integer.toString(format), Integer.toString(parent) }, null);
}
} else {
// query specific store
@@ -303,35 +379,61 @@
// query all formats
if (parent == 0) {
// query all objects
- return mMediaProvider.query(mObjectsUri, ID_PROJECTION, STORAGE_WHERE,
- new String[] { Integer.toString(storageID) }, null);
+ where = STORAGE_WHERE;
+ whereArgs = new String[] { Integer.toString(storageID) };
+ } else {
+ if (parent == 0xFFFFFFFF) {
+ // all objects in root of store
+ parent = 0;
+ }
+ where = STORAGE_PARENT_WHERE;
+ whereArgs = new String[] { Integer.toString(storageID),
+ Integer.toString(parent) };
}
- if (parent == 0xFFFFFFFF) {
- // all objects in root of store
- parent = 0;
- }
- return mMediaProvider.query(mObjectsUri, ID_PROJECTION, STORAGE_PARENT_WHERE,
- new String[] { Integer.toString(storageID), Integer.toString(parent) },
- null);
} else {
// query specific format
if (parent == 0) {
// query all objects
- return mMediaProvider.query(mObjectsUri, ID_PROJECTION, STORAGE_FORMAT_WHERE,
- new String[] { Integer.toString(storageID), Integer.toString(format) },
- null);
+ where = STORAGE_FORMAT_WHERE;
+ whereArgs = new String[] { Integer.toString(storageID),
+ Integer.toString(format) };
+ } else {
+ if (parent == 0xFFFFFFFF) {
+ // all objects in root of store
+ parent = 0;
+ }
+ where = STORAGE_FORMAT_PARENT_WHERE;
+ whereArgs = new String[] { Integer.toString(storageID),
+ Integer.toString(format),
+ Integer.toString(parent) };
}
- if (parent == 0xFFFFFFFF) {
- // all objects in root of store
- parent = 0;
- }
- return mMediaProvider.query(mObjectsUri, ID_PROJECTION, STORAGE_FORMAT_PARENT_WHERE,
- new String[] { Integer.toString(storageID),
- Integer.toString(format),
- Integer.toString(parent) },
- null);
}
}
+
+ // if we are restricting queries to mSubDirectories, we need to add the restriction
+ // onto our "where" arguments
+ if (mSubDirectoriesWhere != null) {
+ if (where == null) {
+ where = mSubDirectoriesWhere;
+ whereArgs = mSubDirectoriesWhereArgs;
+ } else {
+ where = where + " AND " + mSubDirectoriesWhere;
+
+ // create new array to hold whereArgs and mSubDirectoriesWhereArgs
+ String[] newWhereArgs =
+ new String[whereArgs.length + mSubDirectoriesWhereArgs.length];
+ int i, j;
+ for (i = 0; i < whereArgs.length; i++) {
+ newWhereArgs[i] = whereArgs[i];
+ }
+ for (j = 0; j < mSubDirectoriesWhereArgs.length; i++, j++) {
+ newWhereArgs[i] = mSubDirectoriesWhereArgs[j];
+ }
+ whereArgs = newWhereArgs;
+ }
+ }
+
+ return mMediaProvider.query(mObjectsUri, ID_PROJECTION, where, whereArgs, null);
}
private int[] getObjectList(int storageID, int format, int parent) {
@@ -613,6 +715,11 @@
return MtpConstants.RESPONSE_INVALID_OBJECT_HANDLE;
}
+ // do not allow renaming any of the special subdirectories
+ if (isStorageSubDirectory(path)) {
+ return MtpConstants.RESPONSE_OBJECT_WRITE_PROTECTED;
+ }
+
// now rename the file. make sure this succeeds before updating database
File oldFile = new File(path);
int lastSlash = path.lastIndexOf('/');
@@ -794,6 +901,11 @@
return MtpConstants.RESPONSE_GENERAL_ERROR;
}
+ // do not allow deleting any of the special subdirectories
+ if (isStorageSubDirectory(path)) {
+ return MtpConstants.RESPONSE_OBJECT_WRITE_PROTECTED;
+ }
+
if (format == MtpConstants.FORMAT_ASSOCIATION) {
// recursive case - delete all children first
Uri uri = Files.getMtpObjectsUri(mVolumeName);
diff --git a/media/jni/mediaeditor/VideoEditorMain.cpp b/media/jni/mediaeditor/VideoEditorMain.cpp
index d8f1587..7083a91c 100755
--- a/media/jni/mediaeditor/VideoEditorMain.cpp
+++ b/media/jni/mediaeditor/VideoEditorMain.cpp
@@ -477,7 +477,7 @@
pEnv->CallVoidMethod(pContext->engine,
pContext->onPreviewProgressUpdateMethodId,
currentMs,isFinished, pContext->mIsUpdateOverlay,
- tmpFileName, pContext->mOverlayRenderingMode);
+ tmpFileName, pContext->mOverlayRenderingMode, error);
if (pContext->mIsUpdateOverlay) {
pContext->mIsUpdateOverlay = false;
@@ -1630,7 +1630,7 @@
"not initialized");
pContext->onPreviewProgressUpdateMethodId = pEnv->GetMethodID(engineClass,
- "onPreviewProgressUpdate", "(IZZLjava/lang/String;I)V");
+ "onPreviewProgressUpdate", "(IZZLjava/lang/String;II)V");
// Check if the context is valid (required because the context is dereferenced).
if (needToBeLoaded) {
// Make sure that we are in a correct state.
diff --git a/media/libstagefright/AVIExtractor.cpp b/media/libstagefright/AVIExtractor.cpp
index 058d10c..142fa5b 100644
--- a/media/libstagefright/AVIExtractor.cpp
+++ b/media/libstagefright/AVIExtractor.cpp
@@ -1094,7 +1094,7 @@
CHECK(meta->findData(kKeyAVCC, &type, &csd, &csdSize));
track->mMeta->setInt32(kKeyWidth, width);
- track->mMeta->setInt32(kKeyHeight, width);
+ track->mMeta->setInt32(kKeyHeight, height);
track->mMeta->setData(kKeyAVCC, type, csd, csdSize);
return OK;
diff --git a/media/mtp/MtpDataPacket.cpp b/media/mtp/MtpDataPacket.cpp
index 20225ba..cfea7e8 100644
--- a/media/mtp/MtpDataPacket.cpp
+++ b/media/mtp/MtpDataPacket.cpp
@@ -25,10 +25,12 @@
#include "MtpDataPacket.h"
#include "MtpStringBuffer.h"
+#define MTP_BUFFER_SIZE 16384
+
namespace android {
MtpDataPacket::MtpDataPacket()
- : MtpPacket(16384), // MAX_USBFS_BUFFER_SIZE
+ : MtpPacket(MTP_BUFFER_SIZE), // MAX_USBFS_BUFFER_SIZE
mOffset(MTP_CONTAINER_HEADER_SIZE)
{
}
@@ -345,7 +347,7 @@
#ifdef MTP_DEVICE
int MtpDataPacket::read(int fd) {
- int ret = ::read(fd, mBuffer, mBufferSize);
+ int ret = ::read(fd, mBuffer, MTP_BUFFER_SIZE);
if (ret < MTP_CONTAINER_HEADER_SIZE)
return -1;
mPacketSize = ret;
diff --git a/media/mtp/MtpServer.cpp b/media/mtp/MtpServer.cpp
index 51eb97f..1334e6c 100644
--- a/media/mtp/MtpServer.cpp
+++ b/media/mtp/MtpServer.cpp
@@ -1053,11 +1053,14 @@
int result = mDatabase->getObjectFilePath(handle, filePath, fileLength, format);
if (result == MTP_RESPONSE_OK) {
ALOGV("deleting %s", (const char *)filePath);
- deletePath((const char *)filePath);
- return mDatabase->deleteFile(handle);
- } else {
- return result;
+ result = mDatabase->deleteFile(handle);
+ // Don't delete the actual files unless the database deletion is allowed
+ if (result == MTP_RESPONSE_OK) {
+ deletePath((const char *)filePath);
+ }
}
+
+ return result;
}
MtpResponseCode MtpServer::doGetObjectPropDesc() {
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/videoeditor/VideoEditorPreviewTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/videoeditor/VideoEditorPreviewTest.java
index e848f5f..3c08138 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/videoeditor/VideoEditorPreviewTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/videoeditor/VideoEditorPreviewTest.java
@@ -93,6 +93,7 @@
private boolean previewStart;
private boolean previewStop;
+ private boolean previewError;
/* Minimum waiting time for Semaphore to wait for release */
private final long minWaitingTime = 3000;
@@ -141,7 +142,9 @@
protected void setPreviewStop() {
previewStop = true;
}
-
+ protected void setPreviewError() {
+ previewError = true;
+ }
protected void validatePreviewProgress(int startMs, int endMs,
boolean loop, long duration) throws Exception {
@@ -149,6 +152,7 @@
final Semaphore blockTillPreviewCompletes = new Semaphore(1);
previewStart = false;
previewStop = false;
+ previewError = false;
mVideoEditor.generatePreview(new MediaProcessingProgressListener() {
int i = 0;
public void onProgress(Object item, int action, int progress) {
@@ -187,6 +191,10 @@
setPreviewStop();
blockTillPreviewCompletes.release();
}
+ public void onError(VideoEditor videoEditor, int error) {
+ setPreviewError();
+ blockTillPreviewCompletes.release();
+ }
});
} catch (Exception e) {
blockTillPreviewCompletes.release();
@@ -196,6 +204,7 @@
mVideoEditor.stopPreview();
assertTrue("Preview Failed to start", previewStart);
assertTrue("Preview Failed to stop", previewStop);
+ assertFalse("Preview Error occurred", previewError);
blockTillPreviewCompletes.release();
}
@@ -399,6 +408,7 @@
"TransitionSpiral_QVGA.jpg";
previewStart = false;
previewStop = false;
+ previewError = false;
final Semaphore blockTillPreviewCompletes = new Semaphore(1);
@@ -490,6 +500,10 @@
setPreviewStop();
blockTillPreviewCompletes.release();
}
+ public void onError(VideoEditor videoEditor, int error) {
+ setPreviewError();
+ blockTillPreviewCompletes.release();
+ }
});
} catch (Exception e) {
blockTillPreviewCompletes.release();
@@ -499,6 +513,7 @@
blockTillPreviewCompletes.release();
assertTrue("Preview Failed to start", previewStart);
assertTrue("Preview Failed to stop", previewStop);
+ assertFalse("Preview Error occurred", previewError);
assertEquals("Removing Transition " + transition1And2CrossFade.getId(),
transition1And2CrossFade,
@@ -677,6 +692,7 @@
final Semaphore blockTillPreviewCompletes = new Semaphore(1);
previewStart = false;
previewStop = false;
+ previewError = false;
final MediaVideoItem mediaVideoItem1 =
mVideoEditorHelper.createMediaItem(mVideoEditor, "m1",
@@ -727,6 +743,10 @@
setPreviewStop();
blockTillPreviewCompletes.release();
}
+ public void onError(VideoEditor videoEditor, int error) {
+ setPreviewError();
+ blockTillPreviewCompletes.release();
+ }
});
} catch (Exception e) {
@@ -736,6 +756,8 @@
mVideoEditor.stopPreview();
assertTrue("Preview Failed to start", previewStart);
assertTrue("Preview Failed to stop", previewStop);
+ assertFalse("Preview Error occurred", previewError);
+
blockTillPreviewCompletes.release();
}
@@ -784,6 +806,10 @@
setPreviewStop();
blockTillPreviewCompletes.release();
}
+ public void onError(VideoEditor videoEditor, int error) {
+ setPreviewError();
+ blockTillPreviewCompletes.release();
+ }
});
} catch (IllegalArgumentException e) {
@@ -1023,7 +1049,10 @@
}
public void onStop(VideoEditor videoEditor) {
setPreviewStop();
- }
+ }
+ public void onError(VideoEditor videoEditor, int error) {
+ setPreviewError();
+ }
});
}catch (IllegalArgumentException e) {
flagForException = true;
@@ -1089,7 +1118,10 @@
}
public void onStop(VideoEditor videoEditor) {
setPreviewStop();
- }
+ }
+ public void onError(VideoEditor videoEditor, int error) {
+ setPreviewError();
+ }
});
}catch (IllegalArgumentException e) {
flagForException = true;
diff --git a/media/tests/README.txt b/media/tests/README.txt
new file mode 100644
index 0000000..e3e1639
--- /dev/null
+++ b/media/tests/README.txt
@@ -0,0 +1,10 @@
+MediaFrameworkTest/
+ Uses instrumentation and so can be run with runtest.
+ It assumes /sdcard/media_api/ has been populated.
+
+contents/media_api/
+ Push to /sdcard/media_api/ for use with MediaFrameworkTest:
+ adb shell mkdir /sdcard/media_api
+ adb push contents/media_api/ /sdcard/media_api/
+
+All other subdirectories are manual tests or sample apps.
diff --git a/opengl/libs/Android.mk b/opengl/libs/Android.mk
index 9c1a10e..66bc64d 100644
--- a/opengl/libs/Android.mk
+++ b/opengl/libs/Android.mk
@@ -18,7 +18,7 @@
EGL/Loader.cpp \
#
-LOCAL_SHARED_LIBRARIES += libcutils libutils libGLESv2_dbg
+LOCAL_SHARED_LIBRARIES += libcutils libutils libGLES_trace
LOCAL_LDLIBS := -lpthread -ldl
LOCAL_MODULE:= libEGL
LOCAL_LDFLAGS += -Wl,--exclude-libs=ALL
diff --git a/opengl/libs/EGL/Loader.cpp b/opengl/libs/EGL/Loader.cpp
index 325193c..8a8898b 100644
--- a/opengl/libs/EGL/Loader.cpp
+++ b/opengl/libs/EGL/Loader.cpp
@@ -28,7 +28,7 @@
#include <EGL/egl.h>
#include "egldefs.h"
-#include "glesv2dbg.h"
+#include "glestrace.h"
#include "hooks.h"
#include "Loader.h"
@@ -157,7 +157,7 @@
Loader::~Loader()
{
- StopDebugServer();
+ GLTrace_stop();
}
const char* Loader::getTag(int dpy, int impl)
diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp
index 6ad06af..14745b3 100644
--- a/opengl/libs/EGL/egl.cpp
+++ b/opengl/libs/EGL/egl.cpp
@@ -37,7 +37,7 @@
#include "egldefs.h"
#include "egl_impl.h"
#include "egl_tls.h"
-#include "glesv2dbg.h"
+#include "glestrace.h"
#include "hooks.h"
#include "Loader.h"
@@ -67,7 +67,6 @@
static int sEGLApplicationTraceLevel;
extern gl_hooks_t gHooksTrace;
-extern gl_hooks_t gHooksDebug;
static inline void setGlTraceThreadSpecific(gl_hooks_t const *value) {
pthread_setspecific(gGLTraceKey, value);
@@ -89,27 +88,17 @@
char procPath[128] = {};
sprintf(procPath, "/proc/%ld/cmdline", pid);
FILE * file = fopen(procPath, "r");
- if (file)
- {
+ if (file) {
char cmdline[256] = {};
- if (fgets(cmdline, sizeof(cmdline) - 1, file))
- {
+ if (fgets(cmdline, sizeof(cmdline) - 1, file)) {
if (!strcmp(value, cmdline))
gEGLDebugLevel = 1;
}
fclose(file);
}
- if (gEGLDebugLevel > 0)
- {
- property_get("debug.egl.debug_port", value, "5039");
- const unsigned short port = (unsigned short)atoi(value);
- property_get("debug.egl.debug_forceUseFile", value, "0");
- const bool forceUseFile = (bool)atoi(value);
- property_get("debug.egl.debug_maxFileSize", value, "8");
- const unsigned int maxFileSize = atoi(value) << 20;
- property_get("debug.egl.debug_filePath", value, "/data/local/tmp/dump.gles2dbg");
- StartDebugServer(port, forceUseFile, maxFileSize, value);
+ if (gEGLDebugLevel > 0) {
+ GLTrace_start();
}
}
@@ -119,7 +108,7 @@
setGlThreadSpecific(&gHooksTrace);
} else if (gEGLDebugLevel > 0 && value != &gHooksNoContext) {
setGlTraceThreadSpecific(value);
- setGlThreadSpecific(&gHooksDebug);
+ setGlThreadSpecific(GLTrace_getGLHooks());
} else {
setGlThreadSpecific(value);
}
diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp
index 2b0ed5d..1dbba3f 100644
--- a/opengl/libs/EGL/eglApi.cpp
+++ b/opengl/libs/EGL/eglApi.cpp
@@ -37,7 +37,7 @@
#include "egl_impl.h"
#include "egl_tls.h"
-#include "glesv2dbg.h"
+#include "glestrace.h"
#include "hooks.h"
#include "egl_display.h"
@@ -112,7 +112,6 @@
extern const __eglMustCastToProperFunctionPointerType gExtensionForwarders[MAX_NUMBER_OF_GL_EXTENSIONS];
extern int gEGLDebugLevel;
extern gl_hooks_t gHooksTrace;
-extern gl_hooks_t gHooksDebug;
} // namespace android;
// ----------------------------------------------------------------------------
@@ -516,6 +515,10 @@
}
egl_context_t* c = new egl_context_t(dpy, context, config,
dp->configs[intptr_t(config)].impl, cnx, version);
+#if EGL_TRACE
+ if (gEGLDebugLevel > 0)
+ GLTrace_eglCreateContext(version, c);
+#endif
return c;
}
}
@@ -657,9 +660,10 @@
if (ctx != EGL_NO_CONTEXT) {
setGLHooksThreadSpecific(c->cnx->hooks[c->version]);
egl_tls_t::setContext(ctx);
- if (gEGLDebugLevel > 0) {
- CreateDbgContext(c->version, c->cnx->hooks[c->version]);
- }
+#if EGL_TRACE
+ if (gEGLDebugLevel > 0)
+ GLTrace_eglMakeCurrent(c->version, c->cnx->hooks[c->version]);
+#endif
_c.acquire();
_r.acquire();
_d.acquire();
@@ -886,6 +890,10 @@
"no more slots for eglGetProcAddress(\"%s\")",
procname);
+#if EGL_TRACE
+ gl_hooks_t *debugHooks = GLTrace_getGLHooks();
+#endif
+
if (!addr && (slot < MAX_NUMBER_OF_GL_EXTENSIONS)) {
bool found = false;
for (int i=0 ; i<IMPL_NUM_IMPLEMENTATIONS ; i++) {
@@ -896,7 +904,7 @@
cnx->hooks[GLESv1_INDEX]->ext.extensions[slot] =
cnx->hooks[GLESv2_INDEX]->ext.extensions[slot] =
#if EGL_TRACE
- gHooksDebug.ext.extensions[slot] = gHooksTrace.ext.extensions[slot] =
+ debugHooks->ext.extensions[slot] = gHooksTrace.ext.extensions[slot] =
#endif
cnx->egl.eglGetProcAddress(procname);
}
@@ -924,10 +932,6 @@
EGLBoolean eglSwapBuffers(EGLDisplay dpy, EGLSurface draw)
{
- EGLBoolean Debug_eglSwapBuffers(EGLDisplay dpy, EGLSurface draw);
- if (gEGLDebugLevel > 0)
- Debug_eglSwapBuffers(dpy, draw);
-
clearError();
egl_display_t const * const dp = validate_display(dpy);
@@ -937,6 +941,11 @@
if (!_s.get())
return setError(EGL_BAD_SURFACE, EGL_FALSE);
+#if EGL_TRACE
+ if (gEGLDebugLevel > 0)
+ GLTrace_eglSwapBuffers(dpy, draw);
+#endif
+
egl_surface_t const * const s = get_surface(draw);
return s->cnx->egl.eglSwapBuffers(dp->disp[s->impl].dpy, s->surface);
}
@@ -1162,7 +1171,10 @@
}
}
egl_tls_t::clearTLS();
- dbgReleaseThread();
+#if EGL_TRACE
+ if (gEGLDebugLevel > 0)
+ GLTrace_eglReleaseThread();
+#endif
return EGL_TRUE;
}
diff --git a/opengl/libs/EGL/egl_tls.cpp b/opengl/libs/EGL/egl_tls.cpp
index b341ddb..6946ecd 100644
--- a/opengl/libs/EGL/egl_tls.cpp
+++ b/opengl/libs/EGL/egl_tls.cpp
@@ -33,7 +33,7 @@
pthread_mutex_t egl_tls_t::sLockKey = PTHREAD_MUTEX_INITIALIZER;
egl_tls_t::egl_tls_t()
- : error(EGL_SUCCESS), ctx(0), logCallWithNoContext(EGL_TRUE), dbg(0) {
+ : error(EGL_SUCCESS), ctx(0), logCallWithNoContext(EGL_TRUE) {
}
const char *egl_tls_t::egl_strerror(EGLint err) {
diff --git a/opengl/libs/EGL/egl_tls.h b/opengl/libs/EGL/egl_tls.h
index 78b0b2f..2442ca0 100644
--- a/opengl/libs/EGL/egl_tls.h
+++ b/opengl/libs/EGL/egl_tls.h
@@ -37,7 +37,6 @@
EGLint error;
EGLContext ctx;
EGLBoolean logCallWithNoContext;
- DbgContext* dbg;
egl_tls_t();
static void validateTLSKey();
diff --git a/opengl/libs/EGL/trace.cpp b/opengl/libs/EGL/trace.cpp
index 0e934e2..bd6c348 100644
--- a/opengl/libs/EGL/trace.cpp
+++ b/opengl/libs/EGL/trace.cpp
@@ -375,22 +375,6 @@
#undef TRACE_GL_VOID
#undef TRACE_GL
-// declare all Debug_gl* functions
-#define GL_ENTRY(_r, _api, ...) _r Debug_##_api ( __VA_ARGS__ );
-#include "glesv2dbg_functions.h"
-#undef GL_ENTRY
-
-#define GL_ENTRY(_r, _api, ...) Debug_ ## _api,
-EGLAPI gl_hooks_t gHooksDebug = {
- {
- #include "entries.in"
- },
- {
- {0}
- }
-};
-#undef GL_ENTRY
-
// ----------------------------------------------------------------------------
}; // namespace android
// ----------------------------------------------------------------------------
diff --git a/opengl/libs/GLES_trace/.gitignore b/opengl/libs/GLES_trace/.gitignore
new file mode 100644
index 0000000..8df825e
--- /dev/null
+++ b/opengl/libs/GLES_trace/.gitignore
@@ -0,0 +1,4 @@
+java
+*.pyc
+*.swp
+pyratemp.py
diff --git a/opengl/libs/GLES2_dbg/Android.mk b/opengl/libs/GLES_trace/Android.mk
similarity index 69%
rename from opengl/libs/GLES2_dbg/Android.mk
rename to opengl/libs/GLES_trace/Android.mk
index 70853d8..465b6b2 100644
--- a/opengl/libs/GLES2_dbg/Android.mk
+++ b/opengl/libs/GLES_trace/Android.mk
@@ -3,13 +3,14 @@
include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
- src/api.cpp \
- src/caller.cpp \
- src/dbgcontext.cpp \
- src/debugger_message.pb.cpp \
- src/egl.cpp \
- src/server.cpp \
- src/vertex.cpp
+ src/gltrace_api.cpp \
+ src/gltrace_context.cpp \
+ src/gltrace_egl.cpp \
+ src/gltrace_eglapi.cpp \
+ src/gltrace_fixup.cpp \
+ src/gltrace_hooks.cpp \
+ src/gltrace.pb.cpp \
+ src/gltrace_transport.cpp
LOCAL_C_INCLUDES := \
$(LOCAL_PATH) \
@@ -19,20 +20,15 @@
external \
bionic
-#LOCAL_CFLAGS += -O0 -g -DDEBUG -UNDEBUG
LOCAL_CFLAGS := -DGOOGLE_PROTOBUF_NO_RTTI
LOCAL_STATIC_LIBRARIES := libprotobuf-cpp-2.3.0-lite liblzf
LOCAL_SHARED_LIBRARIES := libcutils libutils libstlport
-ifeq ($(TARGET_ARCH),arm)
- LOCAL_CFLAGS += -fstrict-aliasing
-endif
ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
endif
-LOCAL_CFLAGS += -DLOG_TAG=\"libGLES2_dbg\"
-
+LOCAL_CFLAGS += -DLOG_TAG=\"libGLES_trace\"
# we need to access the private Bionic header <bionic_tls.h>
# on ARM platforms, we need to mirror the ARCH_ARM_HAVE_TLS_REGISTER
@@ -42,9 +38,7 @@
endif
LOCAL_C_INCLUDES += bionic/libc/private
-LOCAL_MODULE:= libGLESv2_dbg
+LOCAL_MODULE:= libGLES_trace
LOCAL_MODULE_TAGS := optional
include $(BUILD_SHARED_LIBRARY)
-
-include $(LOCAL_PATH)/test/Android.mk
diff --git a/opengl/libs/GLES_trace/DESIGN.txt b/opengl/libs/GLES_trace/DESIGN.txt
new file mode 100644
index 0000000..a189e1d
--- /dev/null
+++ b/opengl/libs/GLES_trace/DESIGN.txt
@@ -0,0 +1,51 @@
+Design of the GLES Tracing Library
+
+Code Runtime Behavior:
+
+ Initialization:
+
+ egl_display_t::initialize() calls initEglTraceLevel() to figure out whether tracing should be
+ enabled. Currently, the shell properties "debug.egl.trace" and "debug.egl.debug_proc" together
+ control whether tracing should be enabled for a certain process. If tracing is enabled, this
+ calls GLTrace_start() to start the trace server.
+
+ Note that initEglTraceLevel() is also called from early_egl_init(), but that happens in the
+ context of the zygote, so that invocation has no effect.
+
+ egl_display_t::initialize() then calls setGLHooksThreadSpecific() where we set the thread
+ specific gl_hooks structure to point to the trace implementation. From this point on, every
+ GLES call is redirected to the trace implementation.
+
+ Application runtime:
+
+ While the application is running, all its GLES calls are directly routed to their corresponding
+ trace implementation.
+
+ For EGL calls, the trace library provides a bunch of functions that must be explicitly called
+ from the EGL library. These functions are declared in glestrace.h
+
+ Application shutdown:
+
+ Currently, the application is killed when the user stops tracing from the frontend GUI. We need
+ to explore if a more graceful method of stopping the application, or detaching tracing from the
+ application is required.
+
+Code Structure:
+
+ glestrace.h declares all the hooks exposed by libglestrace. These are used by EGL/egl.cpp and
+ EGL/eglApi.cpp to initialize the trace library, and to inform the library of EGL calls.
+
+ All GL calls are present in GLES_Trace/src/gltrace_api.cpp. This file is generated by the
+ GLES_Trace/src/genapi.py script. The structure of all the functions looks like this:
+
+ void GLTrace_glFunction(args) {
+ // declare a protobuf
+ // copy arguments into the protobuf
+ // call the original GLES function
+ // if there is a return value, save it into the protobuf
+ // fixup the protobuf if necessary
+ // transport the protobuf to the host
+ }
+
+ The fixupGLMessage() call does any custom processing of the protobuf based on the GLES call.
+ This typically amounts to copying the data corresponding to input or output pointers.
diff --git a/opengl/libs/GLES_trace/TODO.txt b/opengl/libs/GLES_trace/TODO.txt
new file mode 100644
index 0000000..f5e6e95
--- /dev/null
+++ b/opengl/libs/GLES_trace/TODO.txt
@@ -0,0 +1,14 @@
+TODO:
+ - Context - Currently, we don't do anything regarding the contexts that are created.
+ Need to maintain more state regarding contexts, and figure out what happens in the
+ presence of multiple contexts.
+
+ - Transport: Each GLMessage is sent via a socket as soon as the message is received.
+ i.e., there is no buffering of messages. Buffering should improve performance.
+
+ - Initialization: On first connection, send some basic information that includes:
+ 1. version of the trace library
+ 2. implementation dependent GL state variables such as # of vertex arrays etc.
+
+ - eglSwapBuffers: The images are lzf compressed, but there is no mode that transfers
+ only the differences from the previous images.
diff --git a/opengl/libs/GLES_trace/dev.make b/opengl/libs/GLES_trace/dev.make
new file mode 100644
index 0000000..1d89999
--- /dev/null
+++ b/opengl/libs/GLES_trace/dev.make
@@ -0,0 +1,15 @@
+## NOTE
+## This file is used for development purposes only. It is not used by the build system.
+
+# generate protocol buffer files
+genproto: gltrace.proto
+ aprotoc --cpp_out=src --java_out=java gltrace.proto
+ mv src/gltrace.pb.cc src/gltrace.pb.cpp
+
+# NOTE: $OUT should be defined in the shell by doing a "lunch <config>"
+# push updated files to device
+push:
+ adb push $(OUT)/system/lib/libGLESv2.so /system/lib/
+ adb push $(OUT)/system/lib/libGLESv1_CM.so /system/lib/
+ adb push $(OUT)/system/lib/libGLES_trace.so /system/lib/
+ adb push $(OUT)/system/lib/libEGL.so /system/lib/
diff --git a/opengl/libs/GLES_trace/gltrace.proto b/opengl/libs/GLES_trace/gltrace.proto
new file mode 100644
index 0000000..59f80e3
--- /dev/null
+++ b/opengl/libs/GLES_trace/gltrace.proto
@@ -0,0 +1,481 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.gltrace;
+
+option optimize_for = LITE_RUNTIME;
+
+option java_package = "com.android.ide.eclipse.gltrace";
+option java_outer_classname = "GLProtoBuf";
+
+message GLMessage {
+ enum Function {
+ glActiveTexture = 0;
+ glAlphaFunc = 1;
+ glAlphaFuncx = 2;
+ glAlphaFuncxOES = 3;
+ glAttachShader = 4;
+ glBeginPerfMonitorAMD = 5;
+ glBindAttribLocation = 6;
+ glBindBuffer = 7;
+ glBindFramebuffer = 8;
+ glBindFramebufferOES = 9;
+ glBindRenderbuffer = 10;
+ glBindRenderbufferOES = 11;
+ glBindTexture = 12;
+ glBindVertexArrayOES = 13;
+ glBlendColor = 14;
+ glBlendEquation = 15;
+ glBlendEquationOES = 16;
+ glBlendEquationSeparate = 17;
+ glBlendEquationSeparateOES = 18;
+ glBlendFunc = 19;
+ glBlendFuncSeparate = 20;
+ glBlendFuncSeparateOES = 21;
+ glBufferData = 22;
+ glBufferSubData = 23;
+ glCheckFramebufferStatus = 24;
+ glCheckFramebufferStatusOES = 25;
+ glClearColor = 26;
+ glClearColorx = 27;
+ glClearColorxOES = 28;
+ glClearDepthf = 29;
+ glClearDepthfOES = 30;
+ glClearDepthx = 31;
+ glClearDepthxOES = 32;
+ glClear = 33;
+ glClearStencil = 34;
+ glClientActiveTexture = 35;
+ glClipPlanef = 36;
+ glClipPlanefIMG = 37;
+ glClipPlanefOES = 38;
+ glClipPlanex = 39;
+ glClipPlanexIMG = 40;
+ glClipPlanexOES = 41;
+ glColor4f = 42;
+ glColor4ub = 43;
+ glColor4x = 44;
+ glColor4xOES = 45;
+ glColorMask = 46;
+ glColorPointer = 47;
+ glCompileShader = 48;
+ glCompressedTexImage2D = 49;
+ glCompressedTexImage3DOES = 50;
+ glCompressedTexSubImage2D = 51;
+ glCompressedTexSubImage3DOES = 52;
+ glCopyTexImage2D = 53;
+ glCopyTexSubImage2D = 54;
+ glCopyTexSubImage3DOES = 55;
+ glCoverageMaskNV = 56;
+ glCoverageOperationNV = 57;
+ glCreateProgram = 58;
+ glCreateShader = 59;
+ glCullFace = 60;
+ glCurrentPaletteMatrixOES = 61;
+ glDeleteBuffers = 62;
+ glDeleteFencesNV = 63;
+ glDeleteFramebuffers = 64;
+ glDeleteFramebuffersOES = 65;
+ glDeletePerfMonitorsAMD = 66;
+ glDeleteProgram = 67;
+ glDeleteRenderbuffers = 68;
+ glDeleteRenderbuffersOES = 69;
+ glDeleteShader = 70;
+ glDeleteTextures = 71;
+ glDeleteVertexArraysOES = 72;
+ glDepthFunc = 73;
+ glDepthMask = 74;
+ glDepthRangef = 75;
+ glDepthRangefOES = 76;
+ glDepthRangex = 77;
+ glDepthRangexOES = 78;
+ glDetachShader = 79;
+ glDisableClientState = 80;
+ glDisableDriverControlQCOM = 81;
+ glDisable = 82;
+ glDisableVertexAttribArray = 83;
+ glDiscardFramebufferEXT = 84;
+ glDrawArrays = 85;
+ glDrawElements = 86;
+ glDrawTexfOES = 87;
+ glDrawTexfvOES = 88;
+ glDrawTexiOES = 89;
+ glDrawTexivOES = 90;
+ glDrawTexsOES = 91;
+ glDrawTexsvOES = 92;
+ glDrawTexxOES = 93;
+ glDrawTexxvOES = 94;
+ glEGLImageTargetRenderbufferStorageOES = 95;
+ glEGLImageTargetTexture2DOES = 96;
+ glEnableClientState = 97;
+ glEnableDriverControlQCOM = 98;
+ glEnable = 99;
+ glEnableVertexAttribArray = 100;
+ glEndPerfMonitorAMD = 101;
+ glEndTilingQCOM = 102;
+ glExtGetBufferPointervQCOM = 103;
+ glExtGetBuffersQCOM = 104;
+ glExtGetFramebuffersQCOM = 105;
+ glExtGetProgramBinarySourceQCOM = 106;
+ glExtGetProgramsQCOM = 107;
+ glExtGetRenderbuffersQCOM = 108;
+ glExtGetShadersQCOM = 109;
+ glExtGetTexLevelParameterivQCOM = 110;
+ glExtGetTexSubImageQCOM = 111;
+ glExtGetTexturesQCOM = 112;
+ glExtIsProgramBinaryQCOM = 113;
+ glExtTexObjectStateOverrideiQCOM = 114;
+ glFinishFenceNV = 115;
+ glFinish = 116;
+ glFlush = 117;
+ glFogf = 118;
+ glFogfv = 119;
+ glFogx = 120;
+ glFogxOES = 121;
+ glFogxv = 122;
+ glFogxvOES = 123;
+ glFramebufferRenderbuffer = 124;
+ glFramebufferRenderbufferOES = 125;
+ glFramebufferTexture2D = 126;
+ glFramebufferTexture2DMultisampleIMG = 127;
+ glFramebufferTexture2DOES = 128;
+ glFramebufferTexture3DOES = 129;
+ glFrontFace = 130;
+ glFrustumf = 131;
+ glFrustumfOES = 132;
+ glFrustumx = 133;
+ glFrustumxOES = 134;
+ glGenBuffers = 135;
+ glGenerateMipmap = 136;
+ glGenerateMipmapOES = 137;
+ glGenFencesNV = 138;
+ glGenFramebuffers = 139;
+ glGenFramebuffersOES = 140;
+ glGenPerfMonitorsAMD = 141;
+ glGenRenderbuffers = 142;
+ glGenRenderbuffersOES = 143;
+ glGenTextures = 144;
+ glGenVertexArraysOES = 145;
+ glGetActiveAttrib = 146;
+ glGetActiveUniform = 147;
+ glGetAttachedShaders = 148;
+ glGetAttribLocation = 149;
+ glGetBooleanv = 150;
+ glGetBufferParameteriv = 151;
+ glGetBufferPointervOES = 152;
+ glGetClipPlanef = 153;
+ glGetClipPlanefOES = 154;
+ glGetClipPlanex = 155;
+ glGetClipPlanexOES = 156;
+ glGetDriverControlsQCOM = 157;
+ glGetDriverControlStringQCOM = 158;
+ glGetError = 159;
+ glGetFenceivNV = 160;
+ glGetFixedv = 161;
+ glGetFixedvOES = 162;
+ glGetFloatv = 163;
+ glGetFramebufferAttachmentParameteriv = 164;
+ glGetFramebufferAttachmentParameterivOES = 165;
+ glGetIntegerv = 166;
+ glGetLightfv = 167;
+ glGetLightxv = 168;
+ glGetLightxvOES = 169;
+ glGetMaterialfv = 170;
+ glGetMaterialxv = 171;
+ glGetMaterialxvOES = 172;
+ glGetPerfMonitorCounterDataAMD = 173;
+ glGetPerfMonitorCounterInfoAMD = 174;
+ glGetPerfMonitorCountersAMD = 175;
+ glGetPerfMonitorCounterStringAMD = 176;
+ glGetPerfMonitorGroupsAMD = 177;
+ glGetPerfMonitorGroupStringAMD = 178;
+ glGetPointerv = 179;
+ glGetProgramBinaryOES = 180;
+ glGetProgramInfoLog = 181;
+ glGetProgramiv = 182;
+ glGetRenderbufferParameteriv = 183;
+ glGetRenderbufferParameterivOES = 184;
+ glGetShaderInfoLog = 185;
+ glGetShaderiv = 186;
+ glGetShaderPrecisionFormat = 187;
+ glGetShaderSource = 188;
+ glGetString = 189;
+ glGetTexEnvfv = 190;
+ glGetTexEnviv = 191;
+ glGetTexEnvxv = 192;
+ glGetTexEnvxvOES = 193;
+ glGetTexGenfvOES = 194;
+ glGetTexGenivOES = 195;
+ glGetTexGenxvOES = 196;
+ glGetTexParameterfv = 197;
+ glGetTexParameteriv = 198;
+ glGetTexParameterxv = 199;
+ glGetTexParameterxvOES = 200;
+ glGetUniformfv = 201;
+ glGetUniformiv = 202;
+ glGetUniformLocation = 203;
+ glGetVertexAttribfv = 204;
+ glGetVertexAttribiv = 205;
+ glGetVertexAttribPointerv = 206;
+ glHint = 207;
+ glIsBuffer = 208;
+ glIsEnabled = 209;
+ glIsFenceNV = 210;
+ glIsFramebuffer = 211;
+ glIsFramebufferOES = 212;
+ glIsProgram = 213;
+ glIsRenderbuffer = 214;
+ glIsRenderbufferOES = 215;
+ glIsShader = 216;
+ glIsTexture = 217;
+ glIsVertexArrayOES = 218;
+ glLightf = 219;
+ glLightfv = 220;
+ glLightModelf = 221;
+ glLightModelfv = 222;
+ glLightModelx = 223;
+ glLightModelxOES = 224;
+ glLightModelxv = 225;
+ glLightModelxvOES = 226;
+ glLightx = 227;
+ glLightxOES = 228;
+ glLightxv = 229;
+ glLightxvOES = 230;
+ glLineWidth = 231;
+ glLineWidthx = 232;
+ glLineWidthxOES = 233;
+ glLinkProgram = 234;
+ glLoadIdentity = 235;
+ glLoadMatrixf = 236;
+ glLoadMatrixx = 237;
+ glLoadMatrixxOES = 238;
+ glLoadPaletteFromModelViewMatrixOES = 239;
+ glLogicOp = 240;
+ glMapBufferOES = 241;
+ glMaterialf = 242;
+ glMaterialfv = 243;
+ glMaterialx = 244;
+ glMaterialxOES = 245;
+ glMaterialxv = 246;
+ glMaterialxvOES = 247;
+ glMatrixIndexPointerOES = 248;
+ glMatrixMode = 249;
+ glMultiDrawArraysEXT = 250;
+ glMultiDrawElementsEXT = 251;
+ glMultiTexCoord4f = 252;
+ glMultiTexCoord4x = 253;
+ glMultiTexCoord4xOES = 254;
+ glMultMatrixf = 255;
+ glMultMatrixx = 256;
+ glMultMatrixxOES = 257;
+ glNormal3f = 258;
+ glNormal3x = 259;
+ glNormal3xOES = 260;
+ glNormalPointer = 261;
+ glOrthof = 262;
+ glOrthofOES = 263;
+ glOrthox = 264;
+ glOrthoxOES = 265;
+ glPixelStorei = 266;
+ glPointParameterf = 267;
+ glPointParameterfv = 268;
+ glPointParameterx = 269;
+ glPointParameterxOES = 270;
+ glPointParameterxv = 271;
+ glPointParameterxvOES = 272;
+ glPointSize = 273;
+ glPointSizePointerOES = 274;
+ glPointSizex = 275;
+ glPointSizexOES = 276;
+ glPolygonOffset = 277;
+ glPolygonOffsetx = 278;
+ glPolygonOffsetxOES = 279;
+ glPopMatrix = 280;
+ glProgramBinaryOES = 281;
+ glPushMatrix = 282;
+ glQueryMatrixxOES = 283;
+ glReadPixels = 284;
+ glReleaseShaderCompiler = 285;
+ glRenderbufferStorage = 286;
+ glRenderbufferStorageMultisampleIMG = 287;
+ glRenderbufferStorageOES = 288;
+ glRotatef = 289;
+ glRotatex = 290;
+ glRotatexOES = 291;
+ glSampleCoverage = 292;
+ glSampleCoveragex = 293;
+ glSampleCoveragexOES = 294;
+ glScalef = 295;
+ glScalex = 296;
+ glScalexOES = 297;
+ glScissor = 298;
+ glSelectPerfMonitorCountersAMD = 299;
+ glSetFenceNV = 300;
+ glShadeModel = 301;
+ glShaderBinary = 302;
+ glShaderSource = 303;
+ glStartTilingQCOM = 304;
+ glStencilFunc = 305;
+ glStencilFuncSeparate = 306;
+ glStencilMask = 307;
+ glStencilMaskSeparate = 308;
+ glStencilOp = 309;
+ glStencilOpSeparate = 310;
+ glTestFenceNV = 311;
+ glTexCoordPointer = 312;
+ glTexEnvf = 313;
+ glTexEnvfv = 314;
+ glTexEnvi = 315;
+ glTexEnviv = 316;
+ glTexEnvx = 317;
+ glTexEnvxOES = 318;
+ glTexEnvxv = 319;
+ glTexEnvxvOES = 320;
+ glTexGenfOES = 321;
+ glTexGenfvOES = 322;
+ glTexGeniOES = 323;
+ glTexGenivOES = 324;
+ glTexGenxOES = 325;
+ glTexGenxvOES = 326;
+ glTexImage2D = 327;
+ glTexImage3DOES = 328;
+ glTexParameterf = 329;
+ glTexParameterfv = 330;
+ glTexParameteri = 331;
+ glTexParameteriv = 332;
+ glTexParameterx = 333;
+ glTexParameterxOES = 334;
+ glTexParameterxv = 335;
+ glTexParameterxvOES = 336;
+ glTexSubImage2D = 337;
+ glTexSubImage3DOES = 338;
+ glTranslatef = 339;
+ glTranslatex = 340;
+ glTranslatexOES = 341;
+ glUniform1f = 342;
+ glUniform1fv = 343;
+ glUniform1i = 344;
+ glUniform1iv = 345;
+ glUniform2f = 346;
+ glUniform2fv = 347;
+ glUniform2i = 348;
+ glUniform2iv = 349;
+ glUniform3f = 350;
+ glUniform3fv = 351;
+ glUniform3i = 352;
+ glUniform3iv = 353;
+ glUniform4f = 354;
+ glUniform4fv = 355;
+ glUniform4i = 356;
+ glUniform4iv = 357;
+ glUniformMatrix2fv = 358;
+ glUniformMatrix3fv = 359;
+ glUniformMatrix4fv = 360;
+ glUnmapBufferOES = 361;
+ glUseProgram = 362;
+ glValidateProgram = 363;
+ glVertexAttrib1f = 364;
+ glVertexAttrib1fv = 365;
+ glVertexAttrib2f = 366;
+ glVertexAttrib2fv = 367;
+ glVertexAttrib3f = 368;
+ glVertexAttrib3fv = 369;
+ glVertexAttrib4f = 370;
+ glVertexAttrib4fv = 371;
+ glVertexAttribPointer = 372;
+ glVertexPointer = 373;
+ glViewport = 374;
+ glWeightPointerOES = 375;
+
+ eglGetDisplay = 2000;
+ eglInitialize = 2001;
+ eglTerminate = 2002;
+ eglGetConfigs = 2003;
+ eglChooseConfig = 2004;
+ eglGetConfigAttrib = 2005;
+ eglCreateWindowSurface = 2006;
+ eglCreatePixmapSurface = 2007;
+ eglCreatePbufferSurface = 2008;
+ eglDestroySurface = 2009;
+ eglQuerySurface = 2010;
+ eglCreateContext = 2011;
+ eglDestroyContext = 2012;
+ eglMakeCurrent = 2013;
+ eglGetCurrentContext = 2014;
+ eglGetCurrentSurface = 2015;
+ eglGetCurrentDisplay = 2016;
+ eglQueryContext = 2017;
+ eglWaitGL = 2018;
+ eglWaitNative = 2019;
+ eglSwapBuffers = 2020;
+ eglCopyBuffers = 2021;
+ eglGetError = 2022;
+ eglQueryString = 2023;
+ eglGetProcAddress = 2024;
+ eglSurfaceAttrib = 2025;
+ eglBindTexImage = 2026;
+ eglReleaseTexImage = 2027;
+ eglSwapInterval = 2028;
+ eglBindAPI = 2029;
+ eglQueryAPI = 2030;
+ eglWaitClient = 2031;
+ eglReleaseThread = 2032;
+ eglCreatePbufferFromClientBuffer = 2033;
+ eglLockSurfaceKHR = 2034;
+ eglUnlockSurfaceKHR = 2035;
+ eglCreateImageKHR = 2036;
+ eglDestroyImageKHR = 2037;
+ eglCreateSyncKHR = 2038;
+ eglDestroySyncKHR = 2039;
+ eglClientWaitSyncKHR = 2040;
+ eglGetSyncAttribKHR = 2041;
+ eglSetSwapRectangleANDROID = 2042;
+ eglGetRenderBufferANDROID = 2043;
+ eglGetSystemTimeFrequencyNV = 2044;
+ eglGetSystemTimeNV = 2045;
+
+ invalid = 3000;
+ frameBufferContents = 3001;
+ }
+
+ // A GL call's return data and arguments are formatted into this DataType
+ message DataType {
+ enum Type {
+ VOID = 1; // GLvoid
+ CHAR = 2; // GLchar
+ BYTE = 3; // GLbyte, GLubyte
+ INT = 4; // GLbitfield, GLshort, GLint, GLsizei, GLushort, GLuint, GLfixed
+ FLOAT = 5; // GLfloat, GLclampf
+ BOOL = 6; // GLboolean
+ ENUM = 7; // GLenum
+ };
+
+ required Type type = 1 [default = VOID];
+ required bool isArray = 2 [default = false];
+
+ repeated int32 intValue = 3;
+ repeated float floatValue = 4;
+ repeated bytes charValue = 5;
+ repeated bytes rawBytes = 6;
+ repeated bool boolValue = 7;
+ }
+
+ required int32 context_id = 1; // GL context ID
+ required Function function = 2 [default = invalid]; // GL function called
+ repeated DataType args = 3; // GL function's arguments
+ optional DataType returnValue = 4; // GL function's return value
+ optional float duration = 5; // duration of GL call
+};
diff --git a/opengl/libs/GLES_trace/src/gltrace.pb.cpp b/opengl/libs/GLES_trace/src/gltrace.pb.cpp
new file mode 100644
index 0000000..160afbf
--- /dev/null
+++ b/opengl/libs/GLES_trace/src/gltrace.pb.cpp
@@ -0,0 +1,1618 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+
+#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
+#include "gltrace.pb.h"
+#include <google/protobuf/stubs/once.h>
+#include <google/protobuf/io/coded_stream.h>
+#include <google/protobuf/wire_format_lite_inl.h>
+// @@protoc_insertion_point(includes)
+
+namespace android {
+namespace gltrace {
+
+void protobuf_ShutdownFile_gltrace_2eproto() {
+ delete GLMessage::default_instance_;
+ delete GLMessage_DataType::default_instance_;
+}
+
+void protobuf_AddDesc_gltrace_2eproto() {
+ static bool already_here = false;
+ if (already_here) return;
+ already_here = true;
+ GOOGLE_PROTOBUF_VERIFY_VERSION;
+
+ GLMessage::default_instance_ = new GLMessage();
+ GLMessage_DataType::default_instance_ = new GLMessage_DataType();
+ GLMessage::default_instance_->InitAsDefaultInstance();
+ GLMessage_DataType::default_instance_->InitAsDefaultInstance();
+ ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_gltrace_2eproto);
+}
+
+// Force AddDescriptors() to be called at static initialization time.
+struct StaticDescriptorInitializer_gltrace_2eproto {
+ StaticDescriptorInitializer_gltrace_2eproto() {
+ protobuf_AddDesc_gltrace_2eproto();
+ }
+} static_descriptor_initializer_gltrace_2eproto_;
+
+
+// ===================================================================
+
+bool GLMessage_Function_IsValid(int value) {
+ switch(value) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ case 8:
+ case 9:
+ case 10:
+ case 11:
+ case 12:
+ case 13:
+ case 14:
+ case 15:
+ case 16:
+ case 17:
+ case 18:
+ case 19:
+ case 20:
+ case 21:
+ case 22:
+ case 23:
+ case 24:
+ case 25:
+ case 26:
+ case 27:
+ case 28:
+ case 29:
+ case 30:
+ case 31:
+ case 32:
+ case 33:
+ case 34:
+ case 35:
+ case 36:
+ case 37:
+ case 38:
+ case 39:
+ case 40:
+ case 41:
+ case 42:
+ case 43:
+ case 44:
+ case 45:
+ case 46:
+ case 47:
+ case 48:
+ case 49:
+ case 50:
+ case 51:
+ case 52:
+ case 53:
+ case 54:
+ case 55:
+ case 56:
+ case 57:
+ case 58:
+ case 59:
+ case 60:
+ case 61:
+ case 62:
+ case 63:
+ case 64:
+ case 65:
+ case 66:
+ case 67:
+ case 68:
+ case 69:
+ case 70:
+ case 71:
+ case 72:
+ case 73:
+ case 74:
+ case 75:
+ case 76:
+ case 77:
+ case 78:
+ case 79:
+ case 80:
+ case 81:
+ case 82:
+ case 83:
+ case 84:
+ case 85:
+ case 86:
+ case 87:
+ case 88:
+ case 89:
+ case 90:
+ case 91:
+ case 92:
+ case 93:
+ case 94:
+ case 95:
+ case 96:
+ case 97:
+ case 98:
+ case 99:
+ case 100:
+ case 101:
+ case 102:
+ case 103:
+ case 104:
+ case 105:
+ case 106:
+ case 107:
+ case 108:
+ case 109:
+ case 110:
+ case 111:
+ case 112:
+ case 113:
+ case 114:
+ case 115:
+ case 116:
+ case 117:
+ case 118:
+ case 119:
+ case 120:
+ case 121:
+ case 122:
+ case 123:
+ case 124:
+ case 125:
+ case 126:
+ case 127:
+ case 128:
+ case 129:
+ case 130:
+ case 131:
+ case 132:
+ case 133:
+ case 134:
+ case 135:
+ case 136:
+ case 137:
+ case 138:
+ case 139:
+ case 140:
+ case 141:
+ case 142:
+ case 143:
+ case 144:
+ case 145:
+ case 146:
+ case 147:
+ case 148:
+ case 149:
+ case 150:
+ case 151:
+ case 152:
+ case 153:
+ case 154:
+ case 155:
+ case 156:
+ case 157:
+ case 158:
+ case 159:
+ case 160:
+ case 161:
+ case 162:
+ case 163:
+ case 164:
+ case 165:
+ case 166:
+ case 167:
+ case 168:
+ case 169:
+ case 170:
+ case 171:
+ case 172:
+ case 173:
+ case 174:
+ case 175:
+ case 176:
+ case 177:
+ case 178:
+ case 179:
+ case 180:
+ case 181:
+ case 182:
+ case 183:
+ case 184:
+ case 185:
+ case 186:
+ case 187:
+ case 188:
+ case 189:
+ case 190:
+ case 191:
+ case 192:
+ case 193:
+ case 194:
+ case 195:
+ case 196:
+ case 197:
+ case 198:
+ case 199:
+ case 200:
+ case 201:
+ case 202:
+ case 203:
+ case 204:
+ case 205:
+ case 206:
+ case 207:
+ case 208:
+ case 209:
+ case 210:
+ case 211:
+ case 212:
+ case 213:
+ case 214:
+ case 215:
+ case 216:
+ case 217:
+ case 218:
+ case 219:
+ case 220:
+ case 221:
+ case 222:
+ case 223:
+ case 224:
+ case 225:
+ case 226:
+ case 227:
+ case 228:
+ case 229:
+ case 230:
+ case 231:
+ case 232:
+ case 233:
+ case 234:
+ case 235:
+ case 236:
+ case 237:
+ case 238:
+ case 239:
+ case 240:
+ case 241:
+ case 242:
+ case 243:
+ case 244:
+ case 245:
+ case 246:
+ case 247:
+ case 248:
+ case 249:
+ case 250:
+ case 251:
+ case 252:
+ case 253:
+ case 254:
+ case 255:
+ case 256:
+ case 257:
+ case 258:
+ case 259:
+ case 260:
+ case 261:
+ case 262:
+ case 263:
+ case 264:
+ case 265:
+ case 266:
+ case 267:
+ case 268:
+ case 269:
+ case 270:
+ case 271:
+ case 272:
+ case 273:
+ case 274:
+ case 275:
+ case 276:
+ case 277:
+ case 278:
+ case 279:
+ case 280:
+ case 281:
+ case 282:
+ case 283:
+ case 284:
+ case 285:
+ case 286:
+ case 287:
+ case 288:
+ case 289:
+ case 290:
+ case 291:
+ case 292:
+ case 293:
+ case 294:
+ case 295:
+ case 296:
+ case 297:
+ case 298:
+ case 299:
+ case 300:
+ case 301:
+ case 302:
+ case 303:
+ case 304:
+ case 305:
+ case 306:
+ case 307:
+ case 308:
+ case 309:
+ case 310:
+ case 311:
+ case 312:
+ case 313:
+ case 314:
+ case 315:
+ case 316:
+ case 317:
+ case 318:
+ case 319:
+ case 320:
+ case 321:
+ case 322:
+ case 323:
+ case 324:
+ case 325:
+ case 326:
+ case 327:
+ case 328:
+ case 329:
+ case 330:
+ case 331:
+ case 332:
+ case 333:
+ case 334:
+ case 335:
+ case 336:
+ case 337:
+ case 338:
+ case 339:
+ case 340:
+ case 341:
+ case 342:
+ case 343:
+ case 344:
+ case 345:
+ case 346:
+ case 347:
+ case 348:
+ case 349:
+ case 350:
+ case 351:
+ case 352:
+ case 353:
+ case 354:
+ case 355:
+ case 356:
+ case 357:
+ case 358:
+ case 359:
+ case 360:
+ case 361:
+ case 362:
+ case 363:
+ case 364:
+ case 365:
+ case 366:
+ case 367:
+ case 368:
+ case 369:
+ case 370:
+ case 371:
+ case 372:
+ case 373:
+ case 374:
+ case 375:
+ case 2000:
+ case 2001:
+ case 2002:
+ case 2003:
+ case 2004:
+ case 2005:
+ case 2006:
+ case 2007:
+ case 2008:
+ case 2009:
+ case 2010:
+ case 2011:
+ case 2012:
+ case 2013:
+ case 2014:
+ case 2015:
+ case 2016:
+ case 2017:
+ case 2018:
+ case 2019:
+ case 2020:
+ case 2021:
+ case 2022:
+ case 2023:
+ case 2024:
+ case 2025:
+ case 2026:
+ case 2027:
+ case 2028:
+ case 2029:
+ case 2030:
+ case 2031:
+ case 2032:
+ case 2033:
+ case 2034:
+ case 2035:
+ case 2036:
+ case 2037:
+ case 2038:
+ case 2039:
+ case 2040:
+ case 2041:
+ case 2042:
+ case 2043:
+ case 2044:
+ case 2045:
+ case 3000:
+ case 3001:
+ return true;
+ default:
+ return false;
+ }
+}
+
+#ifndef _MSC_VER
+const GLMessage_Function GLMessage::glActiveTexture;
+const GLMessage_Function GLMessage::glAlphaFunc;
+const GLMessage_Function GLMessage::glAlphaFuncx;
+const GLMessage_Function GLMessage::glAlphaFuncxOES;
+const GLMessage_Function GLMessage::glAttachShader;
+const GLMessage_Function GLMessage::glBeginPerfMonitorAMD;
+const GLMessage_Function GLMessage::glBindAttribLocation;
+const GLMessage_Function GLMessage::glBindBuffer;
+const GLMessage_Function GLMessage::glBindFramebuffer;
+const GLMessage_Function GLMessage::glBindFramebufferOES;
+const GLMessage_Function GLMessage::glBindRenderbuffer;
+const GLMessage_Function GLMessage::glBindRenderbufferOES;
+const GLMessage_Function GLMessage::glBindTexture;
+const GLMessage_Function GLMessage::glBindVertexArrayOES;
+const GLMessage_Function GLMessage::glBlendColor;
+const GLMessage_Function GLMessage::glBlendEquation;
+const GLMessage_Function GLMessage::glBlendEquationOES;
+const GLMessage_Function GLMessage::glBlendEquationSeparate;
+const GLMessage_Function GLMessage::glBlendEquationSeparateOES;
+const GLMessage_Function GLMessage::glBlendFunc;
+const GLMessage_Function GLMessage::glBlendFuncSeparate;
+const GLMessage_Function GLMessage::glBlendFuncSeparateOES;
+const GLMessage_Function GLMessage::glBufferData;
+const GLMessage_Function GLMessage::glBufferSubData;
+const GLMessage_Function GLMessage::glCheckFramebufferStatus;
+const GLMessage_Function GLMessage::glCheckFramebufferStatusOES;
+const GLMessage_Function GLMessage::glClearColor;
+const GLMessage_Function GLMessage::glClearColorx;
+const GLMessage_Function GLMessage::glClearColorxOES;
+const GLMessage_Function GLMessage::glClearDepthf;
+const GLMessage_Function GLMessage::glClearDepthfOES;
+const GLMessage_Function GLMessage::glClearDepthx;
+const GLMessage_Function GLMessage::glClearDepthxOES;
+const GLMessage_Function GLMessage::glClear;
+const GLMessage_Function GLMessage::glClearStencil;
+const GLMessage_Function GLMessage::glClientActiveTexture;
+const GLMessage_Function GLMessage::glClipPlanef;
+const GLMessage_Function GLMessage::glClipPlanefIMG;
+const GLMessage_Function GLMessage::glClipPlanefOES;
+const GLMessage_Function GLMessage::glClipPlanex;
+const GLMessage_Function GLMessage::glClipPlanexIMG;
+const GLMessage_Function GLMessage::glClipPlanexOES;
+const GLMessage_Function GLMessage::glColor4f;
+const GLMessage_Function GLMessage::glColor4ub;
+const GLMessage_Function GLMessage::glColor4x;
+const GLMessage_Function GLMessage::glColor4xOES;
+const GLMessage_Function GLMessage::glColorMask;
+const GLMessage_Function GLMessage::glColorPointer;
+const GLMessage_Function GLMessage::glCompileShader;
+const GLMessage_Function GLMessage::glCompressedTexImage2D;
+const GLMessage_Function GLMessage::glCompressedTexImage3DOES;
+const GLMessage_Function GLMessage::glCompressedTexSubImage2D;
+const GLMessage_Function GLMessage::glCompressedTexSubImage3DOES;
+const GLMessage_Function GLMessage::glCopyTexImage2D;
+const GLMessage_Function GLMessage::glCopyTexSubImage2D;
+const GLMessage_Function GLMessage::glCopyTexSubImage3DOES;
+const GLMessage_Function GLMessage::glCoverageMaskNV;
+const GLMessage_Function GLMessage::glCoverageOperationNV;
+const GLMessage_Function GLMessage::glCreateProgram;
+const GLMessage_Function GLMessage::glCreateShader;
+const GLMessage_Function GLMessage::glCullFace;
+const GLMessage_Function GLMessage::glCurrentPaletteMatrixOES;
+const GLMessage_Function GLMessage::glDeleteBuffers;
+const GLMessage_Function GLMessage::glDeleteFencesNV;
+const GLMessage_Function GLMessage::glDeleteFramebuffers;
+const GLMessage_Function GLMessage::glDeleteFramebuffersOES;
+const GLMessage_Function GLMessage::glDeletePerfMonitorsAMD;
+const GLMessage_Function GLMessage::glDeleteProgram;
+const GLMessage_Function GLMessage::glDeleteRenderbuffers;
+const GLMessage_Function GLMessage::glDeleteRenderbuffersOES;
+const GLMessage_Function GLMessage::glDeleteShader;
+const GLMessage_Function GLMessage::glDeleteTextures;
+const GLMessage_Function GLMessage::glDeleteVertexArraysOES;
+const GLMessage_Function GLMessage::glDepthFunc;
+const GLMessage_Function GLMessage::glDepthMask;
+const GLMessage_Function GLMessage::glDepthRangef;
+const GLMessage_Function GLMessage::glDepthRangefOES;
+const GLMessage_Function GLMessage::glDepthRangex;
+const GLMessage_Function GLMessage::glDepthRangexOES;
+const GLMessage_Function GLMessage::glDetachShader;
+const GLMessage_Function GLMessage::glDisableClientState;
+const GLMessage_Function GLMessage::glDisableDriverControlQCOM;
+const GLMessage_Function GLMessage::glDisable;
+const GLMessage_Function GLMessage::glDisableVertexAttribArray;
+const GLMessage_Function GLMessage::glDiscardFramebufferEXT;
+const GLMessage_Function GLMessage::glDrawArrays;
+const GLMessage_Function GLMessage::glDrawElements;
+const GLMessage_Function GLMessage::glDrawTexfOES;
+const GLMessage_Function GLMessage::glDrawTexfvOES;
+const GLMessage_Function GLMessage::glDrawTexiOES;
+const GLMessage_Function GLMessage::glDrawTexivOES;
+const GLMessage_Function GLMessage::glDrawTexsOES;
+const GLMessage_Function GLMessage::glDrawTexsvOES;
+const GLMessage_Function GLMessage::glDrawTexxOES;
+const GLMessage_Function GLMessage::glDrawTexxvOES;
+const GLMessage_Function GLMessage::glEGLImageTargetRenderbufferStorageOES;
+const GLMessage_Function GLMessage::glEGLImageTargetTexture2DOES;
+const GLMessage_Function GLMessage::glEnableClientState;
+const GLMessage_Function GLMessage::glEnableDriverControlQCOM;
+const GLMessage_Function GLMessage::glEnable;
+const GLMessage_Function GLMessage::glEnableVertexAttribArray;
+const GLMessage_Function GLMessage::glEndPerfMonitorAMD;
+const GLMessage_Function GLMessage::glEndTilingQCOM;
+const GLMessage_Function GLMessage::glExtGetBufferPointervQCOM;
+const GLMessage_Function GLMessage::glExtGetBuffersQCOM;
+const GLMessage_Function GLMessage::glExtGetFramebuffersQCOM;
+const GLMessage_Function GLMessage::glExtGetProgramBinarySourceQCOM;
+const GLMessage_Function GLMessage::glExtGetProgramsQCOM;
+const GLMessage_Function GLMessage::glExtGetRenderbuffersQCOM;
+const GLMessage_Function GLMessage::glExtGetShadersQCOM;
+const GLMessage_Function GLMessage::glExtGetTexLevelParameterivQCOM;
+const GLMessage_Function GLMessage::glExtGetTexSubImageQCOM;
+const GLMessage_Function GLMessage::glExtGetTexturesQCOM;
+const GLMessage_Function GLMessage::glExtIsProgramBinaryQCOM;
+const GLMessage_Function GLMessage::glExtTexObjectStateOverrideiQCOM;
+const GLMessage_Function GLMessage::glFinishFenceNV;
+const GLMessage_Function GLMessage::glFinish;
+const GLMessage_Function GLMessage::glFlush;
+const GLMessage_Function GLMessage::glFogf;
+const GLMessage_Function GLMessage::glFogfv;
+const GLMessage_Function GLMessage::glFogx;
+const GLMessage_Function GLMessage::glFogxOES;
+const GLMessage_Function GLMessage::glFogxv;
+const GLMessage_Function GLMessage::glFogxvOES;
+const GLMessage_Function GLMessage::glFramebufferRenderbuffer;
+const GLMessage_Function GLMessage::glFramebufferRenderbufferOES;
+const GLMessage_Function GLMessage::glFramebufferTexture2D;
+const GLMessage_Function GLMessage::glFramebufferTexture2DMultisampleIMG;
+const GLMessage_Function GLMessage::glFramebufferTexture2DOES;
+const GLMessage_Function GLMessage::glFramebufferTexture3DOES;
+const GLMessage_Function GLMessage::glFrontFace;
+const GLMessage_Function GLMessage::glFrustumf;
+const GLMessage_Function GLMessage::glFrustumfOES;
+const GLMessage_Function GLMessage::glFrustumx;
+const GLMessage_Function GLMessage::glFrustumxOES;
+const GLMessage_Function GLMessage::glGenBuffers;
+const GLMessage_Function GLMessage::glGenerateMipmap;
+const GLMessage_Function GLMessage::glGenerateMipmapOES;
+const GLMessage_Function GLMessage::glGenFencesNV;
+const GLMessage_Function GLMessage::glGenFramebuffers;
+const GLMessage_Function GLMessage::glGenFramebuffersOES;
+const GLMessage_Function GLMessage::glGenPerfMonitorsAMD;
+const GLMessage_Function GLMessage::glGenRenderbuffers;
+const GLMessage_Function GLMessage::glGenRenderbuffersOES;
+const GLMessage_Function GLMessage::glGenTextures;
+const GLMessage_Function GLMessage::glGenVertexArraysOES;
+const GLMessage_Function GLMessage::glGetActiveAttrib;
+const GLMessage_Function GLMessage::glGetActiveUniform;
+const GLMessage_Function GLMessage::glGetAttachedShaders;
+const GLMessage_Function GLMessage::glGetAttribLocation;
+const GLMessage_Function GLMessage::glGetBooleanv;
+const GLMessage_Function GLMessage::glGetBufferParameteriv;
+const GLMessage_Function GLMessage::glGetBufferPointervOES;
+const GLMessage_Function GLMessage::glGetClipPlanef;
+const GLMessage_Function GLMessage::glGetClipPlanefOES;
+const GLMessage_Function GLMessage::glGetClipPlanex;
+const GLMessage_Function GLMessage::glGetClipPlanexOES;
+const GLMessage_Function GLMessage::glGetDriverControlsQCOM;
+const GLMessage_Function GLMessage::glGetDriverControlStringQCOM;
+const GLMessage_Function GLMessage::glGetError;
+const GLMessage_Function GLMessage::glGetFenceivNV;
+const GLMessage_Function GLMessage::glGetFixedv;
+const GLMessage_Function GLMessage::glGetFixedvOES;
+const GLMessage_Function GLMessage::glGetFloatv;
+const GLMessage_Function GLMessage::glGetFramebufferAttachmentParameteriv;
+const GLMessage_Function GLMessage::glGetFramebufferAttachmentParameterivOES;
+const GLMessage_Function GLMessage::glGetIntegerv;
+const GLMessage_Function GLMessage::glGetLightfv;
+const GLMessage_Function GLMessage::glGetLightxv;
+const GLMessage_Function GLMessage::glGetLightxvOES;
+const GLMessage_Function GLMessage::glGetMaterialfv;
+const GLMessage_Function GLMessage::glGetMaterialxv;
+const GLMessage_Function GLMessage::glGetMaterialxvOES;
+const GLMessage_Function GLMessage::glGetPerfMonitorCounterDataAMD;
+const GLMessage_Function GLMessage::glGetPerfMonitorCounterInfoAMD;
+const GLMessage_Function GLMessage::glGetPerfMonitorCountersAMD;
+const GLMessage_Function GLMessage::glGetPerfMonitorCounterStringAMD;
+const GLMessage_Function GLMessage::glGetPerfMonitorGroupsAMD;
+const GLMessage_Function GLMessage::glGetPerfMonitorGroupStringAMD;
+const GLMessage_Function GLMessage::glGetPointerv;
+const GLMessage_Function GLMessage::glGetProgramBinaryOES;
+const GLMessage_Function GLMessage::glGetProgramInfoLog;
+const GLMessage_Function GLMessage::glGetProgramiv;
+const GLMessage_Function GLMessage::glGetRenderbufferParameteriv;
+const GLMessage_Function GLMessage::glGetRenderbufferParameterivOES;
+const GLMessage_Function GLMessage::glGetShaderInfoLog;
+const GLMessage_Function GLMessage::glGetShaderiv;
+const GLMessage_Function GLMessage::glGetShaderPrecisionFormat;
+const GLMessage_Function GLMessage::glGetShaderSource;
+const GLMessage_Function GLMessage::glGetString;
+const GLMessage_Function GLMessage::glGetTexEnvfv;
+const GLMessage_Function GLMessage::glGetTexEnviv;
+const GLMessage_Function GLMessage::glGetTexEnvxv;
+const GLMessage_Function GLMessage::glGetTexEnvxvOES;
+const GLMessage_Function GLMessage::glGetTexGenfvOES;
+const GLMessage_Function GLMessage::glGetTexGenivOES;
+const GLMessage_Function GLMessage::glGetTexGenxvOES;
+const GLMessage_Function GLMessage::glGetTexParameterfv;
+const GLMessage_Function GLMessage::glGetTexParameteriv;
+const GLMessage_Function GLMessage::glGetTexParameterxv;
+const GLMessage_Function GLMessage::glGetTexParameterxvOES;
+const GLMessage_Function GLMessage::glGetUniformfv;
+const GLMessage_Function GLMessage::glGetUniformiv;
+const GLMessage_Function GLMessage::glGetUniformLocation;
+const GLMessage_Function GLMessage::glGetVertexAttribfv;
+const GLMessage_Function GLMessage::glGetVertexAttribiv;
+const GLMessage_Function GLMessage::glGetVertexAttribPointerv;
+const GLMessage_Function GLMessage::glHint;
+const GLMessage_Function GLMessage::glIsBuffer;
+const GLMessage_Function GLMessage::glIsEnabled;
+const GLMessage_Function GLMessage::glIsFenceNV;
+const GLMessage_Function GLMessage::glIsFramebuffer;
+const GLMessage_Function GLMessage::glIsFramebufferOES;
+const GLMessage_Function GLMessage::glIsProgram;
+const GLMessage_Function GLMessage::glIsRenderbuffer;
+const GLMessage_Function GLMessage::glIsRenderbufferOES;
+const GLMessage_Function GLMessage::glIsShader;
+const GLMessage_Function GLMessage::glIsTexture;
+const GLMessage_Function GLMessage::glIsVertexArrayOES;
+const GLMessage_Function GLMessage::glLightf;
+const GLMessage_Function GLMessage::glLightfv;
+const GLMessage_Function GLMessage::glLightModelf;
+const GLMessage_Function GLMessage::glLightModelfv;
+const GLMessage_Function GLMessage::glLightModelx;
+const GLMessage_Function GLMessage::glLightModelxOES;
+const GLMessage_Function GLMessage::glLightModelxv;
+const GLMessage_Function GLMessage::glLightModelxvOES;
+const GLMessage_Function GLMessage::glLightx;
+const GLMessage_Function GLMessage::glLightxOES;
+const GLMessage_Function GLMessage::glLightxv;
+const GLMessage_Function GLMessage::glLightxvOES;
+const GLMessage_Function GLMessage::glLineWidth;
+const GLMessage_Function GLMessage::glLineWidthx;
+const GLMessage_Function GLMessage::glLineWidthxOES;
+const GLMessage_Function GLMessage::glLinkProgram;
+const GLMessage_Function GLMessage::glLoadIdentity;
+const GLMessage_Function GLMessage::glLoadMatrixf;
+const GLMessage_Function GLMessage::glLoadMatrixx;
+const GLMessage_Function GLMessage::glLoadMatrixxOES;
+const GLMessage_Function GLMessage::glLoadPaletteFromModelViewMatrixOES;
+const GLMessage_Function GLMessage::glLogicOp;
+const GLMessage_Function GLMessage::glMapBufferOES;
+const GLMessage_Function GLMessage::glMaterialf;
+const GLMessage_Function GLMessage::glMaterialfv;
+const GLMessage_Function GLMessage::glMaterialx;
+const GLMessage_Function GLMessage::glMaterialxOES;
+const GLMessage_Function GLMessage::glMaterialxv;
+const GLMessage_Function GLMessage::glMaterialxvOES;
+const GLMessage_Function GLMessage::glMatrixIndexPointerOES;
+const GLMessage_Function GLMessage::glMatrixMode;
+const GLMessage_Function GLMessage::glMultiDrawArraysEXT;
+const GLMessage_Function GLMessage::glMultiDrawElementsEXT;
+const GLMessage_Function GLMessage::glMultiTexCoord4f;
+const GLMessage_Function GLMessage::glMultiTexCoord4x;
+const GLMessage_Function GLMessage::glMultiTexCoord4xOES;
+const GLMessage_Function GLMessage::glMultMatrixf;
+const GLMessage_Function GLMessage::glMultMatrixx;
+const GLMessage_Function GLMessage::glMultMatrixxOES;
+const GLMessage_Function GLMessage::glNormal3f;
+const GLMessage_Function GLMessage::glNormal3x;
+const GLMessage_Function GLMessage::glNormal3xOES;
+const GLMessage_Function GLMessage::glNormalPointer;
+const GLMessage_Function GLMessage::glOrthof;
+const GLMessage_Function GLMessage::glOrthofOES;
+const GLMessage_Function GLMessage::glOrthox;
+const GLMessage_Function GLMessage::glOrthoxOES;
+const GLMessage_Function GLMessage::glPixelStorei;
+const GLMessage_Function GLMessage::glPointParameterf;
+const GLMessage_Function GLMessage::glPointParameterfv;
+const GLMessage_Function GLMessage::glPointParameterx;
+const GLMessage_Function GLMessage::glPointParameterxOES;
+const GLMessage_Function GLMessage::glPointParameterxv;
+const GLMessage_Function GLMessage::glPointParameterxvOES;
+const GLMessage_Function GLMessage::glPointSize;
+const GLMessage_Function GLMessage::glPointSizePointerOES;
+const GLMessage_Function GLMessage::glPointSizex;
+const GLMessage_Function GLMessage::glPointSizexOES;
+const GLMessage_Function GLMessage::glPolygonOffset;
+const GLMessage_Function GLMessage::glPolygonOffsetx;
+const GLMessage_Function GLMessage::glPolygonOffsetxOES;
+const GLMessage_Function GLMessage::glPopMatrix;
+const GLMessage_Function GLMessage::glProgramBinaryOES;
+const GLMessage_Function GLMessage::glPushMatrix;
+const GLMessage_Function GLMessage::glQueryMatrixxOES;
+const GLMessage_Function GLMessage::glReadPixels;
+const GLMessage_Function GLMessage::glReleaseShaderCompiler;
+const GLMessage_Function GLMessage::glRenderbufferStorage;
+const GLMessage_Function GLMessage::glRenderbufferStorageMultisampleIMG;
+const GLMessage_Function GLMessage::glRenderbufferStorageOES;
+const GLMessage_Function GLMessage::glRotatef;
+const GLMessage_Function GLMessage::glRotatex;
+const GLMessage_Function GLMessage::glRotatexOES;
+const GLMessage_Function GLMessage::glSampleCoverage;
+const GLMessage_Function GLMessage::glSampleCoveragex;
+const GLMessage_Function GLMessage::glSampleCoveragexOES;
+const GLMessage_Function GLMessage::glScalef;
+const GLMessage_Function GLMessage::glScalex;
+const GLMessage_Function GLMessage::glScalexOES;
+const GLMessage_Function GLMessage::glScissor;
+const GLMessage_Function GLMessage::glSelectPerfMonitorCountersAMD;
+const GLMessage_Function GLMessage::glSetFenceNV;
+const GLMessage_Function GLMessage::glShadeModel;
+const GLMessage_Function GLMessage::glShaderBinary;
+const GLMessage_Function GLMessage::glShaderSource;
+const GLMessage_Function GLMessage::glStartTilingQCOM;
+const GLMessage_Function GLMessage::glStencilFunc;
+const GLMessage_Function GLMessage::glStencilFuncSeparate;
+const GLMessage_Function GLMessage::glStencilMask;
+const GLMessage_Function GLMessage::glStencilMaskSeparate;
+const GLMessage_Function GLMessage::glStencilOp;
+const GLMessage_Function GLMessage::glStencilOpSeparate;
+const GLMessage_Function GLMessage::glTestFenceNV;
+const GLMessage_Function GLMessage::glTexCoordPointer;
+const GLMessage_Function GLMessage::glTexEnvf;
+const GLMessage_Function GLMessage::glTexEnvfv;
+const GLMessage_Function GLMessage::glTexEnvi;
+const GLMessage_Function GLMessage::glTexEnviv;
+const GLMessage_Function GLMessage::glTexEnvx;
+const GLMessage_Function GLMessage::glTexEnvxOES;
+const GLMessage_Function GLMessage::glTexEnvxv;
+const GLMessage_Function GLMessage::glTexEnvxvOES;
+const GLMessage_Function GLMessage::glTexGenfOES;
+const GLMessage_Function GLMessage::glTexGenfvOES;
+const GLMessage_Function GLMessage::glTexGeniOES;
+const GLMessage_Function GLMessage::glTexGenivOES;
+const GLMessage_Function GLMessage::glTexGenxOES;
+const GLMessage_Function GLMessage::glTexGenxvOES;
+const GLMessage_Function GLMessage::glTexImage2D;
+const GLMessage_Function GLMessage::glTexImage3DOES;
+const GLMessage_Function GLMessage::glTexParameterf;
+const GLMessage_Function GLMessage::glTexParameterfv;
+const GLMessage_Function GLMessage::glTexParameteri;
+const GLMessage_Function GLMessage::glTexParameteriv;
+const GLMessage_Function GLMessage::glTexParameterx;
+const GLMessage_Function GLMessage::glTexParameterxOES;
+const GLMessage_Function GLMessage::glTexParameterxv;
+const GLMessage_Function GLMessage::glTexParameterxvOES;
+const GLMessage_Function GLMessage::glTexSubImage2D;
+const GLMessage_Function GLMessage::glTexSubImage3DOES;
+const GLMessage_Function GLMessage::glTranslatef;
+const GLMessage_Function GLMessage::glTranslatex;
+const GLMessage_Function GLMessage::glTranslatexOES;
+const GLMessage_Function GLMessage::glUniform1f;
+const GLMessage_Function GLMessage::glUniform1fv;
+const GLMessage_Function GLMessage::glUniform1i;
+const GLMessage_Function GLMessage::glUniform1iv;
+const GLMessage_Function GLMessage::glUniform2f;
+const GLMessage_Function GLMessage::glUniform2fv;
+const GLMessage_Function GLMessage::glUniform2i;
+const GLMessage_Function GLMessage::glUniform2iv;
+const GLMessage_Function GLMessage::glUniform3f;
+const GLMessage_Function GLMessage::glUniform3fv;
+const GLMessage_Function GLMessage::glUniform3i;
+const GLMessage_Function GLMessage::glUniform3iv;
+const GLMessage_Function GLMessage::glUniform4f;
+const GLMessage_Function GLMessage::glUniform4fv;
+const GLMessage_Function GLMessage::glUniform4i;
+const GLMessage_Function GLMessage::glUniform4iv;
+const GLMessage_Function GLMessage::glUniformMatrix2fv;
+const GLMessage_Function GLMessage::glUniformMatrix3fv;
+const GLMessage_Function GLMessage::glUniformMatrix4fv;
+const GLMessage_Function GLMessage::glUnmapBufferOES;
+const GLMessage_Function GLMessage::glUseProgram;
+const GLMessage_Function GLMessage::glValidateProgram;
+const GLMessage_Function GLMessage::glVertexAttrib1f;
+const GLMessage_Function GLMessage::glVertexAttrib1fv;
+const GLMessage_Function GLMessage::glVertexAttrib2f;
+const GLMessage_Function GLMessage::glVertexAttrib2fv;
+const GLMessage_Function GLMessage::glVertexAttrib3f;
+const GLMessage_Function GLMessage::glVertexAttrib3fv;
+const GLMessage_Function GLMessage::glVertexAttrib4f;
+const GLMessage_Function GLMessage::glVertexAttrib4fv;
+const GLMessage_Function GLMessage::glVertexAttribPointer;
+const GLMessage_Function GLMessage::glVertexPointer;
+const GLMessage_Function GLMessage::glViewport;
+const GLMessage_Function GLMessage::glWeightPointerOES;
+const GLMessage_Function GLMessage::eglGetDisplay;
+const GLMessage_Function GLMessage::eglInitialize;
+const GLMessage_Function GLMessage::eglTerminate;
+const GLMessage_Function GLMessage::eglGetConfigs;
+const GLMessage_Function GLMessage::eglChooseConfig;
+const GLMessage_Function GLMessage::eglGetConfigAttrib;
+const GLMessage_Function GLMessage::eglCreateWindowSurface;
+const GLMessage_Function GLMessage::eglCreatePixmapSurface;
+const GLMessage_Function GLMessage::eglCreatePbufferSurface;
+const GLMessage_Function GLMessage::eglDestroySurface;
+const GLMessage_Function GLMessage::eglQuerySurface;
+const GLMessage_Function GLMessage::eglCreateContext;
+const GLMessage_Function GLMessage::eglDestroyContext;
+const GLMessage_Function GLMessage::eglMakeCurrent;
+const GLMessage_Function GLMessage::eglGetCurrentContext;
+const GLMessage_Function GLMessage::eglGetCurrentSurface;
+const GLMessage_Function GLMessage::eglGetCurrentDisplay;
+const GLMessage_Function GLMessage::eglQueryContext;
+const GLMessage_Function GLMessage::eglWaitGL;
+const GLMessage_Function GLMessage::eglWaitNative;
+const GLMessage_Function GLMessage::eglSwapBuffers;
+const GLMessage_Function GLMessage::eglCopyBuffers;
+const GLMessage_Function GLMessage::eglGetError;
+const GLMessage_Function GLMessage::eglQueryString;
+const GLMessage_Function GLMessage::eglGetProcAddress;
+const GLMessage_Function GLMessage::eglSurfaceAttrib;
+const GLMessage_Function GLMessage::eglBindTexImage;
+const GLMessage_Function GLMessage::eglReleaseTexImage;
+const GLMessage_Function GLMessage::eglSwapInterval;
+const GLMessage_Function GLMessage::eglBindAPI;
+const GLMessage_Function GLMessage::eglQueryAPI;
+const GLMessage_Function GLMessage::eglWaitClient;
+const GLMessage_Function GLMessage::eglReleaseThread;
+const GLMessage_Function GLMessage::eglCreatePbufferFromClientBuffer;
+const GLMessage_Function GLMessage::eglLockSurfaceKHR;
+const GLMessage_Function GLMessage::eglUnlockSurfaceKHR;
+const GLMessage_Function GLMessage::eglCreateImageKHR;
+const GLMessage_Function GLMessage::eglDestroyImageKHR;
+const GLMessage_Function GLMessage::eglCreateSyncKHR;
+const GLMessage_Function GLMessage::eglDestroySyncKHR;
+const GLMessage_Function GLMessage::eglClientWaitSyncKHR;
+const GLMessage_Function GLMessage::eglGetSyncAttribKHR;
+const GLMessage_Function GLMessage::eglSetSwapRectangleANDROID;
+const GLMessage_Function GLMessage::eglGetRenderBufferANDROID;
+const GLMessage_Function GLMessage::eglGetSystemTimeFrequencyNV;
+const GLMessage_Function GLMessage::eglGetSystemTimeNV;
+const GLMessage_Function GLMessage::invalid;
+const GLMessage_Function GLMessage::frameBufferContents;
+const GLMessage_Function GLMessage::Function_MIN;
+const GLMessage_Function GLMessage::Function_MAX;
+const int GLMessage::Function_ARRAYSIZE;
+#endif // _MSC_VER
+bool GLMessage_DataType_Type_IsValid(int value) {
+ switch(value) {
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ return true;
+ default:
+ return false;
+ }
+}
+
+#ifndef _MSC_VER
+const GLMessage_DataType_Type GLMessage_DataType::VOID;
+const GLMessage_DataType_Type GLMessage_DataType::CHAR;
+const GLMessage_DataType_Type GLMessage_DataType::BYTE;
+const GLMessage_DataType_Type GLMessage_DataType::INT;
+const GLMessage_DataType_Type GLMessage_DataType::FLOAT;
+const GLMessage_DataType_Type GLMessage_DataType::BOOL;
+const GLMessage_DataType_Type GLMessage_DataType::ENUM;
+const GLMessage_DataType_Type GLMessage_DataType::Type_MIN;
+const GLMessage_DataType_Type GLMessage_DataType::Type_MAX;
+const int GLMessage_DataType::Type_ARRAYSIZE;
+#endif // _MSC_VER
+#ifndef _MSC_VER
+const int GLMessage_DataType::kTypeFieldNumber;
+const int GLMessage_DataType::kIsArrayFieldNumber;
+const int GLMessage_DataType::kIntValueFieldNumber;
+const int GLMessage_DataType::kFloatValueFieldNumber;
+const int GLMessage_DataType::kCharValueFieldNumber;
+const int GLMessage_DataType::kRawBytesFieldNumber;
+const int GLMessage_DataType::kBoolValueFieldNumber;
+#endif // !_MSC_VER
+
+GLMessage_DataType::GLMessage_DataType()
+ : ::google::protobuf::MessageLite() {
+ SharedCtor();
+}
+
+void GLMessage_DataType::InitAsDefaultInstance() {
+}
+
+GLMessage_DataType::GLMessage_DataType(const GLMessage_DataType& from)
+ : ::google::protobuf::MessageLite() {
+ SharedCtor();
+ MergeFrom(from);
+}
+
+void GLMessage_DataType::SharedCtor() {
+ _cached_size_ = 0;
+ type_ = 1;
+ isarray_ = false;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+GLMessage_DataType::~GLMessage_DataType() {
+ SharedDtor();
+}
+
+void GLMessage_DataType::SharedDtor() {
+ if (this != default_instance_) {
+ }
+}
+
+void GLMessage_DataType::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const GLMessage_DataType& GLMessage_DataType::default_instance() {
+ if (default_instance_ == NULL) protobuf_AddDesc_gltrace_2eproto(); return *default_instance_;
+}
+
+GLMessage_DataType* GLMessage_DataType::default_instance_ = NULL;
+
+GLMessage_DataType* GLMessage_DataType::New() const {
+ return new GLMessage_DataType;
+}
+
+void GLMessage_DataType::Clear() {
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ type_ = 1;
+ isarray_ = false;
+ }
+ intvalue_.Clear();
+ floatvalue_.Clear();
+ charvalue_.Clear();
+ rawbytes_.Clear();
+ boolvalue_.Clear();
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+bool GLMessage_DataType::MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input) {
+#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
+ ::google::protobuf::uint32 tag;
+ while ((tag = input->ReadTag()) != 0) {
+ switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
+ // required .android.gltrace.GLMessage.DataType.Type type = 1 [default = VOID];
+ case 1: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ int value;
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
+ input, &value)));
+ if (::android::gltrace::GLMessage_DataType_Type_IsValid(value)) {
+ set_type(static_cast< ::android::gltrace::GLMessage_DataType_Type >(value));
+ }
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(16)) goto parse_isArray;
+ break;
+ }
+
+ // required bool isArray = 2 [default = false];
+ case 2: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_isArray:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
+ input, &isarray_)));
+ _set_bit(1);
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(24)) goto parse_intValue;
+ break;
+ }
+
+ // repeated int32 intValue = 3;
+ case 3: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_intValue:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ 1, 24, input, this->mutable_intvalue())));
+ } else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
+ == ::google::protobuf::internal::WireFormatLite::
+ WIRETYPE_LENGTH_DELIMITED) {
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, this->mutable_intvalue())));
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(24)) goto parse_intValue;
+ if (input->ExpectTag(37)) goto parse_floatValue;
+ break;
+ }
+
+ // repeated float floatValue = 4;
+ case 4: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
+ parse_floatValue:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
+ float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
+ 1, 37, input, this->mutable_floatvalue())));
+ } else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
+ == ::google::protobuf::internal::WireFormatLite::
+ WIRETYPE_LENGTH_DELIMITED) {
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
+ float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
+ input, this->mutable_floatvalue())));
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(37)) goto parse_floatValue;
+ if (input->ExpectTag(42)) goto parse_charValue;
+ break;
+ }
+
+ // repeated bytes charValue = 5;
+ case 5: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_charValue:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
+ input, this->add_charvalue()));
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(42)) goto parse_charValue;
+ if (input->ExpectTag(50)) goto parse_rawBytes;
+ break;
+ }
+
+ // repeated bytes rawBytes = 6;
+ case 6: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_rawBytes:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
+ input, this->add_rawbytes()));
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(50)) goto parse_rawBytes;
+ if (input->ExpectTag(56)) goto parse_boolValue;
+ break;
+ }
+
+ // repeated bool boolValue = 7;
+ case 7: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_boolValue:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
+ bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
+ 1, 56, input, this->mutable_boolvalue())));
+ } else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
+ == ::google::protobuf::internal::WireFormatLite::
+ WIRETYPE_LENGTH_DELIMITED) {
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
+ bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
+ input, this->mutable_boolvalue())));
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(56)) goto parse_boolValue;
+ if (input->ExpectAtEnd()) return true;
+ break;
+ }
+
+ default: {
+ handle_uninterpreted:
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
+ return true;
+ }
+ DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
+ break;
+ }
+ }
+ }
+ return true;
+#undef DO_
+}
+
+void GLMessage_DataType::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // required .android.gltrace.GLMessage.DataType.Type type = 1 [default = VOID];
+ if (_has_bit(0)) {
+ ::google::protobuf::internal::WireFormatLite::WriteEnum(
+ 1, this->type(), output);
+ }
+
+ // required bool isArray = 2 [default = false];
+ if (_has_bit(1)) {
+ ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->isarray(), output);
+ }
+
+ // repeated int32 intValue = 3;
+ for (int i = 0; i < this->intvalue_size(); i++) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(
+ 3, this->intvalue(i), output);
+ }
+
+ // repeated float floatValue = 4;
+ for (int i = 0; i < this->floatvalue_size(); i++) {
+ ::google::protobuf::internal::WireFormatLite::WriteFloat(
+ 4, this->floatvalue(i), output);
+ }
+
+ // repeated bytes charValue = 5;
+ for (int i = 0; i < this->charvalue_size(); i++) {
+ ::google::protobuf::internal::WireFormatLite::WriteBytes(
+ 5, this->charvalue(i), output);
+ }
+
+ // repeated bytes rawBytes = 6;
+ for (int i = 0; i < this->rawbytes_size(); i++) {
+ ::google::protobuf::internal::WireFormatLite::WriteBytes(
+ 6, this->rawbytes(i), output);
+ }
+
+ // repeated bool boolValue = 7;
+ for (int i = 0; i < this->boolvalue_size(); i++) {
+ ::google::protobuf::internal::WireFormatLite::WriteBool(
+ 7, this->boolvalue(i), output);
+ }
+
+}
+
+int GLMessage_DataType::ByteSize() const {
+ int total_size = 0;
+
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ // required .android.gltrace.GLMessage.DataType.Type type = 1 [default = VOID];
+ if (has_type()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::EnumSize(this->type());
+ }
+
+ // required bool isArray = 2 [default = false];
+ if (has_isarray()) {
+ total_size += 1 + 1;
+ }
+
+ }
+ // repeated int32 intValue = 3;
+ {
+ int data_size = 0;
+ for (int i = 0; i < this->intvalue_size(); i++) {
+ data_size += ::google::protobuf::internal::WireFormatLite::
+ Int32Size(this->intvalue(i));
+ }
+ total_size += 1 * this->intvalue_size() + data_size;
+ }
+
+ // repeated float floatValue = 4;
+ {
+ int data_size = 0;
+ data_size = 4 * this->floatvalue_size();
+ total_size += 1 * this->floatvalue_size() + data_size;
+ }
+
+ // repeated bytes charValue = 5;
+ total_size += 1 * this->charvalue_size();
+ for (int i = 0; i < this->charvalue_size(); i++) {
+ total_size += ::google::protobuf::internal::WireFormatLite::BytesSize(
+ this->charvalue(i));
+ }
+
+ // repeated bytes rawBytes = 6;
+ total_size += 1 * this->rawbytes_size();
+ for (int i = 0; i < this->rawbytes_size(); i++) {
+ total_size += ::google::protobuf::internal::WireFormatLite::BytesSize(
+ this->rawbytes(i));
+ }
+
+ // repeated bool boolValue = 7;
+ {
+ int data_size = 0;
+ data_size = 1 * this->boolvalue_size();
+ total_size += 1 * this->boolvalue_size() + data_size;
+ }
+
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = total_size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+ return total_size;
+}
+
+void GLMessage_DataType::CheckTypeAndMergeFrom(
+ const ::google::protobuf::MessageLite& from) {
+ MergeFrom(*::google::protobuf::down_cast<const GLMessage_DataType*>(&from));
+}
+
+void GLMessage_DataType::MergeFrom(const GLMessage_DataType& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ intvalue_.MergeFrom(from.intvalue_);
+ floatvalue_.MergeFrom(from.floatvalue_);
+ charvalue_.MergeFrom(from.charvalue_);
+ rawbytes_.MergeFrom(from.rawbytes_);
+ boolvalue_.MergeFrom(from.boolvalue_);
+ if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (from._has_bit(0)) {
+ set_type(from.type());
+ }
+ if (from._has_bit(1)) {
+ set_isarray(from.isarray());
+ }
+ }
+}
+
+void GLMessage_DataType::CopyFrom(const GLMessage_DataType& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool GLMessage_DataType::IsInitialized() const {
+ if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;
+
+ return true;
+}
+
+void GLMessage_DataType::Swap(GLMessage_DataType* other) {
+ if (other != this) {
+ std::swap(type_, other->type_);
+ std::swap(isarray_, other->isarray_);
+ intvalue_.Swap(&other->intvalue_);
+ floatvalue_.Swap(&other->floatvalue_);
+ charvalue_.Swap(&other->charvalue_);
+ rawbytes_.Swap(&other->rawbytes_);
+ boolvalue_.Swap(&other->boolvalue_);
+ std::swap(_has_bits_[0], other->_has_bits_[0]);
+ std::swap(_cached_size_, other->_cached_size_);
+ }
+}
+
+::std::string GLMessage_DataType::GetTypeName() const {
+ return "android.gltrace.GLMessage.DataType";
+}
+
+
+// -------------------------------------------------------------------
+
+#ifndef _MSC_VER
+const int GLMessage::kContextIdFieldNumber;
+const int GLMessage::kFunctionFieldNumber;
+const int GLMessage::kArgsFieldNumber;
+const int GLMessage::kReturnValueFieldNumber;
+const int GLMessage::kDurationFieldNumber;
+#endif // !_MSC_VER
+
+GLMessage::GLMessage()
+ : ::google::protobuf::MessageLite() {
+ SharedCtor();
+}
+
+void GLMessage::InitAsDefaultInstance() {
+ returnvalue_ = const_cast< ::android::gltrace::GLMessage_DataType*>(&::android::gltrace::GLMessage_DataType::default_instance());
+}
+
+GLMessage::GLMessage(const GLMessage& from)
+ : ::google::protobuf::MessageLite() {
+ SharedCtor();
+ MergeFrom(from);
+}
+
+void GLMessage::SharedCtor() {
+ _cached_size_ = 0;
+ context_id_ = 0;
+ function_ = 3000;
+ returnvalue_ = NULL;
+ duration_ = 0;
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+GLMessage::~GLMessage() {
+ SharedDtor();
+}
+
+void GLMessage::SharedDtor() {
+ if (this != default_instance_) {
+ delete returnvalue_;
+ }
+}
+
+void GLMessage::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const GLMessage& GLMessage::default_instance() {
+ if (default_instance_ == NULL) protobuf_AddDesc_gltrace_2eproto(); return *default_instance_;
+}
+
+GLMessage* GLMessage::default_instance_ = NULL;
+
+GLMessage* GLMessage::New() const {
+ return new GLMessage;
+}
+
+void GLMessage::Clear() {
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ context_id_ = 0;
+ function_ = 3000;
+ if (_has_bit(3)) {
+ if (returnvalue_ != NULL) returnvalue_->::android::gltrace::GLMessage_DataType::Clear();
+ }
+ duration_ = 0;
+ }
+ args_.Clear();
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+bool GLMessage::MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input) {
+#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
+ ::google::protobuf::uint32 tag;
+ while ((tag = input->ReadTag()) != 0) {
+ switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
+ // required int32 context_id = 1;
+ case 1: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+ input, &context_id_)));
+ _set_bit(0);
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(16)) goto parse_function;
+ break;
+ }
+
+ // required .android.gltrace.GLMessage.Function function = 2 [default = invalid];
+ case 2: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_function:
+ int value;
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
+ input, &value)));
+ if (::android::gltrace::GLMessage_Function_IsValid(value)) {
+ set_function(static_cast< ::android::gltrace::GLMessage_Function >(value));
+ }
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(26)) goto parse_args;
+ break;
+ }
+
+ // repeated .android.gltrace.GLMessage.DataType args = 3;
+ case 3: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_args:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+ input, add_args()));
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(26)) goto parse_args;
+ if (input->ExpectTag(34)) goto parse_returnValue;
+ break;
+ }
+
+ // optional .android.gltrace.GLMessage.DataType returnValue = 4;
+ case 4: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_returnValue:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+ input, mutable_returnvalue()));
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(45)) goto parse_duration;
+ break;
+ }
+
+ // optional float duration = 5;
+ case 5: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
+ parse_duration:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
+ input, &duration_)));
+ _set_bit(4);
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectAtEnd()) return true;
+ break;
+ }
+
+ default: {
+ handle_uninterpreted:
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
+ return true;
+ }
+ DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
+ break;
+ }
+ }
+ }
+ return true;
+#undef DO_
+}
+
+void GLMessage::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // required int32 context_id = 1;
+ if (_has_bit(0)) {
+ ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->context_id(), output);
+ }
+
+ // required .android.gltrace.GLMessage.Function function = 2 [default = invalid];
+ if (_has_bit(1)) {
+ ::google::protobuf::internal::WireFormatLite::WriteEnum(
+ 2, this->function(), output);
+ }
+
+ // repeated .android.gltrace.GLMessage.DataType args = 3;
+ for (int i = 0; i < this->args_size(); i++) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessage(
+ 3, this->args(i), output);
+ }
+
+ // optional .android.gltrace.GLMessage.DataType returnValue = 4;
+ if (_has_bit(3)) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessage(
+ 4, this->returnvalue(), output);
+ }
+
+ // optional float duration = 5;
+ if (_has_bit(4)) {
+ ::google::protobuf::internal::WireFormatLite::WriteFloat(5, this->duration(), output);
+ }
+
+}
+
+int GLMessage::ByteSize() const {
+ int total_size = 0;
+
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ // required int32 context_id = 1;
+ if (has_context_id()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::Int32Size(
+ this->context_id());
+ }
+
+ // required .android.gltrace.GLMessage.Function function = 2 [default = invalid];
+ if (has_function()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::EnumSize(this->function());
+ }
+
+ // optional .android.gltrace.GLMessage.DataType returnValue = 4;
+ if (has_returnvalue()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ this->returnvalue());
+ }
+
+ // optional float duration = 5;
+ if (has_duration()) {
+ total_size += 1 + 4;
+ }
+
+ }
+ // repeated .android.gltrace.GLMessage.DataType args = 3;
+ total_size += 1 * this->args_size();
+ for (int i = 0; i < this->args_size(); i++) {
+ total_size +=
+ ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ this->args(i));
+ }
+
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = total_size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+ return total_size;
+}
+
+void GLMessage::CheckTypeAndMergeFrom(
+ const ::google::protobuf::MessageLite& from) {
+ MergeFrom(*::google::protobuf::down_cast<const GLMessage*>(&from));
+}
+
+void GLMessage::MergeFrom(const GLMessage& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ args_.MergeFrom(from.args_);
+ if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (from._has_bit(0)) {
+ set_context_id(from.context_id());
+ }
+ if (from._has_bit(1)) {
+ set_function(from.function());
+ }
+ if (from._has_bit(3)) {
+ mutable_returnvalue()->::android::gltrace::GLMessage_DataType::MergeFrom(from.returnvalue());
+ }
+ if (from._has_bit(4)) {
+ set_duration(from.duration());
+ }
+ }
+}
+
+void GLMessage::CopyFrom(const GLMessage& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool GLMessage::IsInitialized() const {
+ if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;
+
+ for (int i = 0; i < args_size(); i++) {
+ if (!this->args(i).IsInitialized()) return false;
+ }
+ if (has_returnvalue()) {
+ if (!this->returnvalue().IsInitialized()) return false;
+ }
+ return true;
+}
+
+void GLMessage::Swap(GLMessage* other) {
+ if (other != this) {
+ std::swap(context_id_, other->context_id_);
+ std::swap(function_, other->function_);
+ args_.Swap(&other->args_);
+ std::swap(returnvalue_, other->returnvalue_);
+ std::swap(duration_, other->duration_);
+ std::swap(_has_bits_[0], other->_has_bits_[0]);
+ std::swap(_cached_size_, other->_cached_size_);
+ }
+}
+
+::std::string GLMessage::GetTypeName() const {
+ return "android.gltrace.GLMessage";
+}
+
+
+// @@protoc_insertion_point(namespace_scope)
+
+} // namespace gltrace
+} // namespace android
+
+// @@protoc_insertion_point(global_scope)
diff --git a/opengl/libs/GLES_trace/src/gltrace.pb.h b/opengl/libs/GLES_trace/src/gltrace.pb.h
new file mode 100644
index 0000000..be5ca2a
--- /dev/null
+++ b/opengl/libs/GLES_trace/src/gltrace.pb.h
@@ -0,0 +1,1516 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: gltrace.proto
+
+#ifndef PROTOBUF_gltrace_2eproto__INCLUDED
+#define PROTOBUF_gltrace_2eproto__INCLUDED
+
+#include <string>
+
+#include <google/protobuf/stubs/common.h>
+
+#if GOOGLE_PROTOBUF_VERSION < 2003000
+#error This file was generated by a newer version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please update
+#error your headers.
+#endif
+#if 2003000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#error This file was generated by an older version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please
+#error regenerate this file with a newer version of protoc.
+#endif
+
+#include <google/protobuf/generated_message_util.h>
+#include <google/protobuf/repeated_field.h>
+#include <google/protobuf/extension_set.h>
+// @@protoc_insertion_point(includes)
+
+namespace android {
+namespace gltrace {
+
+// Internal implementation detail -- do not call these.
+void protobuf_AddDesc_gltrace_2eproto();
+void protobuf_AssignDesc_gltrace_2eproto();
+void protobuf_ShutdownFile_gltrace_2eproto();
+
+class GLMessage;
+class GLMessage_DataType;
+
+enum GLMessage_DataType_Type {
+ GLMessage_DataType_Type_VOID = 1,
+ GLMessage_DataType_Type_CHAR = 2,
+ GLMessage_DataType_Type_BYTE = 3,
+ GLMessage_DataType_Type_INT = 4,
+ GLMessage_DataType_Type_FLOAT = 5,
+ GLMessage_DataType_Type_BOOL = 6,
+ GLMessage_DataType_Type_ENUM = 7
+};
+bool GLMessage_DataType_Type_IsValid(int value);
+const GLMessage_DataType_Type GLMessage_DataType_Type_Type_MIN = GLMessage_DataType_Type_VOID;
+const GLMessage_DataType_Type GLMessage_DataType_Type_Type_MAX = GLMessage_DataType_Type_ENUM;
+const int GLMessage_DataType_Type_Type_ARRAYSIZE = GLMessage_DataType_Type_Type_MAX + 1;
+
+enum GLMessage_Function {
+ GLMessage_Function_glActiveTexture = 0,
+ GLMessage_Function_glAlphaFunc = 1,
+ GLMessage_Function_glAlphaFuncx = 2,
+ GLMessage_Function_glAlphaFuncxOES = 3,
+ GLMessage_Function_glAttachShader = 4,
+ GLMessage_Function_glBeginPerfMonitorAMD = 5,
+ GLMessage_Function_glBindAttribLocation = 6,
+ GLMessage_Function_glBindBuffer = 7,
+ GLMessage_Function_glBindFramebuffer = 8,
+ GLMessage_Function_glBindFramebufferOES = 9,
+ GLMessage_Function_glBindRenderbuffer = 10,
+ GLMessage_Function_glBindRenderbufferOES = 11,
+ GLMessage_Function_glBindTexture = 12,
+ GLMessage_Function_glBindVertexArrayOES = 13,
+ GLMessage_Function_glBlendColor = 14,
+ GLMessage_Function_glBlendEquation = 15,
+ GLMessage_Function_glBlendEquationOES = 16,
+ GLMessage_Function_glBlendEquationSeparate = 17,
+ GLMessage_Function_glBlendEquationSeparateOES = 18,
+ GLMessage_Function_glBlendFunc = 19,
+ GLMessage_Function_glBlendFuncSeparate = 20,
+ GLMessage_Function_glBlendFuncSeparateOES = 21,
+ GLMessage_Function_glBufferData = 22,
+ GLMessage_Function_glBufferSubData = 23,
+ GLMessage_Function_glCheckFramebufferStatus = 24,
+ GLMessage_Function_glCheckFramebufferStatusOES = 25,
+ GLMessage_Function_glClearColor = 26,
+ GLMessage_Function_glClearColorx = 27,
+ GLMessage_Function_glClearColorxOES = 28,
+ GLMessage_Function_glClearDepthf = 29,
+ GLMessage_Function_glClearDepthfOES = 30,
+ GLMessage_Function_glClearDepthx = 31,
+ GLMessage_Function_glClearDepthxOES = 32,
+ GLMessage_Function_glClear = 33,
+ GLMessage_Function_glClearStencil = 34,
+ GLMessage_Function_glClientActiveTexture = 35,
+ GLMessage_Function_glClipPlanef = 36,
+ GLMessage_Function_glClipPlanefIMG = 37,
+ GLMessage_Function_glClipPlanefOES = 38,
+ GLMessage_Function_glClipPlanex = 39,
+ GLMessage_Function_glClipPlanexIMG = 40,
+ GLMessage_Function_glClipPlanexOES = 41,
+ GLMessage_Function_glColor4f = 42,
+ GLMessage_Function_glColor4ub = 43,
+ GLMessage_Function_glColor4x = 44,
+ GLMessage_Function_glColor4xOES = 45,
+ GLMessage_Function_glColorMask = 46,
+ GLMessage_Function_glColorPointer = 47,
+ GLMessage_Function_glCompileShader = 48,
+ GLMessage_Function_glCompressedTexImage2D = 49,
+ GLMessage_Function_glCompressedTexImage3DOES = 50,
+ GLMessage_Function_glCompressedTexSubImage2D = 51,
+ GLMessage_Function_glCompressedTexSubImage3DOES = 52,
+ GLMessage_Function_glCopyTexImage2D = 53,
+ GLMessage_Function_glCopyTexSubImage2D = 54,
+ GLMessage_Function_glCopyTexSubImage3DOES = 55,
+ GLMessage_Function_glCoverageMaskNV = 56,
+ GLMessage_Function_glCoverageOperationNV = 57,
+ GLMessage_Function_glCreateProgram = 58,
+ GLMessage_Function_glCreateShader = 59,
+ GLMessage_Function_glCullFace = 60,
+ GLMessage_Function_glCurrentPaletteMatrixOES = 61,
+ GLMessage_Function_glDeleteBuffers = 62,
+ GLMessage_Function_glDeleteFencesNV = 63,
+ GLMessage_Function_glDeleteFramebuffers = 64,
+ GLMessage_Function_glDeleteFramebuffersOES = 65,
+ GLMessage_Function_glDeletePerfMonitorsAMD = 66,
+ GLMessage_Function_glDeleteProgram = 67,
+ GLMessage_Function_glDeleteRenderbuffers = 68,
+ GLMessage_Function_glDeleteRenderbuffersOES = 69,
+ GLMessage_Function_glDeleteShader = 70,
+ GLMessage_Function_glDeleteTextures = 71,
+ GLMessage_Function_glDeleteVertexArraysOES = 72,
+ GLMessage_Function_glDepthFunc = 73,
+ GLMessage_Function_glDepthMask = 74,
+ GLMessage_Function_glDepthRangef = 75,
+ GLMessage_Function_glDepthRangefOES = 76,
+ GLMessage_Function_glDepthRangex = 77,
+ GLMessage_Function_glDepthRangexOES = 78,
+ GLMessage_Function_glDetachShader = 79,
+ GLMessage_Function_glDisableClientState = 80,
+ GLMessage_Function_glDisableDriverControlQCOM = 81,
+ GLMessage_Function_glDisable = 82,
+ GLMessage_Function_glDisableVertexAttribArray = 83,
+ GLMessage_Function_glDiscardFramebufferEXT = 84,
+ GLMessage_Function_glDrawArrays = 85,
+ GLMessage_Function_glDrawElements = 86,
+ GLMessage_Function_glDrawTexfOES = 87,
+ GLMessage_Function_glDrawTexfvOES = 88,
+ GLMessage_Function_glDrawTexiOES = 89,
+ GLMessage_Function_glDrawTexivOES = 90,
+ GLMessage_Function_glDrawTexsOES = 91,
+ GLMessage_Function_glDrawTexsvOES = 92,
+ GLMessage_Function_glDrawTexxOES = 93,
+ GLMessage_Function_glDrawTexxvOES = 94,
+ GLMessage_Function_glEGLImageTargetRenderbufferStorageOES = 95,
+ GLMessage_Function_glEGLImageTargetTexture2DOES = 96,
+ GLMessage_Function_glEnableClientState = 97,
+ GLMessage_Function_glEnableDriverControlQCOM = 98,
+ GLMessage_Function_glEnable = 99,
+ GLMessage_Function_glEnableVertexAttribArray = 100,
+ GLMessage_Function_glEndPerfMonitorAMD = 101,
+ GLMessage_Function_glEndTilingQCOM = 102,
+ GLMessage_Function_glExtGetBufferPointervQCOM = 103,
+ GLMessage_Function_glExtGetBuffersQCOM = 104,
+ GLMessage_Function_glExtGetFramebuffersQCOM = 105,
+ GLMessage_Function_glExtGetProgramBinarySourceQCOM = 106,
+ GLMessage_Function_glExtGetProgramsQCOM = 107,
+ GLMessage_Function_glExtGetRenderbuffersQCOM = 108,
+ GLMessage_Function_glExtGetShadersQCOM = 109,
+ GLMessage_Function_glExtGetTexLevelParameterivQCOM = 110,
+ GLMessage_Function_glExtGetTexSubImageQCOM = 111,
+ GLMessage_Function_glExtGetTexturesQCOM = 112,
+ GLMessage_Function_glExtIsProgramBinaryQCOM = 113,
+ GLMessage_Function_glExtTexObjectStateOverrideiQCOM = 114,
+ GLMessage_Function_glFinishFenceNV = 115,
+ GLMessage_Function_glFinish = 116,
+ GLMessage_Function_glFlush = 117,
+ GLMessage_Function_glFogf = 118,
+ GLMessage_Function_glFogfv = 119,
+ GLMessage_Function_glFogx = 120,
+ GLMessage_Function_glFogxOES = 121,
+ GLMessage_Function_glFogxv = 122,
+ GLMessage_Function_glFogxvOES = 123,
+ GLMessage_Function_glFramebufferRenderbuffer = 124,
+ GLMessage_Function_glFramebufferRenderbufferOES = 125,
+ GLMessage_Function_glFramebufferTexture2D = 126,
+ GLMessage_Function_glFramebufferTexture2DMultisampleIMG = 127,
+ GLMessage_Function_glFramebufferTexture2DOES = 128,
+ GLMessage_Function_glFramebufferTexture3DOES = 129,
+ GLMessage_Function_glFrontFace = 130,
+ GLMessage_Function_glFrustumf = 131,
+ GLMessage_Function_glFrustumfOES = 132,
+ GLMessage_Function_glFrustumx = 133,
+ GLMessage_Function_glFrustumxOES = 134,
+ GLMessage_Function_glGenBuffers = 135,
+ GLMessage_Function_glGenerateMipmap = 136,
+ GLMessage_Function_glGenerateMipmapOES = 137,
+ GLMessage_Function_glGenFencesNV = 138,
+ GLMessage_Function_glGenFramebuffers = 139,
+ GLMessage_Function_glGenFramebuffersOES = 140,
+ GLMessage_Function_glGenPerfMonitorsAMD = 141,
+ GLMessage_Function_glGenRenderbuffers = 142,
+ GLMessage_Function_glGenRenderbuffersOES = 143,
+ GLMessage_Function_glGenTextures = 144,
+ GLMessage_Function_glGenVertexArraysOES = 145,
+ GLMessage_Function_glGetActiveAttrib = 146,
+ GLMessage_Function_glGetActiveUniform = 147,
+ GLMessage_Function_glGetAttachedShaders = 148,
+ GLMessage_Function_glGetAttribLocation = 149,
+ GLMessage_Function_glGetBooleanv = 150,
+ GLMessage_Function_glGetBufferParameteriv = 151,
+ GLMessage_Function_glGetBufferPointervOES = 152,
+ GLMessage_Function_glGetClipPlanef = 153,
+ GLMessage_Function_glGetClipPlanefOES = 154,
+ GLMessage_Function_glGetClipPlanex = 155,
+ GLMessage_Function_glGetClipPlanexOES = 156,
+ GLMessage_Function_glGetDriverControlsQCOM = 157,
+ GLMessage_Function_glGetDriverControlStringQCOM = 158,
+ GLMessage_Function_glGetError = 159,
+ GLMessage_Function_glGetFenceivNV = 160,
+ GLMessage_Function_glGetFixedv = 161,
+ GLMessage_Function_glGetFixedvOES = 162,
+ GLMessage_Function_glGetFloatv = 163,
+ GLMessage_Function_glGetFramebufferAttachmentParameteriv = 164,
+ GLMessage_Function_glGetFramebufferAttachmentParameterivOES = 165,
+ GLMessage_Function_glGetIntegerv = 166,
+ GLMessage_Function_glGetLightfv = 167,
+ GLMessage_Function_glGetLightxv = 168,
+ GLMessage_Function_glGetLightxvOES = 169,
+ GLMessage_Function_glGetMaterialfv = 170,
+ GLMessage_Function_glGetMaterialxv = 171,
+ GLMessage_Function_glGetMaterialxvOES = 172,
+ GLMessage_Function_glGetPerfMonitorCounterDataAMD = 173,
+ GLMessage_Function_glGetPerfMonitorCounterInfoAMD = 174,
+ GLMessage_Function_glGetPerfMonitorCountersAMD = 175,
+ GLMessage_Function_glGetPerfMonitorCounterStringAMD = 176,
+ GLMessage_Function_glGetPerfMonitorGroupsAMD = 177,
+ GLMessage_Function_glGetPerfMonitorGroupStringAMD = 178,
+ GLMessage_Function_glGetPointerv = 179,
+ GLMessage_Function_glGetProgramBinaryOES = 180,
+ GLMessage_Function_glGetProgramInfoLog = 181,
+ GLMessage_Function_glGetProgramiv = 182,
+ GLMessage_Function_glGetRenderbufferParameteriv = 183,
+ GLMessage_Function_glGetRenderbufferParameterivOES = 184,
+ GLMessage_Function_glGetShaderInfoLog = 185,
+ GLMessage_Function_glGetShaderiv = 186,
+ GLMessage_Function_glGetShaderPrecisionFormat = 187,
+ GLMessage_Function_glGetShaderSource = 188,
+ GLMessage_Function_glGetString = 189,
+ GLMessage_Function_glGetTexEnvfv = 190,
+ GLMessage_Function_glGetTexEnviv = 191,
+ GLMessage_Function_glGetTexEnvxv = 192,
+ GLMessage_Function_glGetTexEnvxvOES = 193,
+ GLMessage_Function_glGetTexGenfvOES = 194,
+ GLMessage_Function_glGetTexGenivOES = 195,
+ GLMessage_Function_glGetTexGenxvOES = 196,
+ GLMessage_Function_glGetTexParameterfv = 197,
+ GLMessage_Function_glGetTexParameteriv = 198,
+ GLMessage_Function_glGetTexParameterxv = 199,
+ GLMessage_Function_glGetTexParameterxvOES = 200,
+ GLMessage_Function_glGetUniformfv = 201,
+ GLMessage_Function_glGetUniformiv = 202,
+ GLMessage_Function_glGetUniformLocation = 203,
+ GLMessage_Function_glGetVertexAttribfv = 204,
+ GLMessage_Function_glGetVertexAttribiv = 205,
+ GLMessage_Function_glGetVertexAttribPointerv = 206,
+ GLMessage_Function_glHint = 207,
+ GLMessage_Function_glIsBuffer = 208,
+ GLMessage_Function_glIsEnabled = 209,
+ GLMessage_Function_glIsFenceNV = 210,
+ GLMessage_Function_glIsFramebuffer = 211,
+ GLMessage_Function_glIsFramebufferOES = 212,
+ GLMessage_Function_glIsProgram = 213,
+ GLMessage_Function_glIsRenderbuffer = 214,
+ GLMessage_Function_glIsRenderbufferOES = 215,
+ GLMessage_Function_glIsShader = 216,
+ GLMessage_Function_glIsTexture = 217,
+ GLMessage_Function_glIsVertexArrayOES = 218,
+ GLMessage_Function_glLightf = 219,
+ GLMessage_Function_glLightfv = 220,
+ GLMessage_Function_glLightModelf = 221,
+ GLMessage_Function_glLightModelfv = 222,
+ GLMessage_Function_glLightModelx = 223,
+ GLMessage_Function_glLightModelxOES = 224,
+ GLMessage_Function_glLightModelxv = 225,
+ GLMessage_Function_glLightModelxvOES = 226,
+ GLMessage_Function_glLightx = 227,
+ GLMessage_Function_glLightxOES = 228,
+ GLMessage_Function_glLightxv = 229,
+ GLMessage_Function_glLightxvOES = 230,
+ GLMessage_Function_glLineWidth = 231,
+ GLMessage_Function_glLineWidthx = 232,
+ GLMessage_Function_glLineWidthxOES = 233,
+ GLMessage_Function_glLinkProgram = 234,
+ GLMessage_Function_glLoadIdentity = 235,
+ GLMessage_Function_glLoadMatrixf = 236,
+ GLMessage_Function_glLoadMatrixx = 237,
+ GLMessage_Function_glLoadMatrixxOES = 238,
+ GLMessage_Function_glLoadPaletteFromModelViewMatrixOES = 239,
+ GLMessage_Function_glLogicOp = 240,
+ GLMessage_Function_glMapBufferOES = 241,
+ GLMessage_Function_glMaterialf = 242,
+ GLMessage_Function_glMaterialfv = 243,
+ GLMessage_Function_glMaterialx = 244,
+ GLMessage_Function_glMaterialxOES = 245,
+ GLMessage_Function_glMaterialxv = 246,
+ GLMessage_Function_glMaterialxvOES = 247,
+ GLMessage_Function_glMatrixIndexPointerOES = 248,
+ GLMessage_Function_glMatrixMode = 249,
+ GLMessage_Function_glMultiDrawArraysEXT = 250,
+ GLMessage_Function_glMultiDrawElementsEXT = 251,
+ GLMessage_Function_glMultiTexCoord4f = 252,
+ GLMessage_Function_glMultiTexCoord4x = 253,
+ GLMessage_Function_glMultiTexCoord4xOES = 254,
+ GLMessage_Function_glMultMatrixf = 255,
+ GLMessage_Function_glMultMatrixx = 256,
+ GLMessage_Function_glMultMatrixxOES = 257,
+ GLMessage_Function_glNormal3f = 258,
+ GLMessage_Function_glNormal3x = 259,
+ GLMessage_Function_glNormal3xOES = 260,
+ GLMessage_Function_glNormalPointer = 261,
+ GLMessage_Function_glOrthof = 262,
+ GLMessage_Function_glOrthofOES = 263,
+ GLMessage_Function_glOrthox = 264,
+ GLMessage_Function_glOrthoxOES = 265,
+ GLMessage_Function_glPixelStorei = 266,
+ GLMessage_Function_glPointParameterf = 267,
+ GLMessage_Function_glPointParameterfv = 268,
+ GLMessage_Function_glPointParameterx = 269,
+ GLMessage_Function_glPointParameterxOES = 270,
+ GLMessage_Function_glPointParameterxv = 271,
+ GLMessage_Function_glPointParameterxvOES = 272,
+ GLMessage_Function_glPointSize = 273,
+ GLMessage_Function_glPointSizePointerOES = 274,
+ GLMessage_Function_glPointSizex = 275,
+ GLMessage_Function_glPointSizexOES = 276,
+ GLMessage_Function_glPolygonOffset = 277,
+ GLMessage_Function_glPolygonOffsetx = 278,
+ GLMessage_Function_glPolygonOffsetxOES = 279,
+ GLMessage_Function_glPopMatrix = 280,
+ GLMessage_Function_glProgramBinaryOES = 281,
+ GLMessage_Function_glPushMatrix = 282,
+ GLMessage_Function_glQueryMatrixxOES = 283,
+ GLMessage_Function_glReadPixels = 284,
+ GLMessage_Function_glReleaseShaderCompiler = 285,
+ GLMessage_Function_glRenderbufferStorage = 286,
+ GLMessage_Function_glRenderbufferStorageMultisampleIMG = 287,
+ GLMessage_Function_glRenderbufferStorageOES = 288,
+ GLMessage_Function_glRotatef = 289,
+ GLMessage_Function_glRotatex = 290,
+ GLMessage_Function_glRotatexOES = 291,
+ GLMessage_Function_glSampleCoverage = 292,
+ GLMessage_Function_glSampleCoveragex = 293,
+ GLMessage_Function_glSampleCoveragexOES = 294,
+ GLMessage_Function_glScalef = 295,
+ GLMessage_Function_glScalex = 296,
+ GLMessage_Function_glScalexOES = 297,
+ GLMessage_Function_glScissor = 298,
+ GLMessage_Function_glSelectPerfMonitorCountersAMD = 299,
+ GLMessage_Function_glSetFenceNV = 300,
+ GLMessage_Function_glShadeModel = 301,
+ GLMessage_Function_glShaderBinary = 302,
+ GLMessage_Function_glShaderSource = 303,
+ GLMessage_Function_glStartTilingQCOM = 304,
+ GLMessage_Function_glStencilFunc = 305,
+ GLMessage_Function_glStencilFuncSeparate = 306,
+ GLMessage_Function_glStencilMask = 307,
+ GLMessage_Function_glStencilMaskSeparate = 308,
+ GLMessage_Function_glStencilOp = 309,
+ GLMessage_Function_glStencilOpSeparate = 310,
+ GLMessage_Function_glTestFenceNV = 311,
+ GLMessage_Function_glTexCoordPointer = 312,
+ GLMessage_Function_glTexEnvf = 313,
+ GLMessage_Function_glTexEnvfv = 314,
+ GLMessage_Function_glTexEnvi = 315,
+ GLMessage_Function_glTexEnviv = 316,
+ GLMessage_Function_glTexEnvx = 317,
+ GLMessage_Function_glTexEnvxOES = 318,
+ GLMessage_Function_glTexEnvxv = 319,
+ GLMessage_Function_glTexEnvxvOES = 320,
+ GLMessage_Function_glTexGenfOES = 321,
+ GLMessage_Function_glTexGenfvOES = 322,
+ GLMessage_Function_glTexGeniOES = 323,
+ GLMessage_Function_glTexGenivOES = 324,
+ GLMessage_Function_glTexGenxOES = 325,
+ GLMessage_Function_glTexGenxvOES = 326,
+ GLMessage_Function_glTexImage2D = 327,
+ GLMessage_Function_glTexImage3DOES = 328,
+ GLMessage_Function_glTexParameterf = 329,
+ GLMessage_Function_glTexParameterfv = 330,
+ GLMessage_Function_glTexParameteri = 331,
+ GLMessage_Function_glTexParameteriv = 332,
+ GLMessage_Function_glTexParameterx = 333,
+ GLMessage_Function_glTexParameterxOES = 334,
+ GLMessage_Function_glTexParameterxv = 335,
+ GLMessage_Function_glTexParameterxvOES = 336,
+ GLMessage_Function_glTexSubImage2D = 337,
+ GLMessage_Function_glTexSubImage3DOES = 338,
+ GLMessage_Function_glTranslatef = 339,
+ GLMessage_Function_glTranslatex = 340,
+ GLMessage_Function_glTranslatexOES = 341,
+ GLMessage_Function_glUniform1f = 342,
+ GLMessage_Function_glUniform1fv = 343,
+ GLMessage_Function_glUniform1i = 344,
+ GLMessage_Function_glUniform1iv = 345,
+ GLMessage_Function_glUniform2f = 346,
+ GLMessage_Function_glUniform2fv = 347,
+ GLMessage_Function_glUniform2i = 348,
+ GLMessage_Function_glUniform2iv = 349,
+ GLMessage_Function_glUniform3f = 350,
+ GLMessage_Function_glUniform3fv = 351,
+ GLMessage_Function_glUniform3i = 352,
+ GLMessage_Function_glUniform3iv = 353,
+ GLMessage_Function_glUniform4f = 354,
+ GLMessage_Function_glUniform4fv = 355,
+ GLMessage_Function_glUniform4i = 356,
+ GLMessage_Function_glUniform4iv = 357,
+ GLMessage_Function_glUniformMatrix2fv = 358,
+ GLMessage_Function_glUniformMatrix3fv = 359,
+ GLMessage_Function_glUniformMatrix4fv = 360,
+ GLMessage_Function_glUnmapBufferOES = 361,
+ GLMessage_Function_glUseProgram = 362,
+ GLMessage_Function_glValidateProgram = 363,
+ GLMessage_Function_glVertexAttrib1f = 364,
+ GLMessage_Function_glVertexAttrib1fv = 365,
+ GLMessage_Function_glVertexAttrib2f = 366,
+ GLMessage_Function_glVertexAttrib2fv = 367,
+ GLMessage_Function_glVertexAttrib3f = 368,
+ GLMessage_Function_glVertexAttrib3fv = 369,
+ GLMessage_Function_glVertexAttrib4f = 370,
+ GLMessage_Function_glVertexAttrib4fv = 371,
+ GLMessage_Function_glVertexAttribPointer = 372,
+ GLMessage_Function_glVertexPointer = 373,
+ GLMessage_Function_glViewport = 374,
+ GLMessage_Function_glWeightPointerOES = 375,
+ GLMessage_Function_eglGetDisplay = 2000,
+ GLMessage_Function_eglInitialize = 2001,
+ GLMessage_Function_eglTerminate = 2002,
+ GLMessage_Function_eglGetConfigs = 2003,
+ GLMessage_Function_eglChooseConfig = 2004,
+ GLMessage_Function_eglGetConfigAttrib = 2005,
+ GLMessage_Function_eglCreateWindowSurface = 2006,
+ GLMessage_Function_eglCreatePixmapSurface = 2007,
+ GLMessage_Function_eglCreatePbufferSurface = 2008,
+ GLMessage_Function_eglDestroySurface = 2009,
+ GLMessage_Function_eglQuerySurface = 2010,
+ GLMessage_Function_eglCreateContext = 2011,
+ GLMessage_Function_eglDestroyContext = 2012,
+ GLMessage_Function_eglMakeCurrent = 2013,
+ GLMessage_Function_eglGetCurrentContext = 2014,
+ GLMessage_Function_eglGetCurrentSurface = 2015,
+ GLMessage_Function_eglGetCurrentDisplay = 2016,
+ GLMessage_Function_eglQueryContext = 2017,
+ GLMessage_Function_eglWaitGL = 2018,
+ GLMessage_Function_eglWaitNative = 2019,
+ GLMessage_Function_eglSwapBuffers = 2020,
+ GLMessage_Function_eglCopyBuffers = 2021,
+ GLMessage_Function_eglGetError = 2022,
+ GLMessage_Function_eglQueryString = 2023,
+ GLMessage_Function_eglGetProcAddress = 2024,
+ GLMessage_Function_eglSurfaceAttrib = 2025,
+ GLMessage_Function_eglBindTexImage = 2026,
+ GLMessage_Function_eglReleaseTexImage = 2027,
+ GLMessage_Function_eglSwapInterval = 2028,
+ GLMessage_Function_eglBindAPI = 2029,
+ GLMessage_Function_eglQueryAPI = 2030,
+ GLMessage_Function_eglWaitClient = 2031,
+ GLMessage_Function_eglReleaseThread = 2032,
+ GLMessage_Function_eglCreatePbufferFromClientBuffer = 2033,
+ GLMessage_Function_eglLockSurfaceKHR = 2034,
+ GLMessage_Function_eglUnlockSurfaceKHR = 2035,
+ GLMessage_Function_eglCreateImageKHR = 2036,
+ GLMessage_Function_eglDestroyImageKHR = 2037,
+ GLMessage_Function_eglCreateSyncKHR = 2038,
+ GLMessage_Function_eglDestroySyncKHR = 2039,
+ GLMessage_Function_eglClientWaitSyncKHR = 2040,
+ GLMessage_Function_eglGetSyncAttribKHR = 2041,
+ GLMessage_Function_eglSetSwapRectangleANDROID = 2042,
+ GLMessage_Function_eglGetRenderBufferANDROID = 2043,
+ GLMessage_Function_eglGetSystemTimeFrequencyNV = 2044,
+ GLMessage_Function_eglGetSystemTimeNV = 2045,
+ GLMessage_Function_invalid = 3000,
+ GLMessage_Function_frameBufferContents = 3001
+};
+bool GLMessage_Function_IsValid(int value);
+const GLMessage_Function GLMessage_Function_Function_MIN = GLMessage_Function_glActiveTexture;
+const GLMessage_Function GLMessage_Function_Function_MAX = GLMessage_Function_frameBufferContents;
+const int GLMessage_Function_Function_ARRAYSIZE = GLMessage_Function_Function_MAX + 1;
+
+// ===================================================================
+
+class GLMessage_DataType : public ::google::protobuf::MessageLite {
+ public:
+ GLMessage_DataType();
+ virtual ~GLMessage_DataType();
+
+ GLMessage_DataType(const GLMessage_DataType& from);
+
+ inline GLMessage_DataType& operator=(const GLMessage_DataType& from) {
+ CopyFrom(from);
+ return *this;
+ }
+
+ static const GLMessage_DataType& default_instance();
+
+ void Swap(GLMessage_DataType* other);
+
+ // implements Message ----------------------------------------------
+
+ GLMessage_DataType* New() const;
+ void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from);
+ void CopyFrom(const GLMessage_DataType& from);
+ void MergeFrom(const GLMessage_DataType& from);
+ void Clear();
+ bool IsInitialized() const;
+
+ int ByteSize() const;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input);
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const;
+ int GetCachedSize() const { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const;
+ public:
+
+ ::std::string GetTypeName() const;
+
+ // nested types ----------------------------------------------------
+
+ typedef GLMessage_DataType_Type Type;
+ static const Type VOID = GLMessage_DataType_Type_VOID;
+ static const Type CHAR = GLMessage_DataType_Type_CHAR;
+ static const Type BYTE = GLMessage_DataType_Type_BYTE;
+ static const Type INT = GLMessage_DataType_Type_INT;
+ static const Type FLOAT = GLMessage_DataType_Type_FLOAT;
+ static const Type BOOL = GLMessage_DataType_Type_BOOL;
+ static const Type ENUM = GLMessage_DataType_Type_ENUM;
+ static inline bool Type_IsValid(int value) {
+ return GLMessage_DataType_Type_IsValid(value);
+ }
+ static const Type Type_MIN =
+ GLMessage_DataType_Type_Type_MIN;
+ static const Type Type_MAX =
+ GLMessage_DataType_Type_Type_MAX;
+ static const int Type_ARRAYSIZE =
+ GLMessage_DataType_Type_Type_ARRAYSIZE;
+
+ // accessors -------------------------------------------------------
+
+ // required .android.gltrace.GLMessage.DataType.Type type = 1 [default = VOID];
+ inline bool has_type() const;
+ inline void clear_type();
+ static const int kTypeFieldNumber = 1;
+ inline ::android::gltrace::GLMessage_DataType_Type type() const;
+ inline void set_type(::android::gltrace::GLMessage_DataType_Type value);
+
+ // required bool isArray = 2 [default = false];
+ inline bool has_isarray() const;
+ inline void clear_isarray();
+ static const int kIsArrayFieldNumber = 2;
+ inline bool isarray() const;
+ inline void set_isarray(bool value);
+
+ // repeated int32 intValue = 3;
+ inline int intvalue_size() const;
+ inline void clear_intvalue();
+ static const int kIntValueFieldNumber = 3;
+ inline ::google::protobuf::int32 intvalue(int index) const;
+ inline void set_intvalue(int index, ::google::protobuf::int32 value);
+ inline void add_intvalue(::google::protobuf::int32 value);
+ inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
+ intvalue() const;
+ inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
+ mutable_intvalue();
+
+ // repeated float floatValue = 4;
+ inline int floatvalue_size() const;
+ inline void clear_floatvalue();
+ static const int kFloatValueFieldNumber = 4;
+ inline float floatvalue(int index) const;
+ inline void set_floatvalue(int index, float value);
+ inline void add_floatvalue(float value);
+ inline const ::google::protobuf::RepeatedField< float >&
+ floatvalue() const;
+ inline ::google::protobuf::RepeatedField< float >*
+ mutable_floatvalue();
+
+ // repeated bytes charValue = 5;
+ inline int charvalue_size() const;
+ inline void clear_charvalue();
+ static const int kCharValueFieldNumber = 5;
+ inline const ::std::string& charvalue(int index) const;
+ inline ::std::string* mutable_charvalue(int index);
+ inline void set_charvalue(int index, const ::std::string& value);
+ inline void set_charvalue(int index, const char* value);
+ inline void set_charvalue(int index, const void* value, size_t size);
+ inline ::std::string* add_charvalue();
+ inline void add_charvalue(const ::std::string& value);
+ inline void add_charvalue(const char* value);
+ inline void add_charvalue(const void* value, size_t size);
+ inline const ::google::protobuf::RepeatedPtrField< ::std::string>& charvalue() const;
+ inline ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_charvalue();
+
+ // repeated bytes rawBytes = 6;
+ inline int rawbytes_size() const;
+ inline void clear_rawbytes();
+ static const int kRawBytesFieldNumber = 6;
+ inline const ::std::string& rawbytes(int index) const;
+ inline ::std::string* mutable_rawbytes(int index);
+ inline void set_rawbytes(int index, const ::std::string& value);
+ inline void set_rawbytes(int index, const char* value);
+ inline void set_rawbytes(int index, const void* value, size_t size);
+ inline ::std::string* add_rawbytes();
+ inline void add_rawbytes(const ::std::string& value);
+ inline void add_rawbytes(const char* value);
+ inline void add_rawbytes(const void* value, size_t size);
+ inline const ::google::protobuf::RepeatedPtrField< ::std::string>& rawbytes() const;
+ inline ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_rawbytes();
+
+ // repeated bool boolValue = 7;
+ inline int boolvalue_size() const;
+ inline void clear_boolvalue();
+ static const int kBoolValueFieldNumber = 7;
+ inline bool boolvalue(int index) const;
+ inline void set_boolvalue(int index, bool value);
+ inline void add_boolvalue(bool value);
+ inline const ::google::protobuf::RepeatedField< bool >&
+ boolvalue() const;
+ inline ::google::protobuf::RepeatedField< bool >*
+ mutable_boolvalue();
+
+ // @@protoc_insertion_point(class_scope:android.gltrace.GLMessage.DataType)
+ private:
+ mutable int _cached_size_;
+
+ int type_;
+ bool isarray_;
+ ::google::protobuf::RepeatedField< ::google::protobuf::int32 > intvalue_;
+ ::google::protobuf::RepeatedField< float > floatvalue_;
+ ::google::protobuf::RepeatedPtrField< ::std::string> charvalue_;
+ ::google::protobuf::RepeatedPtrField< ::std::string> rawbytes_;
+ ::google::protobuf::RepeatedField< bool > boolvalue_;
+ friend void protobuf_AddDesc_gltrace_2eproto();
+ friend void protobuf_AssignDesc_gltrace_2eproto();
+ friend void protobuf_ShutdownFile_gltrace_2eproto();
+
+ ::google::protobuf::uint32 _has_bits_[(7 + 31) / 32];
+
+ // WHY DOES & HAVE LOWER PRECEDENCE THAN != !?
+ inline bool _has_bit(int index) const {
+ return (_has_bits_[index / 32] & (1u << (index % 32))) != 0;
+ }
+ inline void _set_bit(int index) {
+ _has_bits_[index / 32] |= (1u << (index % 32));
+ }
+ inline void _clear_bit(int index) {
+ _has_bits_[index / 32] &= ~(1u << (index % 32));
+ }
+
+ void InitAsDefaultInstance();
+ static GLMessage_DataType* default_instance_;
+};
+// -------------------------------------------------------------------
+
+class GLMessage : public ::google::protobuf::MessageLite {
+ public:
+ GLMessage();
+ virtual ~GLMessage();
+
+ GLMessage(const GLMessage& from);
+
+ inline GLMessage& operator=(const GLMessage& from) {
+ CopyFrom(from);
+ return *this;
+ }
+
+ static const GLMessage& default_instance();
+
+ void Swap(GLMessage* other);
+
+ // implements Message ----------------------------------------------
+
+ GLMessage* New() const;
+ void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from);
+ void CopyFrom(const GLMessage& from);
+ void MergeFrom(const GLMessage& from);
+ void Clear();
+ bool IsInitialized() const;
+
+ int ByteSize() const;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input);
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const;
+ int GetCachedSize() const { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const;
+ public:
+
+ ::std::string GetTypeName() const;
+
+ // nested types ----------------------------------------------------
+
+ typedef GLMessage_DataType DataType;
+
+ typedef GLMessage_Function Function;
+ static const Function glActiveTexture = GLMessage_Function_glActiveTexture;
+ static const Function glAlphaFunc = GLMessage_Function_glAlphaFunc;
+ static const Function glAlphaFuncx = GLMessage_Function_glAlphaFuncx;
+ static const Function glAlphaFuncxOES = GLMessage_Function_glAlphaFuncxOES;
+ static const Function glAttachShader = GLMessage_Function_glAttachShader;
+ static const Function glBeginPerfMonitorAMD = GLMessage_Function_glBeginPerfMonitorAMD;
+ static const Function glBindAttribLocation = GLMessage_Function_glBindAttribLocation;
+ static const Function glBindBuffer = GLMessage_Function_glBindBuffer;
+ static const Function glBindFramebuffer = GLMessage_Function_glBindFramebuffer;
+ static const Function glBindFramebufferOES = GLMessage_Function_glBindFramebufferOES;
+ static const Function glBindRenderbuffer = GLMessage_Function_glBindRenderbuffer;
+ static const Function glBindRenderbufferOES = GLMessage_Function_glBindRenderbufferOES;
+ static const Function glBindTexture = GLMessage_Function_glBindTexture;
+ static const Function glBindVertexArrayOES = GLMessage_Function_glBindVertexArrayOES;
+ static const Function glBlendColor = GLMessage_Function_glBlendColor;
+ static const Function glBlendEquation = GLMessage_Function_glBlendEquation;
+ static const Function glBlendEquationOES = GLMessage_Function_glBlendEquationOES;
+ static const Function glBlendEquationSeparate = GLMessage_Function_glBlendEquationSeparate;
+ static const Function glBlendEquationSeparateOES = GLMessage_Function_glBlendEquationSeparateOES;
+ static const Function glBlendFunc = GLMessage_Function_glBlendFunc;
+ static const Function glBlendFuncSeparate = GLMessage_Function_glBlendFuncSeparate;
+ static const Function glBlendFuncSeparateOES = GLMessage_Function_glBlendFuncSeparateOES;
+ static const Function glBufferData = GLMessage_Function_glBufferData;
+ static const Function glBufferSubData = GLMessage_Function_glBufferSubData;
+ static const Function glCheckFramebufferStatus = GLMessage_Function_glCheckFramebufferStatus;
+ static const Function glCheckFramebufferStatusOES = GLMessage_Function_glCheckFramebufferStatusOES;
+ static const Function glClearColor = GLMessage_Function_glClearColor;
+ static const Function glClearColorx = GLMessage_Function_glClearColorx;
+ static const Function glClearColorxOES = GLMessage_Function_glClearColorxOES;
+ static const Function glClearDepthf = GLMessage_Function_glClearDepthf;
+ static const Function glClearDepthfOES = GLMessage_Function_glClearDepthfOES;
+ static const Function glClearDepthx = GLMessage_Function_glClearDepthx;
+ static const Function glClearDepthxOES = GLMessage_Function_glClearDepthxOES;
+ static const Function glClear = GLMessage_Function_glClear;
+ static const Function glClearStencil = GLMessage_Function_glClearStencil;
+ static const Function glClientActiveTexture = GLMessage_Function_glClientActiveTexture;
+ static const Function glClipPlanef = GLMessage_Function_glClipPlanef;
+ static const Function glClipPlanefIMG = GLMessage_Function_glClipPlanefIMG;
+ static const Function glClipPlanefOES = GLMessage_Function_glClipPlanefOES;
+ static const Function glClipPlanex = GLMessage_Function_glClipPlanex;
+ static const Function glClipPlanexIMG = GLMessage_Function_glClipPlanexIMG;
+ static const Function glClipPlanexOES = GLMessage_Function_glClipPlanexOES;
+ static const Function glColor4f = GLMessage_Function_glColor4f;
+ static const Function glColor4ub = GLMessage_Function_glColor4ub;
+ static const Function glColor4x = GLMessage_Function_glColor4x;
+ static const Function glColor4xOES = GLMessage_Function_glColor4xOES;
+ static const Function glColorMask = GLMessage_Function_glColorMask;
+ static const Function glColorPointer = GLMessage_Function_glColorPointer;
+ static const Function glCompileShader = GLMessage_Function_glCompileShader;
+ static const Function glCompressedTexImage2D = GLMessage_Function_glCompressedTexImage2D;
+ static const Function glCompressedTexImage3DOES = GLMessage_Function_glCompressedTexImage3DOES;
+ static const Function glCompressedTexSubImage2D = GLMessage_Function_glCompressedTexSubImage2D;
+ static const Function glCompressedTexSubImage3DOES = GLMessage_Function_glCompressedTexSubImage3DOES;
+ static const Function glCopyTexImage2D = GLMessage_Function_glCopyTexImage2D;
+ static const Function glCopyTexSubImage2D = GLMessage_Function_glCopyTexSubImage2D;
+ static const Function glCopyTexSubImage3DOES = GLMessage_Function_glCopyTexSubImage3DOES;
+ static const Function glCoverageMaskNV = GLMessage_Function_glCoverageMaskNV;
+ static const Function glCoverageOperationNV = GLMessage_Function_glCoverageOperationNV;
+ static const Function glCreateProgram = GLMessage_Function_glCreateProgram;
+ static const Function glCreateShader = GLMessage_Function_glCreateShader;
+ static const Function glCullFace = GLMessage_Function_glCullFace;
+ static const Function glCurrentPaletteMatrixOES = GLMessage_Function_glCurrentPaletteMatrixOES;
+ static const Function glDeleteBuffers = GLMessage_Function_glDeleteBuffers;
+ static const Function glDeleteFencesNV = GLMessage_Function_glDeleteFencesNV;
+ static const Function glDeleteFramebuffers = GLMessage_Function_glDeleteFramebuffers;
+ static const Function glDeleteFramebuffersOES = GLMessage_Function_glDeleteFramebuffersOES;
+ static const Function glDeletePerfMonitorsAMD = GLMessage_Function_glDeletePerfMonitorsAMD;
+ static const Function glDeleteProgram = GLMessage_Function_glDeleteProgram;
+ static const Function glDeleteRenderbuffers = GLMessage_Function_glDeleteRenderbuffers;
+ static const Function glDeleteRenderbuffersOES = GLMessage_Function_glDeleteRenderbuffersOES;
+ static const Function glDeleteShader = GLMessage_Function_glDeleteShader;
+ static const Function glDeleteTextures = GLMessage_Function_glDeleteTextures;
+ static const Function glDeleteVertexArraysOES = GLMessage_Function_glDeleteVertexArraysOES;
+ static const Function glDepthFunc = GLMessage_Function_glDepthFunc;
+ static const Function glDepthMask = GLMessage_Function_glDepthMask;
+ static const Function glDepthRangef = GLMessage_Function_glDepthRangef;
+ static const Function glDepthRangefOES = GLMessage_Function_glDepthRangefOES;
+ static const Function glDepthRangex = GLMessage_Function_glDepthRangex;
+ static const Function glDepthRangexOES = GLMessage_Function_glDepthRangexOES;
+ static const Function glDetachShader = GLMessage_Function_glDetachShader;
+ static const Function glDisableClientState = GLMessage_Function_glDisableClientState;
+ static const Function glDisableDriverControlQCOM = GLMessage_Function_glDisableDriverControlQCOM;
+ static const Function glDisable = GLMessage_Function_glDisable;
+ static const Function glDisableVertexAttribArray = GLMessage_Function_glDisableVertexAttribArray;
+ static const Function glDiscardFramebufferEXT = GLMessage_Function_glDiscardFramebufferEXT;
+ static const Function glDrawArrays = GLMessage_Function_glDrawArrays;
+ static const Function glDrawElements = GLMessage_Function_glDrawElements;
+ static const Function glDrawTexfOES = GLMessage_Function_glDrawTexfOES;
+ static const Function glDrawTexfvOES = GLMessage_Function_glDrawTexfvOES;
+ static const Function glDrawTexiOES = GLMessage_Function_glDrawTexiOES;
+ static const Function glDrawTexivOES = GLMessage_Function_glDrawTexivOES;
+ static const Function glDrawTexsOES = GLMessage_Function_glDrawTexsOES;
+ static const Function glDrawTexsvOES = GLMessage_Function_glDrawTexsvOES;
+ static const Function glDrawTexxOES = GLMessage_Function_glDrawTexxOES;
+ static const Function glDrawTexxvOES = GLMessage_Function_glDrawTexxvOES;
+ static const Function glEGLImageTargetRenderbufferStorageOES = GLMessage_Function_glEGLImageTargetRenderbufferStorageOES;
+ static const Function glEGLImageTargetTexture2DOES = GLMessage_Function_glEGLImageTargetTexture2DOES;
+ static const Function glEnableClientState = GLMessage_Function_glEnableClientState;
+ static const Function glEnableDriverControlQCOM = GLMessage_Function_glEnableDriverControlQCOM;
+ static const Function glEnable = GLMessage_Function_glEnable;
+ static const Function glEnableVertexAttribArray = GLMessage_Function_glEnableVertexAttribArray;
+ static const Function glEndPerfMonitorAMD = GLMessage_Function_glEndPerfMonitorAMD;
+ static const Function glEndTilingQCOM = GLMessage_Function_glEndTilingQCOM;
+ static const Function glExtGetBufferPointervQCOM = GLMessage_Function_glExtGetBufferPointervQCOM;
+ static const Function glExtGetBuffersQCOM = GLMessage_Function_glExtGetBuffersQCOM;
+ static const Function glExtGetFramebuffersQCOM = GLMessage_Function_glExtGetFramebuffersQCOM;
+ static const Function glExtGetProgramBinarySourceQCOM = GLMessage_Function_glExtGetProgramBinarySourceQCOM;
+ static const Function glExtGetProgramsQCOM = GLMessage_Function_glExtGetProgramsQCOM;
+ static const Function glExtGetRenderbuffersQCOM = GLMessage_Function_glExtGetRenderbuffersQCOM;
+ static const Function glExtGetShadersQCOM = GLMessage_Function_glExtGetShadersQCOM;
+ static const Function glExtGetTexLevelParameterivQCOM = GLMessage_Function_glExtGetTexLevelParameterivQCOM;
+ static const Function glExtGetTexSubImageQCOM = GLMessage_Function_glExtGetTexSubImageQCOM;
+ static const Function glExtGetTexturesQCOM = GLMessage_Function_glExtGetTexturesQCOM;
+ static const Function glExtIsProgramBinaryQCOM = GLMessage_Function_glExtIsProgramBinaryQCOM;
+ static const Function glExtTexObjectStateOverrideiQCOM = GLMessage_Function_glExtTexObjectStateOverrideiQCOM;
+ static const Function glFinishFenceNV = GLMessage_Function_glFinishFenceNV;
+ static const Function glFinish = GLMessage_Function_glFinish;
+ static const Function glFlush = GLMessage_Function_glFlush;
+ static const Function glFogf = GLMessage_Function_glFogf;
+ static const Function glFogfv = GLMessage_Function_glFogfv;
+ static const Function glFogx = GLMessage_Function_glFogx;
+ static const Function glFogxOES = GLMessage_Function_glFogxOES;
+ static const Function glFogxv = GLMessage_Function_glFogxv;
+ static const Function glFogxvOES = GLMessage_Function_glFogxvOES;
+ static const Function glFramebufferRenderbuffer = GLMessage_Function_glFramebufferRenderbuffer;
+ static const Function glFramebufferRenderbufferOES = GLMessage_Function_glFramebufferRenderbufferOES;
+ static const Function glFramebufferTexture2D = GLMessage_Function_glFramebufferTexture2D;
+ static const Function glFramebufferTexture2DMultisampleIMG = GLMessage_Function_glFramebufferTexture2DMultisampleIMG;
+ static const Function glFramebufferTexture2DOES = GLMessage_Function_glFramebufferTexture2DOES;
+ static const Function glFramebufferTexture3DOES = GLMessage_Function_glFramebufferTexture3DOES;
+ static const Function glFrontFace = GLMessage_Function_glFrontFace;
+ static const Function glFrustumf = GLMessage_Function_glFrustumf;
+ static const Function glFrustumfOES = GLMessage_Function_glFrustumfOES;
+ static const Function glFrustumx = GLMessage_Function_glFrustumx;
+ static const Function glFrustumxOES = GLMessage_Function_glFrustumxOES;
+ static const Function glGenBuffers = GLMessage_Function_glGenBuffers;
+ static const Function glGenerateMipmap = GLMessage_Function_glGenerateMipmap;
+ static const Function glGenerateMipmapOES = GLMessage_Function_glGenerateMipmapOES;
+ static const Function glGenFencesNV = GLMessage_Function_glGenFencesNV;
+ static const Function glGenFramebuffers = GLMessage_Function_glGenFramebuffers;
+ static const Function glGenFramebuffersOES = GLMessage_Function_glGenFramebuffersOES;
+ static const Function glGenPerfMonitorsAMD = GLMessage_Function_glGenPerfMonitorsAMD;
+ static const Function glGenRenderbuffers = GLMessage_Function_glGenRenderbuffers;
+ static const Function glGenRenderbuffersOES = GLMessage_Function_glGenRenderbuffersOES;
+ static const Function glGenTextures = GLMessage_Function_glGenTextures;
+ static const Function glGenVertexArraysOES = GLMessage_Function_glGenVertexArraysOES;
+ static const Function glGetActiveAttrib = GLMessage_Function_glGetActiveAttrib;
+ static const Function glGetActiveUniform = GLMessage_Function_glGetActiveUniform;
+ static const Function glGetAttachedShaders = GLMessage_Function_glGetAttachedShaders;
+ static const Function glGetAttribLocation = GLMessage_Function_glGetAttribLocation;
+ static const Function glGetBooleanv = GLMessage_Function_glGetBooleanv;
+ static const Function glGetBufferParameteriv = GLMessage_Function_glGetBufferParameteriv;
+ static const Function glGetBufferPointervOES = GLMessage_Function_glGetBufferPointervOES;
+ static const Function glGetClipPlanef = GLMessage_Function_glGetClipPlanef;
+ static const Function glGetClipPlanefOES = GLMessage_Function_glGetClipPlanefOES;
+ static const Function glGetClipPlanex = GLMessage_Function_glGetClipPlanex;
+ static const Function glGetClipPlanexOES = GLMessage_Function_glGetClipPlanexOES;
+ static const Function glGetDriverControlsQCOM = GLMessage_Function_glGetDriverControlsQCOM;
+ static const Function glGetDriverControlStringQCOM = GLMessage_Function_glGetDriverControlStringQCOM;
+ static const Function glGetError = GLMessage_Function_glGetError;
+ static const Function glGetFenceivNV = GLMessage_Function_glGetFenceivNV;
+ static const Function glGetFixedv = GLMessage_Function_glGetFixedv;
+ static const Function glGetFixedvOES = GLMessage_Function_glGetFixedvOES;
+ static const Function glGetFloatv = GLMessage_Function_glGetFloatv;
+ static const Function glGetFramebufferAttachmentParameteriv = GLMessage_Function_glGetFramebufferAttachmentParameteriv;
+ static const Function glGetFramebufferAttachmentParameterivOES = GLMessage_Function_glGetFramebufferAttachmentParameterivOES;
+ static const Function glGetIntegerv = GLMessage_Function_glGetIntegerv;
+ static const Function glGetLightfv = GLMessage_Function_glGetLightfv;
+ static const Function glGetLightxv = GLMessage_Function_glGetLightxv;
+ static const Function glGetLightxvOES = GLMessage_Function_glGetLightxvOES;
+ static const Function glGetMaterialfv = GLMessage_Function_glGetMaterialfv;
+ static const Function glGetMaterialxv = GLMessage_Function_glGetMaterialxv;
+ static const Function glGetMaterialxvOES = GLMessage_Function_glGetMaterialxvOES;
+ static const Function glGetPerfMonitorCounterDataAMD = GLMessage_Function_glGetPerfMonitorCounterDataAMD;
+ static const Function glGetPerfMonitorCounterInfoAMD = GLMessage_Function_glGetPerfMonitorCounterInfoAMD;
+ static const Function glGetPerfMonitorCountersAMD = GLMessage_Function_glGetPerfMonitorCountersAMD;
+ static const Function glGetPerfMonitorCounterStringAMD = GLMessage_Function_glGetPerfMonitorCounterStringAMD;
+ static const Function glGetPerfMonitorGroupsAMD = GLMessage_Function_glGetPerfMonitorGroupsAMD;
+ static const Function glGetPerfMonitorGroupStringAMD = GLMessage_Function_glGetPerfMonitorGroupStringAMD;
+ static const Function glGetPointerv = GLMessage_Function_glGetPointerv;
+ static const Function glGetProgramBinaryOES = GLMessage_Function_glGetProgramBinaryOES;
+ static const Function glGetProgramInfoLog = GLMessage_Function_glGetProgramInfoLog;
+ static const Function glGetProgramiv = GLMessage_Function_glGetProgramiv;
+ static const Function glGetRenderbufferParameteriv = GLMessage_Function_glGetRenderbufferParameteriv;
+ static const Function glGetRenderbufferParameterivOES = GLMessage_Function_glGetRenderbufferParameterivOES;
+ static const Function glGetShaderInfoLog = GLMessage_Function_glGetShaderInfoLog;
+ static const Function glGetShaderiv = GLMessage_Function_glGetShaderiv;
+ static const Function glGetShaderPrecisionFormat = GLMessage_Function_glGetShaderPrecisionFormat;
+ static const Function glGetShaderSource = GLMessage_Function_glGetShaderSource;
+ static const Function glGetString = GLMessage_Function_glGetString;
+ static const Function glGetTexEnvfv = GLMessage_Function_glGetTexEnvfv;
+ static const Function glGetTexEnviv = GLMessage_Function_glGetTexEnviv;
+ static const Function glGetTexEnvxv = GLMessage_Function_glGetTexEnvxv;
+ static const Function glGetTexEnvxvOES = GLMessage_Function_glGetTexEnvxvOES;
+ static const Function glGetTexGenfvOES = GLMessage_Function_glGetTexGenfvOES;
+ static const Function glGetTexGenivOES = GLMessage_Function_glGetTexGenivOES;
+ static const Function glGetTexGenxvOES = GLMessage_Function_glGetTexGenxvOES;
+ static const Function glGetTexParameterfv = GLMessage_Function_glGetTexParameterfv;
+ static const Function glGetTexParameteriv = GLMessage_Function_glGetTexParameteriv;
+ static const Function glGetTexParameterxv = GLMessage_Function_glGetTexParameterxv;
+ static const Function glGetTexParameterxvOES = GLMessage_Function_glGetTexParameterxvOES;
+ static const Function glGetUniformfv = GLMessage_Function_glGetUniformfv;
+ static const Function glGetUniformiv = GLMessage_Function_glGetUniformiv;
+ static const Function glGetUniformLocation = GLMessage_Function_glGetUniformLocation;
+ static const Function glGetVertexAttribfv = GLMessage_Function_glGetVertexAttribfv;
+ static const Function glGetVertexAttribiv = GLMessage_Function_glGetVertexAttribiv;
+ static const Function glGetVertexAttribPointerv = GLMessage_Function_glGetVertexAttribPointerv;
+ static const Function glHint = GLMessage_Function_glHint;
+ static const Function glIsBuffer = GLMessage_Function_glIsBuffer;
+ static const Function glIsEnabled = GLMessage_Function_glIsEnabled;
+ static const Function glIsFenceNV = GLMessage_Function_glIsFenceNV;
+ static const Function glIsFramebuffer = GLMessage_Function_glIsFramebuffer;
+ static const Function glIsFramebufferOES = GLMessage_Function_glIsFramebufferOES;
+ static const Function glIsProgram = GLMessage_Function_glIsProgram;
+ static const Function glIsRenderbuffer = GLMessage_Function_glIsRenderbuffer;
+ static const Function glIsRenderbufferOES = GLMessage_Function_glIsRenderbufferOES;
+ static const Function glIsShader = GLMessage_Function_glIsShader;
+ static const Function glIsTexture = GLMessage_Function_glIsTexture;
+ static const Function glIsVertexArrayOES = GLMessage_Function_glIsVertexArrayOES;
+ static const Function glLightf = GLMessage_Function_glLightf;
+ static const Function glLightfv = GLMessage_Function_glLightfv;
+ static const Function glLightModelf = GLMessage_Function_glLightModelf;
+ static const Function glLightModelfv = GLMessage_Function_glLightModelfv;
+ static const Function glLightModelx = GLMessage_Function_glLightModelx;
+ static const Function glLightModelxOES = GLMessage_Function_glLightModelxOES;
+ static const Function glLightModelxv = GLMessage_Function_glLightModelxv;
+ static const Function glLightModelxvOES = GLMessage_Function_glLightModelxvOES;
+ static const Function glLightx = GLMessage_Function_glLightx;
+ static const Function glLightxOES = GLMessage_Function_glLightxOES;
+ static const Function glLightxv = GLMessage_Function_glLightxv;
+ static const Function glLightxvOES = GLMessage_Function_glLightxvOES;
+ static const Function glLineWidth = GLMessage_Function_glLineWidth;
+ static const Function glLineWidthx = GLMessage_Function_glLineWidthx;
+ static const Function glLineWidthxOES = GLMessage_Function_glLineWidthxOES;
+ static const Function glLinkProgram = GLMessage_Function_glLinkProgram;
+ static const Function glLoadIdentity = GLMessage_Function_glLoadIdentity;
+ static const Function glLoadMatrixf = GLMessage_Function_glLoadMatrixf;
+ static const Function glLoadMatrixx = GLMessage_Function_glLoadMatrixx;
+ static const Function glLoadMatrixxOES = GLMessage_Function_glLoadMatrixxOES;
+ static const Function glLoadPaletteFromModelViewMatrixOES = GLMessage_Function_glLoadPaletteFromModelViewMatrixOES;
+ static const Function glLogicOp = GLMessage_Function_glLogicOp;
+ static const Function glMapBufferOES = GLMessage_Function_glMapBufferOES;
+ static const Function glMaterialf = GLMessage_Function_glMaterialf;
+ static const Function glMaterialfv = GLMessage_Function_glMaterialfv;
+ static const Function glMaterialx = GLMessage_Function_glMaterialx;
+ static const Function glMaterialxOES = GLMessage_Function_glMaterialxOES;
+ static const Function glMaterialxv = GLMessage_Function_glMaterialxv;
+ static const Function glMaterialxvOES = GLMessage_Function_glMaterialxvOES;
+ static const Function glMatrixIndexPointerOES = GLMessage_Function_glMatrixIndexPointerOES;
+ static const Function glMatrixMode = GLMessage_Function_glMatrixMode;
+ static const Function glMultiDrawArraysEXT = GLMessage_Function_glMultiDrawArraysEXT;
+ static const Function glMultiDrawElementsEXT = GLMessage_Function_glMultiDrawElementsEXT;
+ static const Function glMultiTexCoord4f = GLMessage_Function_glMultiTexCoord4f;
+ static const Function glMultiTexCoord4x = GLMessage_Function_glMultiTexCoord4x;
+ static const Function glMultiTexCoord4xOES = GLMessage_Function_glMultiTexCoord4xOES;
+ static const Function glMultMatrixf = GLMessage_Function_glMultMatrixf;
+ static const Function glMultMatrixx = GLMessage_Function_glMultMatrixx;
+ static const Function glMultMatrixxOES = GLMessage_Function_glMultMatrixxOES;
+ static const Function glNormal3f = GLMessage_Function_glNormal3f;
+ static const Function glNormal3x = GLMessage_Function_glNormal3x;
+ static const Function glNormal3xOES = GLMessage_Function_glNormal3xOES;
+ static const Function glNormalPointer = GLMessage_Function_glNormalPointer;
+ static const Function glOrthof = GLMessage_Function_glOrthof;
+ static const Function glOrthofOES = GLMessage_Function_glOrthofOES;
+ static const Function glOrthox = GLMessage_Function_glOrthox;
+ static const Function glOrthoxOES = GLMessage_Function_glOrthoxOES;
+ static const Function glPixelStorei = GLMessage_Function_glPixelStorei;
+ static const Function glPointParameterf = GLMessage_Function_glPointParameterf;
+ static const Function glPointParameterfv = GLMessage_Function_glPointParameterfv;
+ static const Function glPointParameterx = GLMessage_Function_glPointParameterx;
+ static const Function glPointParameterxOES = GLMessage_Function_glPointParameterxOES;
+ static const Function glPointParameterxv = GLMessage_Function_glPointParameterxv;
+ static const Function glPointParameterxvOES = GLMessage_Function_glPointParameterxvOES;
+ static const Function glPointSize = GLMessage_Function_glPointSize;
+ static const Function glPointSizePointerOES = GLMessage_Function_glPointSizePointerOES;
+ static const Function glPointSizex = GLMessage_Function_glPointSizex;
+ static const Function glPointSizexOES = GLMessage_Function_glPointSizexOES;
+ static const Function glPolygonOffset = GLMessage_Function_glPolygonOffset;
+ static const Function glPolygonOffsetx = GLMessage_Function_glPolygonOffsetx;
+ static const Function glPolygonOffsetxOES = GLMessage_Function_glPolygonOffsetxOES;
+ static const Function glPopMatrix = GLMessage_Function_glPopMatrix;
+ static const Function glProgramBinaryOES = GLMessage_Function_glProgramBinaryOES;
+ static const Function glPushMatrix = GLMessage_Function_glPushMatrix;
+ static const Function glQueryMatrixxOES = GLMessage_Function_glQueryMatrixxOES;
+ static const Function glReadPixels = GLMessage_Function_glReadPixels;
+ static const Function glReleaseShaderCompiler = GLMessage_Function_glReleaseShaderCompiler;
+ static const Function glRenderbufferStorage = GLMessage_Function_glRenderbufferStorage;
+ static const Function glRenderbufferStorageMultisampleIMG = GLMessage_Function_glRenderbufferStorageMultisampleIMG;
+ static const Function glRenderbufferStorageOES = GLMessage_Function_glRenderbufferStorageOES;
+ static const Function glRotatef = GLMessage_Function_glRotatef;
+ static const Function glRotatex = GLMessage_Function_glRotatex;
+ static const Function glRotatexOES = GLMessage_Function_glRotatexOES;
+ static const Function glSampleCoverage = GLMessage_Function_glSampleCoverage;
+ static const Function glSampleCoveragex = GLMessage_Function_glSampleCoveragex;
+ static const Function glSampleCoveragexOES = GLMessage_Function_glSampleCoveragexOES;
+ static const Function glScalef = GLMessage_Function_glScalef;
+ static const Function glScalex = GLMessage_Function_glScalex;
+ static const Function glScalexOES = GLMessage_Function_glScalexOES;
+ static const Function glScissor = GLMessage_Function_glScissor;
+ static const Function glSelectPerfMonitorCountersAMD = GLMessage_Function_glSelectPerfMonitorCountersAMD;
+ static const Function glSetFenceNV = GLMessage_Function_glSetFenceNV;
+ static const Function glShadeModel = GLMessage_Function_glShadeModel;
+ static const Function glShaderBinary = GLMessage_Function_glShaderBinary;
+ static const Function glShaderSource = GLMessage_Function_glShaderSource;
+ static const Function glStartTilingQCOM = GLMessage_Function_glStartTilingQCOM;
+ static const Function glStencilFunc = GLMessage_Function_glStencilFunc;
+ static const Function glStencilFuncSeparate = GLMessage_Function_glStencilFuncSeparate;
+ static const Function glStencilMask = GLMessage_Function_glStencilMask;
+ static const Function glStencilMaskSeparate = GLMessage_Function_glStencilMaskSeparate;
+ static const Function glStencilOp = GLMessage_Function_glStencilOp;
+ static const Function glStencilOpSeparate = GLMessage_Function_glStencilOpSeparate;
+ static const Function glTestFenceNV = GLMessage_Function_glTestFenceNV;
+ static const Function glTexCoordPointer = GLMessage_Function_glTexCoordPointer;
+ static const Function glTexEnvf = GLMessage_Function_glTexEnvf;
+ static const Function glTexEnvfv = GLMessage_Function_glTexEnvfv;
+ static const Function glTexEnvi = GLMessage_Function_glTexEnvi;
+ static const Function glTexEnviv = GLMessage_Function_glTexEnviv;
+ static const Function glTexEnvx = GLMessage_Function_glTexEnvx;
+ static const Function glTexEnvxOES = GLMessage_Function_glTexEnvxOES;
+ static const Function glTexEnvxv = GLMessage_Function_glTexEnvxv;
+ static const Function glTexEnvxvOES = GLMessage_Function_glTexEnvxvOES;
+ static const Function glTexGenfOES = GLMessage_Function_glTexGenfOES;
+ static const Function glTexGenfvOES = GLMessage_Function_glTexGenfvOES;
+ static const Function glTexGeniOES = GLMessage_Function_glTexGeniOES;
+ static const Function glTexGenivOES = GLMessage_Function_glTexGenivOES;
+ static const Function glTexGenxOES = GLMessage_Function_glTexGenxOES;
+ static const Function glTexGenxvOES = GLMessage_Function_glTexGenxvOES;
+ static const Function glTexImage2D = GLMessage_Function_glTexImage2D;
+ static const Function glTexImage3DOES = GLMessage_Function_glTexImage3DOES;
+ static const Function glTexParameterf = GLMessage_Function_glTexParameterf;
+ static const Function glTexParameterfv = GLMessage_Function_glTexParameterfv;
+ static const Function glTexParameteri = GLMessage_Function_glTexParameteri;
+ static const Function glTexParameteriv = GLMessage_Function_glTexParameteriv;
+ static const Function glTexParameterx = GLMessage_Function_glTexParameterx;
+ static const Function glTexParameterxOES = GLMessage_Function_glTexParameterxOES;
+ static const Function glTexParameterxv = GLMessage_Function_glTexParameterxv;
+ static const Function glTexParameterxvOES = GLMessage_Function_glTexParameterxvOES;
+ static const Function glTexSubImage2D = GLMessage_Function_glTexSubImage2D;
+ static const Function glTexSubImage3DOES = GLMessage_Function_glTexSubImage3DOES;
+ static const Function glTranslatef = GLMessage_Function_glTranslatef;
+ static const Function glTranslatex = GLMessage_Function_glTranslatex;
+ static const Function glTranslatexOES = GLMessage_Function_glTranslatexOES;
+ static const Function glUniform1f = GLMessage_Function_glUniform1f;
+ static const Function glUniform1fv = GLMessage_Function_glUniform1fv;
+ static const Function glUniform1i = GLMessage_Function_glUniform1i;
+ static const Function glUniform1iv = GLMessage_Function_glUniform1iv;
+ static const Function glUniform2f = GLMessage_Function_glUniform2f;
+ static const Function glUniform2fv = GLMessage_Function_glUniform2fv;
+ static const Function glUniform2i = GLMessage_Function_glUniform2i;
+ static const Function glUniform2iv = GLMessage_Function_glUniform2iv;
+ static const Function glUniform3f = GLMessage_Function_glUniform3f;
+ static const Function glUniform3fv = GLMessage_Function_glUniform3fv;
+ static const Function glUniform3i = GLMessage_Function_glUniform3i;
+ static const Function glUniform3iv = GLMessage_Function_glUniform3iv;
+ static const Function glUniform4f = GLMessage_Function_glUniform4f;
+ static const Function glUniform4fv = GLMessage_Function_glUniform4fv;
+ static const Function glUniform4i = GLMessage_Function_glUniform4i;
+ static const Function glUniform4iv = GLMessage_Function_glUniform4iv;
+ static const Function glUniformMatrix2fv = GLMessage_Function_glUniformMatrix2fv;
+ static const Function glUniformMatrix3fv = GLMessage_Function_glUniformMatrix3fv;
+ static const Function glUniformMatrix4fv = GLMessage_Function_glUniformMatrix4fv;
+ static const Function glUnmapBufferOES = GLMessage_Function_glUnmapBufferOES;
+ static const Function glUseProgram = GLMessage_Function_glUseProgram;
+ static const Function glValidateProgram = GLMessage_Function_glValidateProgram;
+ static const Function glVertexAttrib1f = GLMessage_Function_glVertexAttrib1f;
+ static const Function glVertexAttrib1fv = GLMessage_Function_glVertexAttrib1fv;
+ static const Function glVertexAttrib2f = GLMessage_Function_glVertexAttrib2f;
+ static const Function glVertexAttrib2fv = GLMessage_Function_glVertexAttrib2fv;
+ static const Function glVertexAttrib3f = GLMessage_Function_glVertexAttrib3f;
+ static const Function glVertexAttrib3fv = GLMessage_Function_glVertexAttrib3fv;
+ static const Function glVertexAttrib4f = GLMessage_Function_glVertexAttrib4f;
+ static const Function glVertexAttrib4fv = GLMessage_Function_glVertexAttrib4fv;
+ static const Function glVertexAttribPointer = GLMessage_Function_glVertexAttribPointer;
+ static const Function glVertexPointer = GLMessage_Function_glVertexPointer;
+ static const Function glViewport = GLMessage_Function_glViewport;
+ static const Function glWeightPointerOES = GLMessage_Function_glWeightPointerOES;
+ static const Function eglGetDisplay = GLMessage_Function_eglGetDisplay;
+ static const Function eglInitialize = GLMessage_Function_eglInitialize;
+ static const Function eglTerminate = GLMessage_Function_eglTerminate;
+ static const Function eglGetConfigs = GLMessage_Function_eglGetConfigs;
+ static const Function eglChooseConfig = GLMessage_Function_eglChooseConfig;
+ static const Function eglGetConfigAttrib = GLMessage_Function_eglGetConfigAttrib;
+ static const Function eglCreateWindowSurface = GLMessage_Function_eglCreateWindowSurface;
+ static const Function eglCreatePixmapSurface = GLMessage_Function_eglCreatePixmapSurface;
+ static const Function eglCreatePbufferSurface = GLMessage_Function_eglCreatePbufferSurface;
+ static const Function eglDestroySurface = GLMessage_Function_eglDestroySurface;
+ static const Function eglQuerySurface = GLMessage_Function_eglQuerySurface;
+ static const Function eglCreateContext = GLMessage_Function_eglCreateContext;
+ static const Function eglDestroyContext = GLMessage_Function_eglDestroyContext;
+ static const Function eglMakeCurrent = GLMessage_Function_eglMakeCurrent;
+ static const Function eglGetCurrentContext = GLMessage_Function_eglGetCurrentContext;
+ static const Function eglGetCurrentSurface = GLMessage_Function_eglGetCurrentSurface;
+ static const Function eglGetCurrentDisplay = GLMessage_Function_eglGetCurrentDisplay;
+ static const Function eglQueryContext = GLMessage_Function_eglQueryContext;
+ static const Function eglWaitGL = GLMessage_Function_eglWaitGL;
+ static const Function eglWaitNative = GLMessage_Function_eglWaitNative;
+ static const Function eglSwapBuffers = GLMessage_Function_eglSwapBuffers;
+ static const Function eglCopyBuffers = GLMessage_Function_eglCopyBuffers;
+ static const Function eglGetError = GLMessage_Function_eglGetError;
+ static const Function eglQueryString = GLMessage_Function_eglQueryString;
+ static const Function eglGetProcAddress = GLMessage_Function_eglGetProcAddress;
+ static const Function eglSurfaceAttrib = GLMessage_Function_eglSurfaceAttrib;
+ static const Function eglBindTexImage = GLMessage_Function_eglBindTexImage;
+ static const Function eglReleaseTexImage = GLMessage_Function_eglReleaseTexImage;
+ static const Function eglSwapInterval = GLMessage_Function_eglSwapInterval;
+ static const Function eglBindAPI = GLMessage_Function_eglBindAPI;
+ static const Function eglQueryAPI = GLMessage_Function_eglQueryAPI;
+ static const Function eglWaitClient = GLMessage_Function_eglWaitClient;
+ static const Function eglReleaseThread = GLMessage_Function_eglReleaseThread;
+ static const Function eglCreatePbufferFromClientBuffer = GLMessage_Function_eglCreatePbufferFromClientBuffer;
+ static const Function eglLockSurfaceKHR = GLMessage_Function_eglLockSurfaceKHR;
+ static const Function eglUnlockSurfaceKHR = GLMessage_Function_eglUnlockSurfaceKHR;
+ static const Function eglCreateImageKHR = GLMessage_Function_eglCreateImageKHR;
+ static const Function eglDestroyImageKHR = GLMessage_Function_eglDestroyImageKHR;
+ static const Function eglCreateSyncKHR = GLMessage_Function_eglCreateSyncKHR;
+ static const Function eglDestroySyncKHR = GLMessage_Function_eglDestroySyncKHR;
+ static const Function eglClientWaitSyncKHR = GLMessage_Function_eglClientWaitSyncKHR;
+ static const Function eglGetSyncAttribKHR = GLMessage_Function_eglGetSyncAttribKHR;
+ static const Function eglSetSwapRectangleANDROID = GLMessage_Function_eglSetSwapRectangleANDROID;
+ static const Function eglGetRenderBufferANDROID = GLMessage_Function_eglGetRenderBufferANDROID;
+ static const Function eglGetSystemTimeFrequencyNV = GLMessage_Function_eglGetSystemTimeFrequencyNV;
+ static const Function eglGetSystemTimeNV = GLMessage_Function_eglGetSystemTimeNV;
+ static const Function invalid = GLMessage_Function_invalid;
+ static const Function frameBufferContents = GLMessage_Function_frameBufferContents;
+ static inline bool Function_IsValid(int value) {
+ return GLMessage_Function_IsValid(value);
+ }
+ static const Function Function_MIN =
+ GLMessage_Function_Function_MIN;
+ static const Function Function_MAX =
+ GLMessage_Function_Function_MAX;
+ static const int Function_ARRAYSIZE =
+ GLMessage_Function_Function_ARRAYSIZE;
+
+ // accessors -------------------------------------------------------
+
+ // required int32 context_id = 1;
+ inline bool has_context_id() const;
+ inline void clear_context_id();
+ static const int kContextIdFieldNumber = 1;
+ inline ::google::protobuf::int32 context_id() const;
+ inline void set_context_id(::google::protobuf::int32 value);
+
+ // required .android.gltrace.GLMessage.Function function = 2 [default = invalid];
+ inline bool has_function() const;
+ inline void clear_function();
+ static const int kFunctionFieldNumber = 2;
+ inline ::android::gltrace::GLMessage_Function function() const;
+ inline void set_function(::android::gltrace::GLMessage_Function value);
+
+ // repeated .android.gltrace.GLMessage.DataType args = 3;
+ inline int args_size() const;
+ inline void clear_args();
+ static const int kArgsFieldNumber = 3;
+ inline const ::android::gltrace::GLMessage_DataType& args(int index) const;
+ inline ::android::gltrace::GLMessage_DataType* mutable_args(int index);
+ inline ::android::gltrace::GLMessage_DataType* add_args();
+ inline const ::google::protobuf::RepeatedPtrField< ::android::gltrace::GLMessage_DataType >&
+ args() const;
+ inline ::google::protobuf::RepeatedPtrField< ::android::gltrace::GLMessage_DataType >*
+ mutable_args();
+
+ // optional .android.gltrace.GLMessage.DataType returnValue = 4;
+ inline bool has_returnvalue() const;
+ inline void clear_returnvalue();
+ static const int kReturnValueFieldNumber = 4;
+ inline const ::android::gltrace::GLMessage_DataType& returnvalue() const;
+ inline ::android::gltrace::GLMessage_DataType* mutable_returnvalue();
+
+ // optional float duration = 5;
+ inline bool has_duration() const;
+ inline void clear_duration();
+ static const int kDurationFieldNumber = 5;
+ inline float duration() const;
+ inline void set_duration(float value);
+
+ // @@protoc_insertion_point(class_scope:android.gltrace.GLMessage)
+ private:
+ mutable int _cached_size_;
+
+ ::google::protobuf::int32 context_id_;
+ int function_;
+ ::google::protobuf::RepeatedPtrField< ::android::gltrace::GLMessage_DataType > args_;
+ ::android::gltrace::GLMessage_DataType* returnvalue_;
+ float duration_;
+ friend void protobuf_AddDesc_gltrace_2eproto();
+ friend void protobuf_AssignDesc_gltrace_2eproto();
+ friend void protobuf_ShutdownFile_gltrace_2eproto();
+
+ ::google::protobuf::uint32 _has_bits_[(5 + 31) / 32];
+
+ // WHY DOES & HAVE LOWER PRECEDENCE THAN != !?
+ inline bool _has_bit(int index) const {
+ return (_has_bits_[index / 32] & (1u << (index % 32))) != 0;
+ }
+ inline void _set_bit(int index) {
+ _has_bits_[index / 32] |= (1u << (index % 32));
+ }
+ inline void _clear_bit(int index) {
+ _has_bits_[index / 32] &= ~(1u << (index % 32));
+ }
+
+ void InitAsDefaultInstance();
+ static GLMessage* default_instance_;
+};
+// ===================================================================
+
+
+// ===================================================================
+
+// GLMessage_DataType
+
+// required .android.gltrace.GLMessage.DataType.Type type = 1 [default = VOID];
+inline bool GLMessage_DataType::has_type() const {
+ return _has_bit(0);
+}
+inline void GLMessage_DataType::clear_type() {
+ type_ = 1;
+ _clear_bit(0);
+}
+inline ::android::gltrace::GLMessage_DataType_Type GLMessage_DataType::type() const {
+ return static_cast< ::android::gltrace::GLMessage_DataType_Type >(type_);
+}
+inline void GLMessage_DataType::set_type(::android::gltrace::GLMessage_DataType_Type value) {
+ GOOGLE_DCHECK(::android::gltrace::GLMessage_DataType_Type_IsValid(value));
+ _set_bit(0);
+ type_ = value;
+}
+
+// required bool isArray = 2 [default = false];
+inline bool GLMessage_DataType::has_isarray() const {
+ return _has_bit(1);
+}
+inline void GLMessage_DataType::clear_isarray() {
+ isarray_ = false;
+ _clear_bit(1);
+}
+inline bool GLMessage_DataType::isarray() const {
+ return isarray_;
+}
+inline void GLMessage_DataType::set_isarray(bool value) {
+ _set_bit(1);
+ isarray_ = value;
+}
+
+// repeated int32 intValue = 3;
+inline int GLMessage_DataType::intvalue_size() const {
+ return intvalue_.size();
+}
+inline void GLMessage_DataType::clear_intvalue() {
+ intvalue_.Clear();
+}
+inline ::google::protobuf::int32 GLMessage_DataType::intvalue(int index) const {
+ return intvalue_.Get(index);
+}
+inline void GLMessage_DataType::set_intvalue(int index, ::google::protobuf::int32 value) {
+ intvalue_.Set(index, value);
+}
+inline void GLMessage_DataType::add_intvalue(::google::protobuf::int32 value) {
+ intvalue_.Add(value);
+}
+inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
+GLMessage_DataType::intvalue() const {
+ return intvalue_;
+}
+inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
+GLMessage_DataType::mutable_intvalue() {
+ return &intvalue_;
+}
+
+// repeated float floatValue = 4;
+inline int GLMessage_DataType::floatvalue_size() const {
+ return floatvalue_.size();
+}
+inline void GLMessage_DataType::clear_floatvalue() {
+ floatvalue_.Clear();
+}
+inline float GLMessage_DataType::floatvalue(int index) const {
+ return floatvalue_.Get(index);
+}
+inline void GLMessage_DataType::set_floatvalue(int index, float value) {
+ floatvalue_.Set(index, value);
+}
+inline void GLMessage_DataType::add_floatvalue(float value) {
+ floatvalue_.Add(value);
+}
+inline const ::google::protobuf::RepeatedField< float >&
+GLMessage_DataType::floatvalue() const {
+ return floatvalue_;
+}
+inline ::google::protobuf::RepeatedField< float >*
+GLMessage_DataType::mutable_floatvalue() {
+ return &floatvalue_;
+}
+
+// repeated bytes charValue = 5;
+inline int GLMessage_DataType::charvalue_size() const {
+ return charvalue_.size();
+}
+inline void GLMessage_DataType::clear_charvalue() {
+ charvalue_.Clear();
+}
+inline const ::std::string& GLMessage_DataType::charvalue(int index) const {
+ return charvalue_.Get(index);
+}
+inline ::std::string* GLMessage_DataType::mutable_charvalue(int index) {
+ return charvalue_.Mutable(index);
+}
+inline void GLMessage_DataType::set_charvalue(int index, const ::std::string& value) {
+ charvalue_.Mutable(index)->assign(value);
+}
+inline void GLMessage_DataType::set_charvalue(int index, const char* value) {
+ charvalue_.Mutable(index)->assign(value);
+}
+inline void GLMessage_DataType::set_charvalue(int index, const void* value, size_t size) {
+ charvalue_.Mutable(index)->assign(
+ reinterpret_cast<const char*>(value), size);
+}
+inline ::std::string* GLMessage_DataType::add_charvalue() {
+ return charvalue_.Add();
+}
+inline void GLMessage_DataType::add_charvalue(const ::std::string& value) {
+ charvalue_.Add()->assign(value);
+}
+inline void GLMessage_DataType::add_charvalue(const char* value) {
+ charvalue_.Add()->assign(value);
+}
+inline void GLMessage_DataType::add_charvalue(const void* value, size_t size) {
+ charvalue_.Add()->assign(reinterpret_cast<const char*>(value), size);
+}
+inline const ::google::protobuf::RepeatedPtrField< ::std::string>&
+GLMessage_DataType::charvalue() const {
+ return charvalue_;
+}
+inline ::google::protobuf::RepeatedPtrField< ::std::string>*
+GLMessage_DataType::mutable_charvalue() {
+ return &charvalue_;
+}
+
+// repeated bytes rawBytes = 6;
+inline int GLMessage_DataType::rawbytes_size() const {
+ return rawbytes_.size();
+}
+inline void GLMessage_DataType::clear_rawbytes() {
+ rawbytes_.Clear();
+}
+inline const ::std::string& GLMessage_DataType::rawbytes(int index) const {
+ return rawbytes_.Get(index);
+}
+inline ::std::string* GLMessage_DataType::mutable_rawbytes(int index) {
+ return rawbytes_.Mutable(index);
+}
+inline void GLMessage_DataType::set_rawbytes(int index, const ::std::string& value) {
+ rawbytes_.Mutable(index)->assign(value);
+}
+inline void GLMessage_DataType::set_rawbytes(int index, const char* value) {
+ rawbytes_.Mutable(index)->assign(value);
+}
+inline void GLMessage_DataType::set_rawbytes(int index, const void* value, size_t size) {
+ rawbytes_.Mutable(index)->assign(
+ reinterpret_cast<const char*>(value), size);
+}
+inline ::std::string* GLMessage_DataType::add_rawbytes() {
+ return rawbytes_.Add();
+}
+inline void GLMessage_DataType::add_rawbytes(const ::std::string& value) {
+ rawbytes_.Add()->assign(value);
+}
+inline void GLMessage_DataType::add_rawbytes(const char* value) {
+ rawbytes_.Add()->assign(value);
+}
+inline void GLMessage_DataType::add_rawbytes(const void* value, size_t size) {
+ rawbytes_.Add()->assign(reinterpret_cast<const char*>(value), size);
+}
+inline const ::google::protobuf::RepeatedPtrField< ::std::string>&
+GLMessage_DataType::rawbytes() const {
+ return rawbytes_;
+}
+inline ::google::protobuf::RepeatedPtrField< ::std::string>*
+GLMessage_DataType::mutable_rawbytes() {
+ return &rawbytes_;
+}
+
+// repeated bool boolValue = 7;
+inline int GLMessage_DataType::boolvalue_size() const {
+ return boolvalue_.size();
+}
+inline void GLMessage_DataType::clear_boolvalue() {
+ boolvalue_.Clear();
+}
+inline bool GLMessage_DataType::boolvalue(int index) const {
+ return boolvalue_.Get(index);
+}
+inline void GLMessage_DataType::set_boolvalue(int index, bool value) {
+ boolvalue_.Set(index, value);
+}
+inline void GLMessage_DataType::add_boolvalue(bool value) {
+ boolvalue_.Add(value);
+}
+inline const ::google::protobuf::RepeatedField< bool >&
+GLMessage_DataType::boolvalue() const {
+ return boolvalue_;
+}
+inline ::google::protobuf::RepeatedField< bool >*
+GLMessage_DataType::mutable_boolvalue() {
+ return &boolvalue_;
+}
+
+// -------------------------------------------------------------------
+
+// GLMessage
+
+// required int32 context_id = 1;
+inline bool GLMessage::has_context_id() const {
+ return _has_bit(0);
+}
+inline void GLMessage::clear_context_id() {
+ context_id_ = 0;
+ _clear_bit(0);
+}
+inline ::google::protobuf::int32 GLMessage::context_id() const {
+ return context_id_;
+}
+inline void GLMessage::set_context_id(::google::protobuf::int32 value) {
+ _set_bit(0);
+ context_id_ = value;
+}
+
+// required .android.gltrace.GLMessage.Function function = 2 [default = invalid];
+inline bool GLMessage::has_function() const {
+ return _has_bit(1);
+}
+inline void GLMessage::clear_function() {
+ function_ = 3000;
+ _clear_bit(1);
+}
+inline ::android::gltrace::GLMessage_Function GLMessage::function() const {
+ return static_cast< ::android::gltrace::GLMessage_Function >(function_);
+}
+inline void GLMessage::set_function(::android::gltrace::GLMessage_Function value) {
+ GOOGLE_DCHECK(::android::gltrace::GLMessage_Function_IsValid(value));
+ _set_bit(1);
+ function_ = value;
+}
+
+// repeated .android.gltrace.GLMessage.DataType args = 3;
+inline int GLMessage::args_size() const {
+ return args_.size();
+}
+inline void GLMessage::clear_args() {
+ args_.Clear();
+}
+inline const ::android::gltrace::GLMessage_DataType& GLMessage::args(int index) const {
+ return args_.Get(index);
+}
+inline ::android::gltrace::GLMessage_DataType* GLMessage::mutable_args(int index) {
+ return args_.Mutable(index);
+}
+inline ::android::gltrace::GLMessage_DataType* GLMessage::add_args() {
+ return args_.Add();
+}
+inline const ::google::protobuf::RepeatedPtrField< ::android::gltrace::GLMessage_DataType >&
+GLMessage::args() const {
+ return args_;
+}
+inline ::google::protobuf::RepeatedPtrField< ::android::gltrace::GLMessage_DataType >*
+GLMessage::mutable_args() {
+ return &args_;
+}
+
+// optional .android.gltrace.GLMessage.DataType returnValue = 4;
+inline bool GLMessage::has_returnvalue() const {
+ return _has_bit(3);
+}
+inline void GLMessage::clear_returnvalue() {
+ if (returnvalue_ != NULL) returnvalue_->::android::gltrace::GLMessage_DataType::Clear();
+ _clear_bit(3);
+}
+inline const ::android::gltrace::GLMessage_DataType& GLMessage::returnvalue() const {
+ return returnvalue_ != NULL ? *returnvalue_ : *default_instance_->returnvalue_;
+}
+inline ::android::gltrace::GLMessage_DataType* GLMessage::mutable_returnvalue() {
+ _set_bit(3);
+ if (returnvalue_ == NULL) returnvalue_ = new ::android::gltrace::GLMessage_DataType;
+ return returnvalue_;
+}
+
+// optional float duration = 5;
+inline bool GLMessage::has_duration() const {
+ return _has_bit(4);
+}
+inline void GLMessage::clear_duration() {
+ duration_ = 0;
+ _clear_bit(4);
+}
+inline float GLMessage::duration() const {
+ return duration_;
+}
+inline void GLMessage::set_duration(float value) {
+ _set_bit(4);
+ duration_ = value;
+}
+
+
+// @@protoc_insertion_point(namespace_scope)
+
+} // namespace gltrace
+} // namespace android
+
+// @@protoc_insertion_point(global_scope)
+
+#endif // PROTOBUF_gltrace_2eproto__INCLUDED
diff --git a/opengl/libs/GLES_trace/src/gltrace_api.cpp b/opengl/libs/GLES_trace/src/gltrace_api.cpp
new file mode 100644
index 0000000..91929f3
--- /dev/null
+++ b/opengl/libs/GLES_trace/src/gltrace_api.cpp
@@ -0,0 +1,11921 @@
+/*
+ * Copyright 2011, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * THIS FILE WAS GENERATED BY A SCRIPT. DO NOT EDIT.
+ */
+
+#include <cutils/log.h>
+#include <GLES2/gl2.h>
+
+#include "gltrace.pb.h"
+#include "gltrace_context.h"
+#include "gltrace_fixup.h"
+#include "gltrace_transport.h"
+
+namespace android {
+namespace gltrace {
+
+
+// Definitions for GL2 APIs
+
+void GLTrace_glActiveTexture(GLenum texture) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glActiveTexture);
+
+ // copy argument texture
+ GLMessage_DataType *arg_texture = glmsg.add_args();
+ arg_texture->set_isarray(false);
+ arg_texture->set_type(GLMessage::DataType::ENUM);
+ arg_texture->add_intvalue((int)texture);
+
+ // call function
+ glContext->hooks->gl.glActiveTexture(texture);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glAttachShader(GLuint program, GLuint shader) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glAttachShader);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // copy argument shader
+ GLMessage_DataType *arg_shader = glmsg.add_args();
+ arg_shader->set_isarray(false);
+ arg_shader->set_type(GLMessage::DataType::INT);
+ arg_shader->add_intvalue(shader);
+
+ // call function
+ glContext->hooks->gl.glAttachShader(program, shader);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glBindAttribLocation(GLuint program, GLuint index, const GLchar* name) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glBindAttribLocation);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // copy argument index
+ GLMessage_DataType *arg_index = glmsg.add_args();
+ arg_index->set_isarray(false);
+ arg_index->set_type(GLMessage::DataType::INT);
+ arg_index->add_intvalue(index);
+
+ // copy argument name
+ GLMessage_DataType *arg_name = glmsg.add_args();
+ arg_name->set_isarray(false);
+ arg_name->set_type(GLMessage::DataType::INT);
+ arg_name->add_intvalue((int)name);
+
+ // call function
+ glContext->hooks->gl.glBindAttribLocation(program, index, name);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glBindBuffer(GLenum target, GLuint buffer) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glBindBuffer);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument buffer
+ GLMessage_DataType *arg_buffer = glmsg.add_args();
+ arg_buffer->set_isarray(false);
+ arg_buffer->set_type(GLMessage::DataType::INT);
+ arg_buffer->add_intvalue(buffer);
+
+ // call function
+ glContext->hooks->gl.glBindBuffer(target, buffer);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glBindFramebuffer(GLenum target, GLuint framebuffer) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glBindFramebuffer);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument framebuffer
+ GLMessage_DataType *arg_framebuffer = glmsg.add_args();
+ arg_framebuffer->set_isarray(false);
+ arg_framebuffer->set_type(GLMessage::DataType::INT);
+ arg_framebuffer->add_intvalue(framebuffer);
+
+ // call function
+ glContext->hooks->gl.glBindFramebuffer(target, framebuffer);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glBindRenderbuffer(GLenum target, GLuint renderbuffer) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glBindRenderbuffer);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument renderbuffer
+ GLMessage_DataType *arg_renderbuffer = glmsg.add_args();
+ arg_renderbuffer->set_isarray(false);
+ arg_renderbuffer->set_type(GLMessage::DataType::INT);
+ arg_renderbuffer->add_intvalue(renderbuffer);
+
+ // call function
+ glContext->hooks->gl.glBindRenderbuffer(target, renderbuffer);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glBindTexture(GLenum target, GLuint texture) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glBindTexture);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument texture
+ GLMessage_DataType *arg_texture = glmsg.add_args();
+ arg_texture->set_isarray(false);
+ arg_texture->set_type(GLMessage::DataType::INT);
+ arg_texture->add_intvalue(texture);
+
+ // call function
+ glContext->hooks->gl.glBindTexture(target, texture);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glBlendColor);
+
+ // copy argument red
+ GLMessage_DataType *arg_red = glmsg.add_args();
+ arg_red->set_isarray(false);
+ arg_red->set_type(GLMessage::DataType::FLOAT);
+ arg_red->add_floatvalue(red);
+
+ // copy argument green
+ GLMessage_DataType *arg_green = glmsg.add_args();
+ arg_green->set_isarray(false);
+ arg_green->set_type(GLMessage::DataType::FLOAT);
+ arg_green->add_floatvalue(green);
+
+ // copy argument blue
+ GLMessage_DataType *arg_blue = glmsg.add_args();
+ arg_blue->set_isarray(false);
+ arg_blue->set_type(GLMessage::DataType::FLOAT);
+ arg_blue->add_floatvalue(blue);
+
+ // copy argument alpha
+ GLMessage_DataType *arg_alpha = glmsg.add_args();
+ arg_alpha->set_isarray(false);
+ arg_alpha->set_type(GLMessage::DataType::FLOAT);
+ arg_alpha->add_floatvalue(alpha);
+
+ // call function
+ glContext->hooks->gl.glBlendColor(red, green, blue, alpha);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glBlendEquation(GLenum mode) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glBlendEquation);
+
+ // copy argument mode
+ GLMessage_DataType *arg_mode = glmsg.add_args();
+ arg_mode->set_isarray(false);
+ arg_mode->set_type(GLMessage::DataType::ENUM);
+ arg_mode->add_intvalue((int)mode);
+
+ // call function
+ glContext->hooks->gl.glBlendEquation(mode);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glBlendEquationSeparate);
+
+ // copy argument modeRGB
+ GLMessage_DataType *arg_modeRGB = glmsg.add_args();
+ arg_modeRGB->set_isarray(false);
+ arg_modeRGB->set_type(GLMessage::DataType::ENUM);
+ arg_modeRGB->add_intvalue((int)modeRGB);
+
+ // copy argument modeAlpha
+ GLMessage_DataType *arg_modeAlpha = glmsg.add_args();
+ arg_modeAlpha->set_isarray(false);
+ arg_modeAlpha->set_type(GLMessage::DataType::ENUM);
+ arg_modeAlpha->add_intvalue((int)modeAlpha);
+
+ // call function
+ glContext->hooks->gl.glBlendEquationSeparate(modeRGB, modeAlpha);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glBlendFunc(GLenum sfactor, GLenum dfactor) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glBlendFunc);
+
+ // copy argument sfactor
+ GLMessage_DataType *arg_sfactor = glmsg.add_args();
+ arg_sfactor->set_isarray(false);
+ arg_sfactor->set_type(GLMessage::DataType::ENUM);
+ arg_sfactor->add_intvalue((int)sfactor);
+
+ // copy argument dfactor
+ GLMessage_DataType *arg_dfactor = glmsg.add_args();
+ arg_dfactor->set_isarray(false);
+ arg_dfactor->set_type(GLMessage::DataType::ENUM);
+ arg_dfactor->add_intvalue((int)dfactor);
+
+ // call function
+ glContext->hooks->gl.glBlendFunc(sfactor, dfactor);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glBlendFuncSeparate);
+
+ // copy argument srcRGB
+ GLMessage_DataType *arg_srcRGB = glmsg.add_args();
+ arg_srcRGB->set_isarray(false);
+ arg_srcRGB->set_type(GLMessage::DataType::ENUM);
+ arg_srcRGB->add_intvalue((int)srcRGB);
+
+ // copy argument dstRGB
+ GLMessage_DataType *arg_dstRGB = glmsg.add_args();
+ arg_dstRGB->set_isarray(false);
+ arg_dstRGB->set_type(GLMessage::DataType::ENUM);
+ arg_dstRGB->add_intvalue((int)dstRGB);
+
+ // copy argument srcAlpha
+ GLMessage_DataType *arg_srcAlpha = glmsg.add_args();
+ arg_srcAlpha->set_isarray(false);
+ arg_srcAlpha->set_type(GLMessage::DataType::ENUM);
+ arg_srcAlpha->add_intvalue((int)srcAlpha);
+
+ // copy argument dstAlpha
+ GLMessage_DataType *arg_dstAlpha = glmsg.add_args();
+ arg_dstAlpha->set_isarray(false);
+ arg_dstAlpha->set_type(GLMessage::DataType::ENUM);
+ arg_dstAlpha->add_intvalue((int)dstAlpha);
+
+ // call function
+ glContext->hooks->gl.glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glBufferData);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument size
+ GLMessage_DataType *arg_size = glmsg.add_args();
+ arg_size->set_isarray(false);
+ arg_size->set_type(GLMessage::DataType::INT);
+ arg_size->add_intvalue((int)size);
+
+ // copy argument data
+ GLMessage_DataType *arg_data = glmsg.add_args();
+ arg_data->set_isarray(false);
+ arg_data->set_type(GLMessage::DataType::INT);
+ arg_data->add_intvalue((int)data);
+
+ // copy argument usage
+ GLMessage_DataType *arg_usage = glmsg.add_args();
+ arg_usage->set_isarray(false);
+ arg_usage->set_type(GLMessage::DataType::ENUM);
+ arg_usage->add_intvalue((int)usage);
+
+ // call function
+ glContext->hooks->gl.glBufferData(target, size, data, usage);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glBufferSubData);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument offset
+ GLMessage_DataType *arg_offset = glmsg.add_args();
+ arg_offset->set_isarray(false);
+ arg_offset->set_type(GLMessage::DataType::INT);
+ arg_offset->add_intvalue((int)offset);
+
+ // copy argument size
+ GLMessage_DataType *arg_size = glmsg.add_args();
+ arg_size->set_isarray(false);
+ arg_size->set_type(GLMessage::DataType::INT);
+ arg_size->add_intvalue((int)size);
+
+ // copy argument data
+ GLMessage_DataType *arg_data = glmsg.add_args();
+ arg_data->set_isarray(false);
+ arg_data->set_type(GLMessage::DataType::INT);
+ arg_data->add_intvalue((int)data);
+
+ // call function
+ glContext->hooks->gl.glBufferSubData(target, offset, size, data);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+GLenum GLTrace_glCheckFramebufferStatus(GLenum target) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glCheckFramebufferStatus);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // call function
+ GLenum retValue = glContext->hooks->gl.glCheckFramebufferStatus(target);
+
+ // set return value
+ GLMessage_DataType *rt = glmsg.mutable_returnvalue();
+ rt->set_isarray(false);
+ rt->set_type(GLMessage::DataType::ENUM);
+ rt->add_intvalue((int)retValue);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+
+ return retValue;
+}
+
+void GLTrace_glClear(GLbitfield mask) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glClear);
+
+ // copy argument mask
+ GLMessage_DataType *arg_mask = glmsg.add_args();
+ arg_mask->set_isarray(false);
+ arg_mask->set_type(GLMessage::DataType::INT);
+ arg_mask->add_intvalue(mask);
+
+ // call function
+ glContext->hooks->gl.glClear(mask);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glClearColor);
+
+ // copy argument red
+ GLMessage_DataType *arg_red = glmsg.add_args();
+ arg_red->set_isarray(false);
+ arg_red->set_type(GLMessage::DataType::FLOAT);
+ arg_red->add_floatvalue(red);
+
+ // copy argument green
+ GLMessage_DataType *arg_green = glmsg.add_args();
+ arg_green->set_isarray(false);
+ arg_green->set_type(GLMessage::DataType::FLOAT);
+ arg_green->add_floatvalue(green);
+
+ // copy argument blue
+ GLMessage_DataType *arg_blue = glmsg.add_args();
+ arg_blue->set_isarray(false);
+ arg_blue->set_type(GLMessage::DataType::FLOAT);
+ arg_blue->add_floatvalue(blue);
+
+ // copy argument alpha
+ GLMessage_DataType *arg_alpha = glmsg.add_args();
+ arg_alpha->set_isarray(false);
+ arg_alpha->set_type(GLMessage::DataType::FLOAT);
+ arg_alpha->add_floatvalue(alpha);
+
+ // call function
+ glContext->hooks->gl.glClearColor(red, green, blue, alpha);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glClearDepthf(GLclampf depth) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glClearDepthf);
+
+ // copy argument depth
+ GLMessage_DataType *arg_depth = glmsg.add_args();
+ arg_depth->set_isarray(false);
+ arg_depth->set_type(GLMessage::DataType::FLOAT);
+ arg_depth->add_floatvalue(depth);
+
+ // call function
+ glContext->hooks->gl.glClearDepthf(depth);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glClearStencil(GLint s) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glClearStencil);
+
+ // copy argument s
+ GLMessage_DataType *arg_s = glmsg.add_args();
+ arg_s->set_isarray(false);
+ arg_s->set_type(GLMessage::DataType::INT);
+ arg_s->add_intvalue(s);
+
+ // call function
+ glContext->hooks->gl.glClearStencil(s);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glColorMask);
+
+ // copy argument red
+ GLMessage_DataType *arg_red = glmsg.add_args();
+ arg_red->set_isarray(false);
+ arg_red->set_type(GLMessage::DataType::BOOL);
+ arg_red->add_boolvalue(red);
+
+ // copy argument green
+ GLMessage_DataType *arg_green = glmsg.add_args();
+ arg_green->set_isarray(false);
+ arg_green->set_type(GLMessage::DataType::BOOL);
+ arg_green->add_boolvalue(green);
+
+ // copy argument blue
+ GLMessage_DataType *arg_blue = glmsg.add_args();
+ arg_blue->set_isarray(false);
+ arg_blue->set_type(GLMessage::DataType::BOOL);
+ arg_blue->add_boolvalue(blue);
+
+ // copy argument alpha
+ GLMessage_DataType *arg_alpha = glmsg.add_args();
+ arg_alpha->set_isarray(false);
+ arg_alpha->set_type(GLMessage::DataType::BOOL);
+ arg_alpha->add_boolvalue(alpha);
+
+ // call function
+ glContext->hooks->gl.glColorMask(red, green, blue, alpha);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glCompileShader(GLuint shader) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glCompileShader);
+
+ // copy argument shader
+ GLMessage_DataType *arg_shader = glmsg.add_args();
+ arg_shader->set_isarray(false);
+ arg_shader->set_type(GLMessage::DataType::INT);
+ arg_shader->add_intvalue(shader);
+
+ // call function
+ glContext->hooks->gl.glCompileShader(shader);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glCompressedTexImage2D);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument level
+ GLMessage_DataType *arg_level = glmsg.add_args();
+ arg_level->set_isarray(false);
+ arg_level->set_type(GLMessage::DataType::INT);
+ arg_level->add_intvalue(level);
+
+ // copy argument internalformat
+ GLMessage_DataType *arg_internalformat = glmsg.add_args();
+ arg_internalformat->set_isarray(false);
+ arg_internalformat->set_type(GLMessage::DataType::ENUM);
+ arg_internalformat->add_intvalue((int)internalformat);
+
+ // copy argument width
+ GLMessage_DataType *arg_width = glmsg.add_args();
+ arg_width->set_isarray(false);
+ arg_width->set_type(GLMessage::DataType::INT);
+ arg_width->add_intvalue(width);
+
+ // copy argument height
+ GLMessage_DataType *arg_height = glmsg.add_args();
+ arg_height->set_isarray(false);
+ arg_height->set_type(GLMessage::DataType::INT);
+ arg_height->add_intvalue(height);
+
+ // copy argument border
+ GLMessage_DataType *arg_border = glmsg.add_args();
+ arg_border->set_isarray(false);
+ arg_border->set_type(GLMessage::DataType::INT);
+ arg_border->add_intvalue(border);
+
+ // copy argument imageSize
+ GLMessage_DataType *arg_imageSize = glmsg.add_args();
+ arg_imageSize->set_isarray(false);
+ arg_imageSize->set_type(GLMessage::DataType::INT);
+ arg_imageSize->add_intvalue(imageSize);
+
+ // copy argument data
+ GLMessage_DataType *arg_data = glmsg.add_args();
+ arg_data->set_isarray(false);
+ arg_data->set_type(GLMessage::DataType::INT);
+ arg_data->add_intvalue((int)data);
+
+ // call function
+ glContext->hooks->gl.glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glCompressedTexSubImage2D);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument level
+ GLMessage_DataType *arg_level = glmsg.add_args();
+ arg_level->set_isarray(false);
+ arg_level->set_type(GLMessage::DataType::INT);
+ arg_level->add_intvalue(level);
+
+ // copy argument xoffset
+ GLMessage_DataType *arg_xoffset = glmsg.add_args();
+ arg_xoffset->set_isarray(false);
+ arg_xoffset->set_type(GLMessage::DataType::INT);
+ arg_xoffset->add_intvalue(xoffset);
+
+ // copy argument yoffset
+ GLMessage_DataType *arg_yoffset = glmsg.add_args();
+ arg_yoffset->set_isarray(false);
+ arg_yoffset->set_type(GLMessage::DataType::INT);
+ arg_yoffset->add_intvalue(yoffset);
+
+ // copy argument width
+ GLMessage_DataType *arg_width = glmsg.add_args();
+ arg_width->set_isarray(false);
+ arg_width->set_type(GLMessage::DataType::INT);
+ arg_width->add_intvalue(width);
+
+ // copy argument height
+ GLMessage_DataType *arg_height = glmsg.add_args();
+ arg_height->set_isarray(false);
+ arg_height->set_type(GLMessage::DataType::INT);
+ arg_height->add_intvalue(height);
+
+ // copy argument format
+ GLMessage_DataType *arg_format = glmsg.add_args();
+ arg_format->set_isarray(false);
+ arg_format->set_type(GLMessage::DataType::ENUM);
+ arg_format->add_intvalue((int)format);
+
+ // copy argument imageSize
+ GLMessage_DataType *arg_imageSize = glmsg.add_args();
+ arg_imageSize->set_isarray(false);
+ arg_imageSize->set_type(GLMessage::DataType::INT);
+ arg_imageSize->add_intvalue(imageSize);
+
+ // copy argument data
+ GLMessage_DataType *arg_data = glmsg.add_args();
+ arg_data->set_isarray(false);
+ arg_data->set_type(GLMessage::DataType::INT);
+ arg_data->add_intvalue((int)data);
+
+ // call function
+ glContext->hooks->gl.glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glCopyTexImage2D);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument level
+ GLMessage_DataType *arg_level = glmsg.add_args();
+ arg_level->set_isarray(false);
+ arg_level->set_type(GLMessage::DataType::INT);
+ arg_level->add_intvalue(level);
+
+ // copy argument internalformat
+ GLMessage_DataType *arg_internalformat = glmsg.add_args();
+ arg_internalformat->set_isarray(false);
+ arg_internalformat->set_type(GLMessage::DataType::ENUM);
+ arg_internalformat->add_intvalue((int)internalformat);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::INT);
+ arg_x->add_intvalue(x);
+
+ // copy argument y
+ GLMessage_DataType *arg_y = glmsg.add_args();
+ arg_y->set_isarray(false);
+ arg_y->set_type(GLMessage::DataType::INT);
+ arg_y->add_intvalue(y);
+
+ // copy argument width
+ GLMessage_DataType *arg_width = glmsg.add_args();
+ arg_width->set_isarray(false);
+ arg_width->set_type(GLMessage::DataType::INT);
+ arg_width->add_intvalue(width);
+
+ // copy argument height
+ GLMessage_DataType *arg_height = glmsg.add_args();
+ arg_height->set_isarray(false);
+ arg_height->set_type(GLMessage::DataType::INT);
+ arg_height->add_intvalue(height);
+
+ // copy argument border
+ GLMessage_DataType *arg_border = glmsg.add_args();
+ arg_border->set_isarray(false);
+ arg_border->set_type(GLMessage::DataType::INT);
+ arg_border->add_intvalue(border);
+
+ // call function
+ glContext->hooks->gl.glCopyTexImage2D(target, level, internalformat, x, y, width, height, border);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glCopyTexSubImage2D);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument level
+ GLMessage_DataType *arg_level = glmsg.add_args();
+ arg_level->set_isarray(false);
+ arg_level->set_type(GLMessage::DataType::INT);
+ arg_level->add_intvalue(level);
+
+ // copy argument xoffset
+ GLMessage_DataType *arg_xoffset = glmsg.add_args();
+ arg_xoffset->set_isarray(false);
+ arg_xoffset->set_type(GLMessage::DataType::INT);
+ arg_xoffset->add_intvalue(xoffset);
+
+ // copy argument yoffset
+ GLMessage_DataType *arg_yoffset = glmsg.add_args();
+ arg_yoffset->set_isarray(false);
+ arg_yoffset->set_type(GLMessage::DataType::INT);
+ arg_yoffset->add_intvalue(yoffset);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::INT);
+ arg_x->add_intvalue(x);
+
+ // copy argument y
+ GLMessage_DataType *arg_y = glmsg.add_args();
+ arg_y->set_isarray(false);
+ arg_y->set_type(GLMessage::DataType::INT);
+ arg_y->add_intvalue(y);
+
+ // copy argument width
+ GLMessage_DataType *arg_width = glmsg.add_args();
+ arg_width->set_isarray(false);
+ arg_width->set_type(GLMessage::DataType::INT);
+ arg_width->add_intvalue(width);
+
+ // copy argument height
+ GLMessage_DataType *arg_height = glmsg.add_args();
+ arg_height->set_isarray(false);
+ arg_height->set_type(GLMessage::DataType::INT);
+ arg_height->add_intvalue(height);
+
+ // call function
+ glContext->hooks->gl.glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+GLuint GLTrace_glCreateProgram(void) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glCreateProgram);
+
+ // call function
+ GLuint retValue = glContext->hooks->gl.glCreateProgram();
+
+ // set return value
+ GLMessage_DataType *rt = glmsg.mutable_returnvalue();
+ rt->set_isarray(false);
+ rt->set_type(GLMessage::DataType::INT);
+ rt->add_intvalue(retValue);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+
+ return retValue;
+}
+
+GLuint GLTrace_glCreateShader(GLenum type) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glCreateShader);
+
+ // copy argument type
+ GLMessage_DataType *arg_type = glmsg.add_args();
+ arg_type->set_isarray(false);
+ arg_type->set_type(GLMessage::DataType::ENUM);
+ arg_type->add_intvalue((int)type);
+
+ // call function
+ GLuint retValue = glContext->hooks->gl.glCreateShader(type);
+
+ // set return value
+ GLMessage_DataType *rt = glmsg.mutable_returnvalue();
+ rt->set_isarray(false);
+ rt->set_type(GLMessage::DataType::INT);
+ rt->add_intvalue(retValue);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+
+ return retValue;
+}
+
+void GLTrace_glCullFace(GLenum mode) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glCullFace);
+
+ // copy argument mode
+ GLMessage_DataType *arg_mode = glmsg.add_args();
+ arg_mode->set_isarray(false);
+ arg_mode->set_type(GLMessage::DataType::ENUM);
+ arg_mode->add_intvalue((int)mode);
+
+ // call function
+ glContext->hooks->gl.glCullFace(mode);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDeleteBuffers(GLsizei n, const GLuint* buffers) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glDeleteBuffers);
+
+ // copy argument n
+ GLMessage_DataType *arg_n = glmsg.add_args();
+ arg_n->set_isarray(false);
+ arg_n->set_type(GLMessage::DataType::INT);
+ arg_n->add_intvalue(n);
+
+ // copy argument buffers
+ GLMessage_DataType *arg_buffers = glmsg.add_args();
+ arg_buffers->set_isarray(false);
+ arg_buffers->set_type(GLMessage::DataType::INT);
+ arg_buffers->add_intvalue((int)buffers);
+
+ // call function
+ glContext->hooks->gl.glDeleteBuffers(n, buffers);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glDeleteFramebuffers);
+
+ // copy argument n
+ GLMessage_DataType *arg_n = glmsg.add_args();
+ arg_n->set_isarray(false);
+ arg_n->set_type(GLMessage::DataType::INT);
+ arg_n->add_intvalue(n);
+
+ // copy argument framebuffers
+ GLMessage_DataType *arg_framebuffers = glmsg.add_args();
+ arg_framebuffers->set_isarray(false);
+ arg_framebuffers->set_type(GLMessage::DataType::INT);
+ arg_framebuffers->add_intvalue((int)framebuffers);
+
+ // call function
+ glContext->hooks->gl.glDeleteFramebuffers(n, framebuffers);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDeleteProgram(GLuint program) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glDeleteProgram);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // call function
+ glContext->hooks->gl.glDeleteProgram(program);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glDeleteRenderbuffers);
+
+ // copy argument n
+ GLMessage_DataType *arg_n = glmsg.add_args();
+ arg_n->set_isarray(false);
+ arg_n->set_type(GLMessage::DataType::INT);
+ arg_n->add_intvalue(n);
+
+ // copy argument renderbuffers
+ GLMessage_DataType *arg_renderbuffers = glmsg.add_args();
+ arg_renderbuffers->set_isarray(false);
+ arg_renderbuffers->set_type(GLMessage::DataType::INT);
+ arg_renderbuffers->add_intvalue((int)renderbuffers);
+
+ // call function
+ glContext->hooks->gl.glDeleteRenderbuffers(n, renderbuffers);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDeleteShader(GLuint shader) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glDeleteShader);
+
+ // copy argument shader
+ GLMessage_DataType *arg_shader = glmsg.add_args();
+ arg_shader->set_isarray(false);
+ arg_shader->set_type(GLMessage::DataType::INT);
+ arg_shader->add_intvalue(shader);
+
+ // call function
+ glContext->hooks->gl.glDeleteShader(shader);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDeleteTextures(GLsizei n, const GLuint* textures) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glDeleteTextures);
+
+ // copy argument n
+ GLMessage_DataType *arg_n = glmsg.add_args();
+ arg_n->set_isarray(false);
+ arg_n->set_type(GLMessage::DataType::INT);
+ arg_n->add_intvalue(n);
+
+ // copy argument textures
+ GLMessage_DataType *arg_textures = glmsg.add_args();
+ arg_textures->set_isarray(false);
+ arg_textures->set_type(GLMessage::DataType::INT);
+ arg_textures->add_intvalue((int)textures);
+
+ // call function
+ glContext->hooks->gl.glDeleteTextures(n, textures);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDepthFunc(GLenum func) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glDepthFunc);
+
+ // copy argument func
+ GLMessage_DataType *arg_func = glmsg.add_args();
+ arg_func->set_isarray(false);
+ arg_func->set_type(GLMessage::DataType::ENUM);
+ arg_func->add_intvalue((int)func);
+
+ // call function
+ glContext->hooks->gl.glDepthFunc(func);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDepthMask(GLboolean flag) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glDepthMask);
+
+ // copy argument flag
+ GLMessage_DataType *arg_flag = glmsg.add_args();
+ arg_flag->set_isarray(false);
+ arg_flag->set_type(GLMessage::DataType::BOOL);
+ arg_flag->add_boolvalue(flag);
+
+ // call function
+ glContext->hooks->gl.glDepthMask(flag);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDepthRangef(GLclampf zNear, GLclampf zFar) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glDepthRangef);
+
+ // copy argument zNear
+ GLMessage_DataType *arg_zNear = glmsg.add_args();
+ arg_zNear->set_isarray(false);
+ arg_zNear->set_type(GLMessage::DataType::FLOAT);
+ arg_zNear->add_floatvalue(zNear);
+
+ // copy argument zFar
+ GLMessage_DataType *arg_zFar = glmsg.add_args();
+ arg_zFar->set_isarray(false);
+ arg_zFar->set_type(GLMessage::DataType::FLOAT);
+ arg_zFar->add_floatvalue(zFar);
+
+ // call function
+ glContext->hooks->gl.glDepthRangef(zNear, zFar);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDetachShader(GLuint program, GLuint shader) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glDetachShader);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // copy argument shader
+ GLMessage_DataType *arg_shader = glmsg.add_args();
+ arg_shader->set_isarray(false);
+ arg_shader->set_type(GLMessage::DataType::INT);
+ arg_shader->add_intvalue(shader);
+
+ // call function
+ glContext->hooks->gl.glDetachShader(program, shader);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDisable(GLenum cap) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glDisable);
+
+ // copy argument cap
+ GLMessage_DataType *arg_cap = glmsg.add_args();
+ arg_cap->set_isarray(false);
+ arg_cap->set_type(GLMessage::DataType::ENUM);
+ arg_cap->add_intvalue((int)cap);
+
+ // call function
+ glContext->hooks->gl.glDisable(cap);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDisableVertexAttribArray(GLuint index) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glDisableVertexAttribArray);
+
+ // copy argument index
+ GLMessage_DataType *arg_index = glmsg.add_args();
+ arg_index->set_isarray(false);
+ arg_index->set_type(GLMessage::DataType::INT);
+ arg_index->add_intvalue(index);
+
+ // call function
+ glContext->hooks->gl.glDisableVertexAttribArray(index);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDrawArrays(GLenum mode, GLint first, GLsizei count) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glDrawArrays);
+
+ // copy argument mode
+ GLMessage_DataType *arg_mode = glmsg.add_args();
+ arg_mode->set_isarray(false);
+ arg_mode->set_type(GLMessage::DataType::ENUM);
+ arg_mode->add_intvalue((int)mode);
+
+ // copy argument first
+ GLMessage_DataType *arg_first = glmsg.add_args();
+ arg_first->set_isarray(false);
+ arg_first->set_type(GLMessage::DataType::INT);
+ arg_first->add_intvalue(first);
+
+ // copy argument count
+ GLMessage_DataType *arg_count = glmsg.add_args();
+ arg_count->set_isarray(false);
+ arg_count->set_type(GLMessage::DataType::INT);
+ arg_count->add_intvalue(count);
+
+ // call function
+ glContext->hooks->gl.glDrawArrays(mode, first, count);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glDrawElements);
+
+ // copy argument mode
+ GLMessage_DataType *arg_mode = glmsg.add_args();
+ arg_mode->set_isarray(false);
+ arg_mode->set_type(GLMessage::DataType::ENUM);
+ arg_mode->add_intvalue((int)mode);
+
+ // copy argument count
+ GLMessage_DataType *arg_count = glmsg.add_args();
+ arg_count->set_isarray(false);
+ arg_count->set_type(GLMessage::DataType::INT);
+ arg_count->add_intvalue(count);
+
+ // copy argument type
+ GLMessage_DataType *arg_type = glmsg.add_args();
+ arg_type->set_isarray(false);
+ arg_type->set_type(GLMessage::DataType::ENUM);
+ arg_type->add_intvalue((int)type);
+
+ // copy argument indices
+ GLMessage_DataType *arg_indices = glmsg.add_args();
+ arg_indices->set_isarray(false);
+ arg_indices->set_type(GLMessage::DataType::INT);
+ arg_indices->add_intvalue((int)indices);
+
+ // call function
+ glContext->hooks->gl.glDrawElements(mode, count, type, indices);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glEnable(GLenum cap) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glEnable);
+
+ // copy argument cap
+ GLMessage_DataType *arg_cap = glmsg.add_args();
+ arg_cap->set_isarray(false);
+ arg_cap->set_type(GLMessage::DataType::ENUM);
+ arg_cap->add_intvalue((int)cap);
+
+ // call function
+ glContext->hooks->gl.glEnable(cap);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glEnableVertexAttribArray(GLuint index) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glEnableVertexAttribArray);
+
+ // copy argument index
+ GLMessage_DataType *arg_index = glmsg.add_args();
+ arg_index->set_isarray(false);
+ arg_index->set_type(GLMessage::DataType::INT);
+ arg_index->add_intvalue(index);
+
+ // call function
+ glContext->hooks->gl.glEnableVertexAttribArray(index);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glFinish(void) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glFinish);
+
+ // call function
+ glContext->hooks->gl.glFinish();
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glFlush(void) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glFlush);
+
+ // call function
+ glContext->hooks->gl.glFlush();
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glFramebufferRenderbuffer);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument attachment
+ GLMessage_DataType *arg_attachment = glmsg.add_args();
+ arg_attachment->set_isarray(false);
+ arg_attachment->set_type(GLMessage::DataType::ENUM);
+ arg_attachment->add_intvalue((int)attachment);
+
+ // copy argument renderbuffertarget
+ GLMessage_DataType *arg_renderbuffertarget = glmsg.add_args();
+ arg_renderbuffertarget->set_isarray(false);
+ arg_renderbuffertarget->set_type(GLMessage::DataType::ENUM);
+ arg_renderbuffertarget->add_intvalue((int)renderbuffertarget);
+
+ // copy argument renderbuffer
+ GLMessage_DataType *arg_renderbuffer = glmsg.add_args();
+ arg_renderbuffer->set_isarray(false);
+ arg_renderbuffer->set_type(GLMessage::DataType::INT);
+ arg_renderbuffer->add_intvalue(renderbuffer);
+
+ // call function
+ glContext->hooks->gl.glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glFramebufferTexture2D);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument attachment
+ GLMessage_DataType *arg_attachment = glmsg.add_args();
+ arg_attachment->set_isarray(false);
+ arg_attachment->set_type(GLMessage::DataType::ENUM);
+ arg_attachment->add_intvalue((int)attachment);
+
+ // copy argument textarget
+ GLMessage_DataType *arg_textarget = glmsg.add_args();
+ arg_textarget->set_isarray(false);
+ arg_textarget->set_type(GLMessage::DataType::ENUM);
+ arg_textarget->add_intvalue((int)textarget);
+
+ // copy argument texture
+ GLMessage_DataType *arg_texture = glmsg.add_args();
+ arg_texture->set_isarray(false);
+ arg_texture->set_type(GLMessage::DataType::INT);
+ arg_texture->add_intvalue(texture);
+
+ // copy argument level
+ GLMessage_DataType *arg_level = glmsg.add_args();
+ arg_level->set_isarray(false);
+ arg_level->set_type(GLMessage::DataType::INT);
+ arg_level->add_intvalue(level);
+
+ // call function
+ glContext->hooks->gl.glFramebufferTexture2D(target, attachment, textarget, texture, level);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glFrontFace(GLenum mode) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glFrontFace);
+
+ // copy argument mode
+ GLMessage_DataType *arg_mode = glmsg.add_args();
+ arg_mode->set_isarray(false);
+ arg_mode->set_type(GLMessage::DataType::ENUM);
+ arg_mode->add_intvalue((int)mode);
+
+ // call function
+ glContext->hooks->gl.glFrontFace(mode);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGenBuffers(GLsizei n, GLuint* buffers) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGenBuffers);
+
+ // copy argument n
+ GLMessage_DataType *arg_n = glmsg.add_args();
+ arg_n->set_isarray(false);
+ arg_n->set_type(GLMessage::DataType::INT);
+ arg_n->add_intvalue(n);
+
+ // copy argument buffers
+ GLMessage_DataType *arg_buffers = glmsg.add_args();
+ arg_buffers->set_isarray(false);
+ arg_buffers->set_type(GLMessage::DataType::INT);
+ arg_buffers->add_intvalue((int)buffers);
+
+ // call function
+ glContext->hooks->gl.glGenBuffers(n, buffers);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGenerateMipmap(GLenum target) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGenerateMipmap);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // call function
+ glContext->hooks->gl.glGenerateMipmap(target);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGenFramebuffers(GLsizei n, GLuint* framebuffers) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGenFramebuffers);
+
+ // copy argument n
+ GLMessage_DataType *arg_n = glmsg.add_args();
+ arg_n->set_isarray(false);
+ arg_n->set_type(GLMessage::DataType::INT);
+ arg_n->add_intvalue(n);
+
+ // copy argument framebuffers
+ GLMessage_DataType *arg_framebuffers = glmsg.add_args();
+ arg_framebuffers->set_isarray(false);
+ arg_framebuffers->set_type(GLMessage::DataType::INT);
+ arg_framebuffers->add_intvalue((int)framebuffers);
+
+ // call function
+ glContext->hooks->gl.glGenFramebuffers(n, framebuffers);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGenRenderbuffers(GLsizei n, GLuint* renderbuffers) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGenRenderbuffers);
+
+ // copy argument n
+ GLMessage_DataType *arg_n = glmsg.add_args();
+ arg_n->set_isarray(false);
+ arg_n->set_type(GLMessage::DataType::INT);
+ arg_n->add_intvalue(n);
+
+ // copy argument renderbuffers
+ GLMessage_DataType *arg_renderbuffers = glmsg.add_args();
+ arg_renderbuffers->set_isarray(false);
+ arg_renderbuffers->set_type(GLMessage::DataType::INT);
+ arg_renderbuffers->add_intvalue((int)renderbuffers);
+
+ // call function
+ glContext->hooks->gl.glGenRenderbuffers(n, renderbuffers);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGenTextures(GLsizei n, GLuint* textures) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGenTextures);
+
+ // copy argument n
+ GLMessage_DataType *arg_n = glmsg.add_args();
+ arg_n->set_isarray(false);
+ arg_n->set_type(GLMessage::DataType::INT);
+ arg_n->add_intvalue(n);
+
+ // copy argument textures
+ GLMessage_DataType *arg_textures = glmsg.add_args();
+ arg_textures->set_isarray(false);
+ arg_textures->set_type(GLMessage::DataType::INT);
+ arg_textures->add_intvalue((int)textures);
+
+ // call function
+ glContext->hooks->gl.glGenTextures(n, textures);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetActiveAttrib);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // copy argument index
+ GLMessage_DataType *arg_index = glmsg.add_args();
+ arg_index->set_isarray(false);
+ arg_index->set_type(GLMessage::DataType::INT);
+ arg_index->add_intvalue(index);
+
+ // copy argument bufsize
+ GLMessage_DataType *arg_bufsize = glmsg.add_args();
+ arg_bufsize->set_isarray(false);
+ arg_bufsize->set_type(GLMessage::DataType::INT);
+ arg_bufsize->add_intvalue(bufsize);
+
+ // copy argument length
+ GLMessage_DataType *arg_length = glmsg.add_args();
+ arg_length->set_isarray(false);
+ arg_length->set_type(GLMessage::DataType::INT);
+ arg_length->add_intvalue((int)length);
+
+ // copy argument size
+ GLMessage_DataType *arg_size = glmsg.add_args();
+ arg_size->set_isarray(false);
+ arg_size->set_type(GLMessage::DataType::INT);
+ arg_size->add_intvalue((int)size);
+
+ // copy argument type
+ GLMessage_DataType *arg_type = glmsg.add_args();
+ arg_type->set_isarray(false);
+ arg_type->set_type(GLMessage::DataType::INT);
+ arg_type->add_intvalue((int)type);
+
+ // copy argument name
+ GLMessage_DataType *arg_name = glmsg.add_args();
+ arg_name->set_isarray(false);
+ arg_name->set_type(GLMessage::DataType::INT);
+ arg_name->add_intvalue((int)name);
+
+ // call function
+ glContext->hooks->gl.glGetActiveAttrib(program, index, bufsize, length, size, type, name);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetActiveUniform);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // copy argument index
+ GLMessage_DataType *arg_index = glmsg.add_args();
+ arg_index->set_isarray(false);
+ arg_index->set_type(GLMessage::DataType::INT);
+ arg_index->add_intvalue(index);
+
+ // copy argument bufsize
+ GLMessage_DataType *arg_bufsize = glmsg.add_args();
+ arg_bufsize->set_isarray(false);
+ arg_bufsize->set_type(GLMessage::DataType::INT);
+ arg_bufsize->add_intvalue(bufsize);
+
+ // copy argument length
+ GLMessage_DataType *arg_length = glmsg.add_args();
+ arg_length->set_isarray(false);
+ arg_length->set_type(GLMessage::DataType::INT);
+ arg_length->add_intvalue((int)length);
+
+ // copy argument size
+ GLMessage_DataType *arg_size = glmsg.add_args();
+ arg_size->set_isarray(false);
+ arg_size->set_type(GLMessage::DataType::INT);
+ arg_size->add_intvalue((int)size);
+
+ // copy argument type
+ GLMessage_DataType *arg_type = glmsg.add_args();
+ arg_type->set_isarray(false);
+ arg_type->set_type(GLMessage::DataType::INT);
+ arg_type->add_intvalue((int)type);
+
+ // copy argument name
+ GLMessage_DataType *arg_name = glmsg.add_args();
+ arg_name->set_isarray(false);
+ arg_name->set_type(GLMessage::DataType::INT);
+ arg_name->add_intvalue((int)name);
+
+ // call function
+ glContext->hooks->gl.glGetActiveUniform(program, index, bufsize, length, size, type, name);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetAttachedShaders);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // copy argument maxcount
+ GLMessage_DataType *arg_maxcount = glmsg.add_args();
+ arg_maxcount->set_isarray(false);
+ arg_maxcount->set_type(GLMessage::DataType::INT);
+ arg_maxcount->add_intvalue(maxcount);
+
+ // copy argument count
+ GLMessage_DataType *arg_count = glmsg.add_args();
+ arg_count->set_isarray(false);
+ arg_count->set_type(GLMessage::DataType::INT);
+ arg_count->add_intvalue((int)count);
+
+ // copy argument shaders
+ GLMessage_DataType *arg_shaders = glmsg.add_args();
+ arg_shaders->set_isarray(false);
+ arg_shaders->set_type(GLMessage::DataType::INT);
+ arg_shaders->add_intvalue((int)shaders);
+
+ // call function
+ glContext->hooks->gl.glGetAttachedShaders(program, maxcount, count, shaders);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+int GLTrace_glGetAttribLocation(GLuint program, const GLchar* name) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetAttribLocation);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // copy argument name
+ GLMessage_DataType *arg_name = glmsg.add_args();
+ arg_name->set_isarray(false);
+ arg_name->set_type(GLMessage::DataType::INT);
+ arg_name->add_intvalue((int)name);
+
+ // call function
+ int retValue = glContext->hooks->gl.glGetAttribLocation(program, name);
+
+ // set return value
+ GLMessage_DataType *rt = glmsg.mutable_returnvalue();
+ rt->set_isarray(false);
+ rt->set_type(GLMessage::DataType::INT);
+ rt->add_intvalue(retValue);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+
+ return retValue;
+}
+
+void GLTrace_glGetBooleanv(GLenum pname, GLboolean* params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetBooleanv);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glGetBooleanv(pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetBufferParameteriv);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glGetBufferParameteriv(target, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+GLenum GLTrace_glGetError(void) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetError);
+
+ // call function
+ GLenum retValue = glContext->hooks->gl.glGetError();
+
+ // set return value
+ GLMessage_DataType *rt = glmsg.mutable_returnvalue();
+ rt->set_isarray(false);
+ rt->set_type(GLMessage::DataType::ENUM);
+ rt->add_intvalue((int)retValue);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+
+ return retValue;
+}
+
+void GLTrace_glGetFloatv(GLenum pname, GLfloat* params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetFloatv);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glGetFloatv(pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetFramebufferAttachmentParameteriv);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument attachment
+ GLMessage_DataType *arg_attachment = glmsg.add_args();
+ arg_attachment->set_isarray(false);
+ arg_attachment->set_type(GLMessage::DataType::ENUM);
+ arg_attachment->add_intvalue((int)attachment);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glGetFramebufferAttachmentParameteriv(target, attachment, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetIntegerv(GLenum pname, GLint* params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetIntegerv);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glGetIntegerv(pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetProgramiv(GLuint program, GLenum pname, GLint* params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetProgramiv);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glGetProgramiv(program, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetProgramInfoLog);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // copy argument bufsize
+ GLMessage_DataType *arg_bufsize = glmsg.add_args();
+ arg_bufsize->set_isarray(false);
+ arg_bufsize->set_type(GLMessage::DataType::INT);
+ arg_bufsize->add_intvalue(bufsize);
+
+ // copy argument length
+ GLMessage_DataType *arg_length = glmsg.add_args();
+ arg_length->set_isarray(false);
+ arg_length->set_type(GLMessage::DataType::INT);
+ arg_length->add_intvalue((int)length);
+
+ // copy argument infolog
+ GLMessage_DataType *arg_infolog = glmsg.add_args();
+ arg_infolog->set_isarray(false);
+ arg_infolog->set_type(GLMessage::DataType::INT);
+ arg_infolog->add_intvalue((int)infolog);
+
+ // call function
+ glContext->hooks->gl.glGetProgramInfoLog(program, bufsize, length, infolog);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetRenderbufferParameteriv);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glGetRenderbufferParameteriv(target, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetShaderiv(GLuint shader, GLenum pname, GLint* params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetShaderiv);
+
+ // copy argument shader
+ GLMessage_DataType *arg_shader = glmsg.add_args();
+ arg_shader->set_isarray(false);
+ arg_shader->set_type(GLMessage::DataType::INT);
+ arg_shader->add_intvalue(shader);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glGetShaderiv(shader, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetShaderInfoLog);
+
+ // copy argument shader
+ GLMessage_DataType *arg_shader = glmsg.add_args();
+ arg_shader->set_isarray(false);
+ arg_shader->set_type(GLMessage::DataType::INT);
+ arg_shader->add_intvalue(shader);
+
+ // copy argument bufsize
+ GLMessage_DataType *arg_bufsize = glmsg.add_args();
+ arg_bufsize->set_isarray(false);
+ arg_bufsize->set_type(GLMessage::DataType::INT);
+ arg_bufsize->add_intvalue(bufsize);
+
+ // copy argument length
+ GLMessage_DataType *arg_length = glmsg.add_args();
+ arg_length->set_isarray(false);
+ arg_length->set_type(GLMessage::DataType::INT);
+ arg_length->add_intvalue((int)length);
+
+ // copy argument infolog
+ GLMessage_DataType *arg_infolog = glmsg.add_args();
+ arg_infolog->set_isarray(false);
+ arg_infolog->set_type(GLMessage::DataType::INT);
+ arg_infolog->add_intvalue((int)infolog);
+
+ // call function
+ glContext->hooks->gl.glGetShaderInfoLog(shader, bufsize, length, infolog);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetShaderPrecisionFormat);
+
+ // copy argument shadertype
+ GLMessage_DataType *arg_shadertype = glmsg.add_args();
+ arg_shadertype->set_isarray(false);
+ arg_shadertype->set_type(GLMessage::DataType::ENUM);
+ arg_shadertype->add_intvalue((int)shadertype);
+
+ // copy argument precisiontype
+ GLMessage_DataType *arg_precisiontype = glmsg.add_args();
+ arg_precisiontype->set_isarray(false);
+ arg_precisiontype->set_type(GLMessage::DataType::ENUM);
+ arg_precisiontype->add_intvalue((int)precisiontype);
+
+ // copy argument range
+ GLMessage_DataType *arg_range = glmsg.add_args();
+ arg_range->set_isarray(false);
+ arg_range->set_type(GLMessage::DataType::INT);
+ arg_range->add_intvalue((int)range);
+
+ // copy argument precision
+ GLMessage_DataType *arg_precision = glmsg.add_args();
+ arg_precision->set_isarray(false);
+ arg_precision->set_type(GLMessage::DataType::INT);
+ arg_precision->add_intvalue((int)precision);
+
+ // call function
+ glContext->hooks->gl.glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetShaderSource);
+
+ // copy argument shader
+ GLMessage_DataType *arg_shader = glmsg.add_args();
+ arg_shader->set_isarray(false);
+ arg_shader->set_type(GLMessage::DataType::INT);
+ arg_shader->add_intvalue(shader);
+
+ // copy argument bufsize
+ GLMessage_DataType *arg_bufsize = glmsg.add_args();
+ arg_bufsize->set_isarray(false);
+ arg_bufsize->set_type(GLMessage::DataType::INT);
+ arg_bufsize->add_intvalue(bufsize);
+
+ // copy argument length
+ GLMessage_DataType *arg_length = glmsg.add_args();
+ arg_length->set_isarray(false);
+ arg_length->set_type(GLMessage::DataType::INT);
+ arg_length->add_intvalue((int)length);
+
+ // copy argument source
+ GLMessage_DataType *arg_source = glmsg.add_args();
+ arg_source->set_isarray(false);
+ arg_source->set_type(GLMessage::DataType::INT);
+ arg_source->add_intvalue((int)source);
+
+ // call function
+ glContext->hooks->gl.glGetShaderSource(shader, bufsize, length, source);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+const GLubyte* GLTrace_glGetString(GLenum name) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetString);
+
+ // copy argument name
+ GLMessage_DataType *arg_name = glmsg.add_args();
+ arg_name->set_isarray(false);
+ arg_name->set_type(GLMessage::DataType::ENUM);
+ arg_name->add_intvalue((int)name);
+
+ // call function
+ const GLubyte* retValue = glContext->hooks->gl.glGetString(name);
+
+ // set return value
+ GLMessage_DataType *rt = glmsg.mutable_returnvalue();
+ rt->set_isarray(false);
+ rt->set_type(GLMessage::DataType::INT);
+ rt->add_intvalue((int)retValue);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+
+ return retValue;
+}
+
+void GLTrace_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetTexParameterfv);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glGetTexParameterfv(target, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetTexParameteriv(GLenum target, GLenum pname, GLint* params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetTexParameteriv);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glGetTexParameteriv(target, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetUniformfv(GLuint program, GLint location, GLfloat* params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetUniformfv);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glGetUniformfv(program, location, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetUniformiv(GLuint program, GLint location, GLint* params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetUniformiv);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glGetUniformiv(program, location, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+int GLTrace_glGetUniformLocation(GLuint program, const GLchar* name) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetUniformLocation);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // copy argument name
+ GLMessage_DataType *arg_name = glmsg.add_args();
+ arg_name->set_isarray(false);
+ arg_name->set_type(GLMessage::DataType::INT);
+ arg_name->add_intvalue((int)name);
+
+ // call function
+ int retValue = glContext->hooks->gl.glGetUniformLocation(program, name);
+
+ // set return value
+ GLMessage_DataType *rt = glmsg.mutable_returnvalue();
+ rt->set_isarray(false);
+ rt->set_type(GLMessage::DataType::INT);
+ rt->add_intvalue(retValue);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+
+ return retValue;
+}
+
+void GLTrace_glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetVertexAttribfv);
+
+ // copy argument index
+ GLMessage_DataType *arg_index = glmsg.add_args();
+ arg_index->set_isarray(false);
+ arg_index->set_type(GLMessage::DataType::INT);
+ arg_index->add_intvalue(index);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glGetVertexAttribfv(index, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetVertexAttribiv);
+
+ // copy argument index
+ GLMessage_DataType *arg_index = glmsg.add_args();
+ arg_index->set_isarray(false);
+ arg_index->set_type(GLMessage::DataType::INT);
+ arg_index->add_intvalue(index);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glGetVertexAttribiv(index, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid** pointer) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetVertexAttribPointerv);
+
+ // copy argument index
+ GLMessage_DataType *arg_index = glmsg.add_args();
+ arg_index->set_isarray(false);
+ arg_index->set_type(GLMessage::DataType::INT);
+ arg_index->add_intvalue(index);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument pointer
+ GLMessage_DataType *arg_pointer = glmsg.add_args();
+ arg_pointer->set_isarray(false);
+ arg_pointer->set_type(GLMessage::DataType::INT);
+ arg_pointer->add_intvalue((int)pointer);
+
+ // call function
+ glContext->hooks->gl.glGetVertexAttribPointerv(index, pname, pointer);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glHint(GLenum target, GLenum mode) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glHint);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument mode
+ GLMessage_DataType *arg_mode = glmsg.add_args();
+ arg_mode->set_isarray(false);
+ arg_mode->set_type(GLMessage::DataType::ENUM);
+ arg_mode->add_intvalue((int)mode);
+
+ // call function
+ glContext->hooks->gl.glHint(target, mode);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+GLboolean GLTrace_glIsBuffer(GLuint buffer) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glIsBuffer);
+
+ // copy argument buffer
+ GLMessage_DataType *arg_buffer = glmsg.add_args();
+ arg_buffer->set_isarray(false);
+ arg_buffer->set_type(GLMessage::DataType::INT);
+ arg_buffer->add_intvalue(buffer);
+
+ // call function
+ GLboolean retValue = glContext->hooks->gl.glIsBuffer(buffer);
+
+ // set return value
+ GLMessage_DataType *rt = glmsg.mutable_returnvalue();
+ rt->set_isarray(false);
+ rt->set_type(GLMessage::DataType::BOOL);
+ rt->add_boolvalue(retValue);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+
+ return retValue;
+}
+
+GLboolean GLTrace_glIsEnabled(GLenum cap) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glIsEnabled);
+
+ // copy argument cap
+ GLMessage_DataType *arg_cap = glmsg.add_args();
+ arg_cap->set_isarray(false);
+ arg_cap->set_type(GLMessage::DataType::ENUM);
+ arg_cap->add_intvalue((int)cap);
+
+ // call function
+ GLboolean retValue = glContext->hooks->gl.glIsEnabled(cap);
+
+ // set return value
+ GLMessage_DataType *rt = glmsg.mutable_returnvalue();
+ rt->set_isarray(false);
+ rt->set_type(GLMessage::DataType::BOOL);
+ rt->add_boolvalue(retValue);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+
+ return retValue;
+}
+
+GLboolean GLTrace_glIsFramebuffer(GLuint framebuffer) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glIsFramebuffer);
+
+ // copy argument framebuffer
+ GLMessage_DataType *arg_framebuffer = glmsg.add_args();
+ arg_framebuffer->set_isarray(false);
+ arg_framebuffer->set_type(GLMessage::DataType::INT);
+ arg_framebuffer->add_intvalue(framebuffer);
+
+ // call function
+ GLboolean retValue = glContext->hooks->gl.glIsFramebuffer(framebuffer);
+
+ // set return value
+ GLMessage_DataType *rt = glmsg.mutable_returnvalue();
+ rt->set_isarray(false);
+ rt->set_type(GLMessage::DataType::BOOL);
+ rt->add_boolvalue(retValue);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+
+ return retValue;
+}
+
+GLboolean GLTrace_glIsProgram(GLuint program) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glIsProgram);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // call function
+ GLboolean retValue = glContext->hooks->gl.glIsProgram(program);
+
+ // set return value
+ GLMessage_DataType *rt = glmsg.mutable_returnvalue();
+ rt->set_isarray(false);
+ rt->set_type(GLMessage::DataType::BOOL);
+ rt->add_boolvalue(retValue);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+
+ return retValue;
+}
+
+GLboolean GLTrace_glIsRenderbuffer(GLuint renderbuffer) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glIsRenderbuffer);
+
+ // copy argument renderbuffer
+ GLMessage_DataType *arg_renderbuffer = glmsg.add_args();
+ arg_renderbuffer->set_isarray(false);
+ arg_renderbuffer->set_type(GLMessage::DataType::INT);
+ arg_renderbuffer->add_intvalue(renderbuffer);
+
+ // call function
+ GLboolean retValue = glContext->hooks->gl.glIsRenderbuffer(renderbuffer);
+
+ // set return value
+ GLMessage_DataType *rt = glmsg.mutable_returnvalue();
+ rt->set_isarray(false);
+ rt->set_type(GLMessage::DataType::BOOL);
+ rt->add_boolvalue(retValue);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+
+ return retValue;
+}
+
+GLboolean GLTrace_glIsShader(GLuint shader) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glIsShader);
+
+ // copy argument shader
+ GLMessage_DataType *arg_shader = glmsg.add_args();
+ arg_shader->set_isarray(false);
+ arg_shader->set_type(GLMessage::DataType::INT);
+ arg_shader->add_intvalue(shader);
+
+ // call function
+ GLboolean retValue = glContext->hooks->gl.glIsShader(shader);
+
+ // set return value
+ GLMessage_DataType *rt = glmsg.mutable_returnvalue();
+ rt->set_isarray(false);
+ rt->set_type(GLMessage::DataType::BOOL);
+ rt->add_boolvalue(retValue);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+
+ return retValue;
+}
+
+GLboolean GLTrace_glIsTexture(GLuint texture) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glIsTexture);
+
+ // copy argument texture
+ GLMessage_DataType *arg_texture = glmsg.add_args();
+ arg_texture->set_isarray(false);
+ arg_texture->set_type(GLMessage::DataType::INT);
+ arg_texture->add_intvalue(texture);
+
+ // call function
+ GLboolean retValue = glContext->hooks->gl.glIsTexture(texture);
+
+ // set return value
+ GLMessage_DataType *rt = glmsg.mutable_returnvalue();
+ rt->set_isarray(false);
+ rt->set_type(GLMessage::DataType::BOOL);
+ rt->add_boolvalue(retValue);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+
+ return retValue;
+}
+
+void GLTrace_glLineWidth(GLfloat width) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glLineWidth);
+
+ // copy argument width
+ GLMessage_DataType *arg_width = glmsg.add_args();
+ arg_width->set_isarray(false);
+ arg_width->set_type(GLMessage::DataType::FLOAT);
+ arg_width->add_floatvalue(width);
+
+ // call function
+ glContext->hooks->gl.glLineWidth(width);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glLinkProgram(GLuint program) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glLinkProgram);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // call function
+ glContext->hooks->gl.glLinkProgram(program);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glPixelStorei(GLenum pname, GLint param) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glPixelStorei);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument param
+ GLMessage_DataType *arg_param = glmsg.add_args();
+ arg_param->set_isarray(false);
+ arg_param->set_type(GLMessage::DataType::INT);
+ arg_param->add_intvalue(param);
+
+ // call function
+ glContext->hooks->gl.glPixelStorei(pname, param);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glPolygonOffset(GLfloat factor, GLfloat units) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glPolygonOffset);
+
+ // copy argument factor
+ GLMessage_DataType *arg_factor = glmsg.add_args();
+ arg_factor->set_isarray(false);
+ arg_factor->set_type(GLMessage::DataType::FLOAT);
+ arg_factor->add_floatvalue(factor);
+
+ // copy argument units
+ GLMessage_DataType *arg_units = glmsg.add_args();
+ arg_units->set_isarray(false);
+ arg_units->set_type(GLMessage::DataType::FLOAT);
+ arg_units->add_floatvalue(units);
+
+ // call function
+ glContext->hooks->gl.glPolygonOffset(factor, units);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glReadPixels);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::INT);
+ arg_x->add_intvalue(x);
+
+ // copy argument y
+ GLMessage_DataType *arg_y = glmsg.add_args();
+ arg_y->set_isarray(false);
+ arg_y->set_type(GLMessage::DataType::INT);
+ arg_y->add_intvalue(y);
+
+ // copy argument width
+ GLMessage_DataType *arg_width = glmsg.add_args();
+ arg_width->set_isarray(false);
+ arg_width->set_type(GLMessage::DataType::INT);
+ arg_width->add_intvalue(width);
+
+ // copy argument height
+ GLMessage_DataType *arg_height = glmsg.add_args();
+ arg_height->set_isarray(false);
+ arg_height->set_type(GLMessage::DataType::INT);
+ arg_height->add_intvalue(height);
+
+ // copy argument format
+ GLMessage_DataType *arg_format = glmsg.add_args();
+ arg_format->set_isarray(false);
+ arg_format->set_type(GLMessage::DataType::ENUM);
+ arg_format->add_intvalue((int)format);
+
+ // copy argument type
+ GLMessage_DataType *arg_type = glmsg.add_args();
+ arg_type->set_isarray(false);
+ arg_type->set_type(GLMessage::DataType::ENUM);
+ arg_type->add_intvalue((int)type);
+
+ // copy argument pixels
+ GLMessage_DataType *arg_pixels = glmsg.add_args();
+ arg_pixels->set_isarray(false);
+ arg_pixels->set_type(GLMessage::DataType::INT);
+ arg_pixels->add_intvalue((int)pixels);
+
+ // call function
+ glContext->hooks->gl.glReadPixels(x, y, width, height, format, type, pixels);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glReleaseShaderCompiler(void) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glReleaseShaderCompiler);
+
+ // call function
+ glContext->hooks->gl.glReleaseShaderCompiler();
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glRenderbufferStorage);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument internalformat
+ GLMessage_DataType *arg_internalformat = glmsg.add_args();
+ arg_internalformat->set_isarray(false);
+ arg_internalformat->set_type(GLMessage::DataType::ENUM);
+ arg_internalformat->add_intvalue((int)internalformat);
+
+ // copy argument width
+ GLMessage_DataType *arg_width = glmsg.add_args();
+ arg_width->set_isarray(false);
+ arg_width->set_type(GLMessage::DataType::INT);
+ arg_width->add_intvalue(width);
+
+ // copy argument height
+ GLMessage_DataType *arg_height = glmsg.add_args();
+ arg_height->set_isarray(false);
+ arg_height->set_type(GLMessage::DataType::INT);
+ arg_height->add_intvalue(height);
+
+ // call function
+ glContext->hooks->gl.glRenderbufferStorage(target, internalformat, width, height);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glSampleCoverage(GLclampf value, GLboolean invert) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glSampleCoverage);
+
+ // copy argument value
+ GLMessage_DataType *arg_value = glmsg.add_args();
+ arg_value->set_isarray(false);
+ arg_value->set_type(GLMessage::DataType::FLOAT);
+ arg_value->add_floatvalue(value);
+
+ // copy argument invert
+ GLMessage_DataType *arg_invert = glmsg.add_args();
+ arg_invert->set_isarray(false);
+ arg_invert->set_type(GLMessage::DataType::BOOL);
+ arg_invert->add_boolvalue(invert);
+
+ // call function
+ glContext->hooks->gl.glSampleCoverage(value, invert);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glScissor(GLint x, GLint y, GLsizei width, GLsizei height) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glScissor);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::INT);
+ arg_x->add_intvalue(x);
+
+ // copy argument y
+ GLMessage_DataType *arg_y = glmsg.add_args();
+ arg_y->set_isarray(false);
+ arg_y->set_type(GLMessage::DataType::INT);
+ arg_y->add_intvalue(y);
+
+ // copy argument width
+ GLMessage_DataType *arg_width = glmsg.add_args();
+ arg_width->set_isarray(false);
+ arg_width->set_type(GLMessage::DataType::INT);
+ arg_width->add_intvalue(width);
+
+ // copy argument height
+ GLMessage_DataType *arg_height = glmsg.add_args();
+ arg_height->set_isarray(false);
+ arg_height->set_type(GLMessage::DataType::INT);
+ arg_height->add_intvalue(height);
+
+ // call function
+ glContext->hooks->gl.glScissor(x, y, width, height);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glShaderBinary);
+
+ // copy argument n
+ GLMessage_DataType *arg_n = glmsg.add_args();
+ arg_n->set_isarray(false);
+ arg_n->set_type(GLMessage::DataType::INT);
+ arg_n->add_intvalue(n);
+
+ // copy argument shaders
+ GLMessage_DataType *arg_shaders = glmsg.add_args();
+ arg_shaders->set_isarray(false);
+ arg_shaders->set_type(GLMessage::DataType::INT);
+ arg_shaders->add_intvalue((int)shaders);
+
+ // copy argument binaryformat
+ GLMessage_DataType *arg_binaryformat = glmsg.add_args();
+ arg_binaryformat->set_isarray(false);
+ arg_binaryformat->set_type(GLMessage::DataType::ENUM);
+ arg_binaryformat->add_intvalue((int)binaryformat);
+
+ // copy argument binary
+ GLMessage_DataType *arg_binary = glmsg.add_args();
+ arg_binary->set_isarray(false);
+ arg_binary->set_type(GLMessage::DataType::INT);
+ arg_binary->add_intvalue((int)binary);
+
+ // copy argument length
+ GLMessage_DataType *arg_length = glmsg.add_args();
+ arg_length->set_isarray(false);
+ arg_length->set_type(GLMessage::DataType::INT);
+ arg_length->add_intvalue(length);
+
+ // call function
+ glContext->hooks->gl.glShaderBinary(n, shaders, binaryformat, binary, length);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glShaderSource(GLuint shader, GLsizei count, const GLchar** string, const GLint* length) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glShaderSource);
+
+ // copy argument shader
+ GLMessage_DataType *arg_shader = glmsg.add_args();
+ arg_shader->set_isarray(false);
+ arg_shader->set_type(GLMessage::DataType::INT);
+ arg_shader->add_intvalue(shader);
+
+ // copy argument count
+ GLMessage_DataType *arg_count = glmsg.add_args();
+ arg_count->set_isarray(false);
+ arg_count->set_type(GLMessage::DataType::INT);
+ arg_count->add_intvalue(count);
+
+ // copy argument string
+ GLMessage_DataType *arg_string = glmsg.add_args();
+ arg_string->set_isarray(false);
+ arg_string->set_type(GLMessage::DataType::INT);
+ arg_string->add_intvalue((int)string);
+
+ // copy argument length
+ GLMessage_DataType *arg_length = glmsg.add_args();
+ arg_length->set_isarray(false);
+ arg_length->set_type(GLMessage::DataType::INT);
+ arg_length->add_intvalue((int)length);
+
+ // call function
+ glContext->hooks->gl.glShaderSource(shader, count, string, length);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glStencilFunc(GLenum func, GLint ref, GLuint mask) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glStencilFunc);
+
+ // copy argument func
+ GLMessage_DataType *arg_func = glmsg.add_args();
+ arg_func->set_isarray(false);
+ arg_func->set_type(GLMessage::DataType::ENUM);
+ arg_func->add_intvalue((int)func);
+
+ // copy argument ref
+ GLMessage_DataType *arg_ref = glmsg.add_args();
+ arg_ref->set_isarray(false);
+ arg_ref->set_type(GLMessage::DataType::INT);
+ arg_ref->add_intvalue(ref);
+
+ // copy argument mask
+ GLMessage_DataType *arg_mask = glmsg.add_args();
+ arg_mask->set_isarray(false);
+ arg_mask->set_type(GLMessage::DataType::INT);
+ arg_mask->add_intvalue(mask);
+
+ // call function
+ glContext->hooks->gl.glStencilFunc(func, ref, mask);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glStencilFuncSeparate);
+
+ // copy argument face
+ GLMessage_DataType *arg_face = glmsg.add_args();
+ arg_face->set_isarray(false);
+ arg_face->set_type(GLMessage::DataType::ENUM);
+ arg_face->add_intvalue((int)face);
+
+ // copy argument func
+ GLMessage_DataType *arg_func = glmsg.add_args();
+ arg_func->set_isarray(false);
+ arg_func->set_type(GLMessage::DataType::ENUM);
+ arg_func->add_intvalue((int)func);
+
+ // copy argument ref
+ GLMessage_DataType *arg_ref = glmsg.add_args();
+ arg_ref->set_isarray(false);
+ arg_ref->set_type(GLMessage::DataType::INT);
+ arg_ref->add_intvalue(ref);
+
+ // copy argument mask
+ GLMessage_DataType *arg_mask = glmsg.add_args();
+ arg_mask->set_isarray(false);
+ arg_mask->set_type(GLMessage::DataType::INT);
+ arg_mask->add_intvalue(mask);
+
+ // call function
+ glContext->hooks->gl.glStencilFuncSeparate(face, func, ref, mask);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glStencilMask(GLuint mask) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glStencilMask);
+
+ // copy argument mask
+ GLMessage_DataType *arg_mask = glmsg.add_args();
+ arg_mask->set_isarray(false);
+ arg_mask->set_type(GLMessage::DataType::INT);
+ arg_mask->add_intvalue(mask);
+
+ // call function
+ glContext->hooks->gl.glStencilMask(mask);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glStencilMaskSeparate(GLenum face, GLuint mask) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glStencilMaskSeparate);
+
+ // copy argument face
+ GLMessage_DataType *arg_face = glmsg.add_args();
+ arg_face->set_isarray(false);
+ arg_face->set_type(GLMessage::DataType::ENUM);
+ arg_face->add_intvalue((int)face);
+
+ // copy argument mask
+ GLMessage_DataType *arg_mask = glmsg.add_args();
+ arg_mask->set_isarray(false);
+ arg_mask->set_type(GLMessage::DataType::INT);
+ arg_mask->add_intvalue(mask);
+
+ // call function
+ glContext->hooks->gl.glStencilMaskSeparate(face, mask);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glStencilOp(GLenum fail, GLenum zfail, GLenum zpass) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glStencilOp);
+
+ // copy argument fail
+ GLMessage_DataType *arg_fail = glmsg.add_args();
+ arg_fail->set_isarray(false);
+ arg_fail->set_type(GLMessage::DataType::ENUM);
+ arg_fail->add_intvalue((int)fail);
+
+ // copy argument zfail
+ GLMessage_DataType *arg_zfail = glmsg.add_args();
+ arg_zfail->set_isarray(false);
+ arg_zfail->set_type(GLMessage::DataType::ENUM);
+ arg_zfail->add_intvalue((int)zfail);
+
+ // copy argument zpass
+ GLMessage_DataType *arg_zpass = glmsg.add_args();
+ arg_zpass->set_isarray(false);
+ arg_zpass->set_type(GLMessage::DataType::ENUM);
+ arg_zpass->add_intvalue((int)zpass);
+
+ // call function
+ glContext->hooks->gl.glStencilOp(fail, zfail, zpass);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glStencilOpSeparate);
+
+ // copy argument face
+ GLMessage_DataType *arg_face = glmsg.add_args();
+ arg_face->set_isarray(false);
+ arg_face->set_type(GLMessage::DataType::ENUM);
+ arg_face->add_intvalue((int)face);
+
+ // copy argument fail
+ GLMessage_DataType *arg_fail = glmsg.add_args();
+ arg_fail->set_isarray(false);
+ arg_fail->set_type(GLMessage::DataType::ENUM);
+ arg_fail->add_intvalue((int)fail);
+
+ // copy argument zfail
+ GLMessage_DataType *arg_zfail = glmsg.add_args();
+ arg_zfail->set_isarray(false);
+ arg_zfail->set_type(GLMessage::DataType::ENUM);
+ arg_zfail->add_intvalue((int)zfail);
+
+ // copy argument zpass
+ GLMessage_DataType *arg_zpass = glmsg.add_args();
+ arg_zpass->set_isarray(false);
+ arg_zpass->set_type(GLMessage::DataType::ENUM);
+ arg_zpass->add_intvalue((int)zpass);
+
+ // call function
+ glContext->hooks->gl.glStencilOpSeparate(face, fail, zfail, zpass);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glTexImage2D);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument level
+ GLMessage_DataType *arg_level = glmsg.add_args();
+ arg_level->set_isarray(false);
+ arg_level->set_type(GLMessage::DataType::INT);
+ arg_level->add_intvalue(level);
+
+ // copy argument internalformat
+ GLMessage_DataType *arg_internalformat = glmsg.add_args();
+ arg_internalformat->set_isarray(false);
+ arg_internalformat->set_type(GLMessage::DataType::INT);
+ arg_internalformat->add_intvalue(internalformat);
+
+ // copy argument width
+ GLMessage_DataType *arg_width = glmsg.add_args();
+ arg_width->set_isarray(false);
+ arg_width->set_type(GLMessage::DataType::INT);
+ arg_width->add_intvalue(width);
+
+ // copy argument height
+ GLMessage_DataType *arg_height = glmsg.add_args();
+ arg_height->set_isarray(false);
+ arg_height->set_type(GLMessage::DataType::INT);
+ arg_height->add_intvalue(height);
+
+ // copy argument border
+ GLMessage_DataType *arg_border = glmsg.add_args();
+ arg_border->set_isarray(false);
+ arg_border->set_type(GLMessage::DataType::INT);
+ arg_border->add_intvalue(border);
+
+ // copy argument format
+ GLMessage_DataType *arg_format = glmsg.add_args();
+ arg_format->set_isarray(false);
+ arg_format->set_type(GLMessage::DataType::ENUM);
+ arg_format->add_intvalue((int)format);
+
+ // copy argument type
+ GLMessage_DataType *arg_type = glmsg.add_args();
+ arg_type->set_isarray(false);
+ arg_type->set_type(GLMessage::DataType::ENUM);
+ arg_type->add_intvalue((int)type);
+
+ // copy argument pixels
+ GLMessage_DataType *arg_pixels = glmsg.add_args();
+ arg_pixels->set_isarray(false);
+ arg_pixels->set_type(GLMessage::DataType::INT);
+ arg_pixels->add_intvalue((int)pixels);
+
+ // call function
+ glContext->hooks->gl.glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexParameterf(GLenum target, GLenum pname, GLfloat param) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glTexParameterf);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument param
+ GLMessage_DataType *arg_param = glmsg.add_args();
+ arg_param->set_isarray(false);
+ arg_param->set_type(GLMessage::DataType::FLOAT);
+ arg_param->add_floatvalue(param);
+
+ // call function
+ glContext->hooks->gl.glTexParameterf(target, pname, param);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glTexParameterfv);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glTexParameterfv(target, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexParameteri(GLenum target, GLenum pname, GLint param) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glTexParameteri);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument param
+ GLMessage_DataType *arg_param = glmsg.add_args();
+ arg_param->set_isarray(false);
+ arg_param->set_type(GLMessage::DataType::INT);
+ arg_param->add_intvalue(param);
+
+ // call function
+ glContext->hooks->gl.glTexParameteri(target, pname, param);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexParameteriv(GLenum target, GLenum pname, const GLint* params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glTexParameteriv);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glTexParameteriv(target, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glTexSubImage2D);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument level
+ GLMessage_DataType *arg_level = glmsg.add_args();
+ arg_level->set_isarray(false);
+ arg_level->set_type(GLMessage::DataType::INT);
+ arg_level->add_intvalue(level);
+
+ // copy argument xoffset
+ GLMessage_DataType *arg_xoffset = glmsg.add_args();
+ arg_xoffset->set_isarray(false);
+ arg_xoffset->set_type(GLMessage::DataType::INT);
+ arg_xoffset->add_intvalue(xoffset);
+
+ // copy argument yoffset
+ GLMessage_DataType *arg_yoffset = glmsg.add_args();
+ arg_yoffset->set_isarray(false);
+ arg_yoffset->set_type(GLMessage::DataType::INT);
+ arg_yoffset->add_intvalue(yoffset);
+
+ // copy argument width
+ GLMessage_DataType *arg_width = glmsg.add_args();
+ arg_width->set_isarray(false);
+ arg_width->set_type(GLMessage::DataType::INT);
+ arg_width->add_intvalue(width);
+
+ // copy argument height
+ GLMessage_DataType *arg_height = glmsg.add_args();
+ arg_height->set_isarray(false);
+ arg_height->set_type(GLMessage::DataType::INT);
+ arg_height->add_intvalue(height);
+
+ // copy argument format
+ GLMessage_DataType *arg_format = glmsg.add_args();
+ arg_format->set_isarray(false);
+ arg_format->set_type(GLMessage::DataType::ENUM);
+ arg_format->add_intvalue((int)format);
+
+ // copy argument type
+ GLMessage_DataType *arg_type = glmsg.add_args();
+ arg_type->set_isarray(false);
+ arg_type->set_type(GLMessage::DataType::ENUM);
+ arg_type->add_intvalue((int)type);
+
+ // copy argument pixels
+ GLMessage_DataType *arg_pixels = glmsg.add_args();
+ arg_pixels->set_isarray(false);
+ arg_pixels->set_type(GLMessage::DataType::INT);
+ arg_pixels->add_intvalue((int)pixels);
+
+ // call function
+ glContext->hooks->gl.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glUniform1f(GLint location, GLfloat x) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glUniform1f);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::FLOAT);
+ arg_x->add_floatvalue(x);
+
+ // call function
+ glContext->hooks->gl.glUniform1f(location, x);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glUniform1fv(GLint location, GLsizei count, const GLfloat* v) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glUniform1fv);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument count
+ GLMessage_DataType *arg_count = glmsg.add_args();
+ arg_count->set_isarray(false);
+ arg_count->set_type(GLMessage::DataType::INT);
+ arg_count->add_intvalue(count);
+
+ // copy argument v
+ GLMessage_DataType *arg_v = glmsg.add_args();
+ arg_v->set_isarray(false);
+ arg_v->set_type(GLMessage::DataType::INT);
+ arg_v->add_intvalue((int)v);
+
+ // call function
+ glContext->hooks->gl.glUniform1fv(location, count, v);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glUniform1i(GLint location, GLint x) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glUniform1i);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::INT);
+ arg_x->add_intvalue(x);
+
+ // call function
+ glContext->hooks->gl.glUniform1i(location, x);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glUniform1iv(GLint location, GLsizei count, const GLint* v) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glUniform1iv);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument count
+ GLMessage_DataType *arg_count = glmsg.add_args();
+ arg_count->set_isarray(false);
+ arg_count->set_type(GLMessage::DataType::INT);
+ arg_count->add_intvalue(count);
+
+ // copy argument v
+ GLMessage_DataType *arg_v = glmsg.add_args();
+ arg_v->set_isarray(false);
+ arg_v->set_type(GLMessage::DataType::INT);
+ arg_v->add_intvalue((int)v);
+
+ // call function
+ glContext->hooks->gl.glUniform1iv(location, count, v);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glUniform2f(GLint location, GLfloat x, GLfloat y) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glUniform2f);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::FLOAT);
+ arg_x->add_floatvalue(x);
+
+ // copy argument y
+ GLMessage_DataType *arg_y = glmsg.add_args();
+ arg_y->set_isarray(false);
+ arg_y->set_type(GLMessage::DataType::FLOAT);
+ arg_y->add_floatvalue(y);
+
+ // call function
+ glContext->hooks->gl.glUniform2f(location, x, y);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glUniform2fv(GLint location, GLsizei count, const GLfloat* v) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glUniform2fv);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument count
+ GLMessage_DataType *arg_count = glmsg.add_args();
+ arg_count->set_isarray(false);
+ arg_count->set_type(GLMessage::DataType::INT);
+ arg_count->add_intvalue(count);
+
+ // copy argument v
+ GLMessage_DataType *arg_v = glmsg.add_args();
+ arg_v->set_isarray(false);
+ arg_v->set_type(GLMessage::DataType::INT);
+ arg_v->add_intvalue((int)v);
+
+ // call function
+ glContext->hooks->gl.glUniform2fv(location, count, v);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glUniform2i(GLint location, GLint x, GLint y) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glUniform2i);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::INT);
+ arg_x->add_intvalue(x);
+
+ // copy argument y
+ GLMessage_DataType *arg_y = glmsg.add_args();
+ arg_y->set_isarray(false);
+ arg_y->set_type(GLMessage::DataType::INT);
+ arg_y->add_intvalue(y);
+
+ // call function
+ glContext->hooks->gl.glUniform2i(location, x, y);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glUniform2iv(GLint location, GLsizei count, const GLint* v) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glUniform2iv);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument count
+ GLMessage_DataType *arg_count = glmsg.add_args();
+ arg_count->set_isarray(false);
+ arg_count->set_type(GLMessage::DataType::INT);
+ arg_count->add_intvalue(count);
+
+ // copy argument v
+ GLMessage_DataType *arg_v = glmsg.add_args();
+ arg_v->set_isarray(false);
+ arg_v->set_type(GLMessage::DataType::INT);
+ arg_v->add_intvalue((int)v);
+
+ // call function
+ glContext->hooks->gl.glUniform2iv(location, count, v);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glUniform3f);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::FLOAT);
+ arg_x->add_floatvalue(x);
+
+ // copy argument y
+ GLMessage_DataType *arg_y = glmsg.add_args();
+ arg_y->set_isarray(false);
+ arg_y->set_type(GLMessage::DataType::FLOAT);
+ arg_y->add_floatvalue(y);
+
+ // copy argument z
+ GLMessage_DataType *arg_z = glmsg.add_args();
+ arg_z->set_isarray(false);
+ arg_z->set_type(GLMessage::DataType::FLOAT);
+ arg_z->add_floatvalue(z);
+
+ // call function
+ glContext->hooks->gl.glUniform3f(location, x, y, z);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glUniform3fv(GLint location, GLsizei count, const GLfloat* v) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glUniform3fv);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument count
+ GLMessage_DataType *arg_count = glmsg.add_args();
+ arg_count->set_isarray(false);
+ arg_count->set_type(GLMessage::DataType::INT);
+ arg_count->add_intvalue(count);
+
+ // copy argument v
+ GLMessage_DataType *arg_v = glmsg.add_args();
+ arg_v->set_isarray(false);
+ arg_v->set_type(GLMessage::DataType::INT);
+ arg_v->add_intvalue((int)v);
+
+ // call function
+ glContext->hooks->gl.glUniform3fv(location, count, v);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glUniform3i(GLint location, GLint x, GLint y, GLint z) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glUniform3i);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::INT);
+ arg_x->add_intvalue(x);
+
+ // copy argument y
+ GLMessage_DataType *arg_y = glmsg.add_args();
+ arg_y->set_isarray(false);
+ arg_y->set_type(GLMessage::DataType::INT);
+ arg_y->add_intvalue(y);
+
+ // copy argument z
+ GLMessage_DataType *arg_z = glmsg.add_args();
+ arg_z->set_isarray(false);
+ arg_z->set_type(GLMessage::DataType::INT);
+ arg_z->add_intvalue(z);
+
+ // call function
+ glContext->hooks->gl.glUniform3i(location, x, y, z);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glUniform3iv(GLint location, GLsizei count, const GLint* v) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glUniform3iv);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument count
+ GLMessage_DataType *arg_count = glmsg.add_args();
+ arg_count->set_isarray(false);
+ arg_count->set_type(GLMessage::DataType::INT);
+ arg_count->add_intvalue(count);
+
+ // copy argument v
+ GLMessage_DataType *arg_v = glmsg.add_args();
+ arg_v->set_isarray(false);
+ arg_v->set_type(GLMessage::DataType::INT);
+ arg_v->add_intvalue((int)v);
+
+ // call function
+ glContext->hooks->gl.glUniform3iv(location, count, v);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glUniform4f);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::FLOAT);
+ arg_x->add_floatvalue(x);
+
+ // copy argument y
+ GLMessage_DataType *arg_y = glmsg.add_args();
+ arg_y->set_isarray(false);
+ arg_y->set_type(GLMessage::DataType::FLOAT);
+ arg_y->add_floatvalue(y);
+
+ // copy argument z
+ GLMessage_DataType *arg_z = glmsg.add_args();
+ arg_z->set_isarray(false);
+ arg_z->set_type(GLMessage::DataType::FLOAT);
+ arg_z->add_floatvalue(z);
+
+ // copy argument w
+ GLMessage_DataType *arg_w = glmsg.add_args();
+ arg_w->set_isarray(false);
+ arg_w->set_type(GLMessage::DataType::FLOAT);
+ arg_w->add_floatvalue(w);
+
+ // call function
+ glContext->hooks->gl.glUniform4f(location, x, y, z, w);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glUniform4fv(GLint location, GLsizei count, const GLfloat* v) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glUniform4fv);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument count
+ GLMessage_DataType *arg_count = glmsg.add_args();
+ arg_count->set_isarray(false);
+ arg_count->set_type(GLMessage::DataType::INT);
+ arg_count->add_intvalue(count);
+
+ // copy argument v
+ GLMessage_DataType *arg_v = glmsg.add_args();
+ arg_v->set_isarray(false);
+ arg_v->set_type(GLMessage::DataType::INT);
+ arg_v->add_intvalue((int)v);
+
+ // call function
+ glContext->hooks->gl.glUniform4fv(location, count, v);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glUniform4i);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::INT);
+ arg_x->add_intvalue(x);
+
+ // copy argument y
+ GLMessage_DataType *arg_y = glmsg.add_args();
+ arg_y->set_isarray(false);
+ arg_y->set_type(GLMessage::DataType::INT);
+ arg_y->add_intvalue(y);
+
+ // copy argument z
+ GLMessage_DataType *arg_z = glmsg.add_args();
+ arg_z->set_isarray(false);
+ arg_z->set_type(GLMessage::DataType::INT);
+ arg_z->add_intvalue(z);
+
+ // copy argument w
+ GLMessage_DataType *arg_w = glmsg.add_args();
+ arg_w->set_isarray(false);
+ arg_w->set_type(GLMessage::DataType::INT);
+ arg_w->add_intvalue(w);
+
+ // call function
+ glContext->hooks->gl.glUniform4i(location, x, y, z, w);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glUniform4iv(GLint location, GLsizei count, const GLint* v) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glUniform4iv);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument count
+ GLMessage_DataType *arg_count = glmsg.add_args();
+ arg_count->set_isarray(false);
+ arg_count->set_type(GLMessage::DataType::INT);
+ arg_count->add_intvalue(count);
+
+ // copy argument v
+ GLMessage_DataType *arg_v = glmsg.add_args();
+ arg_v->set_isarray(false);
+ arg_v->set_type(GLMessage::DataType::INT);
+ arg_v->add_intvalue((int)v);
+
+ // call function
+ glContext->hooks->gl.glUniform4iv(location, count, v);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glUniformMatrix2fv);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument count
+ GLMessage_DataType *arg_count = glmsg.add_args();
+ arg_count->set_isarray(false);
+ arg_count->set_type(GLMessage::DataType::INT);
+ arg_count->add_intvalue(count);
+
+ // copy argument transpose
+ GLMessage_DataType *arg_transpose = glmsg.add_args();
+ arg_transpose->set_isarray(false);
+ arg_transpose->set_type(GLMessage::DataType::BOOL);
+ arg_transpose->add_boolvalue(transpose);
+
+ // copy argument value
+ GLMessage_DataType *arg_value = glmsg.add_args();
+ arg_value->set_isarray(false);
+ arg_value->set_type(GLMessage::DataType::INT);
+ arg_value->add_intvalue((int)value);
+
+ // call function
+ glContext->hooks->gl.glUniformMatrix2fv(location, count, transpose, value);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glUniformMatrix3fv);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument count
+ GLMessage_DataType *arg_count = glmsg.add_args();
+ arg_count->set_isarray(false);
+ arg_count->set_type(GLMessage::DataType::INT);
+ arg_count->add_intvalue(count);
+
+ // copy argument transpose
+ GLMessage_DataType *arg_transpose = glmsg.add_args();
+ arg_transpose->set_isarray(false);
+ arg_transpose->set_type(GLMessage::DataType::BOOL);
+ arg_transpose->add_boolvalue(transpose);
+
+ // copy argument value
+ GLMessage_DataType *arg_value = glmsg.add_args();
+ arg_value->set_isarray(false);
+ arg_value->set_type(GLMessage::DataType::INT);
+ arg_value->add_intvalue((int)value);
+
+ // call function
+ glContext->hooks->gl.glUniformMatrix3fv(location, count, transpose, value);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glUniformMatrix4fv);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument count
+ GLMessage_DataType *arg_count = glmsg.add_args();
+ arg_count->set_isarray(false);
+ arg_count->set_type(GLMessage::DataType::INT);
+ arg_count->add_intvalue(count);
+
+ // copy argument transpose
+ GLMessage_DataType *arg_transpose = glmsg.add_args();
+ arg_transpose->set_isarray(false);
+ arg_transpose->set_type(GLMessage::DataType::BOOL);
+ arg_transpose->add_boolvalue(transpose);
+
+ // copy argument value
+ GLMessage_DataType *arg_value = glmsg.add_args();
+ arg_value->set_isarray(false);
+ arg_value->set_type(GLMessage::DataType::INT);
+ arg_value->add_intvalue((int)value);
+
+ // call function
+ glContext->hooks->gl.glUniformMatrix4fv(location, count, transpose, value);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glUseProgram(GLuint program) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glUseProgram);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // call function
+ glContext->hooks->gl.glUseProgram(program);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glValidateProgram(GLuint program) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glValidateProgram);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // call function
+ glContext->hooks->gl.glValidateProgram(program);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glVertexAttrib1f(GLuint indx, GLfloat x) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glVertexAttrib1f);
+
+ // copy argument indx
+ GLMessage_DataType *arg_indx = glmsg.add_args();
+ arg_indx->set_isarray(false);
+ arg_indx->set_type(GLMessage::DataType::INT);
+ arg_indx->add_intvalue(indx);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::FLOAT);
+ arg_x->add_floatvalue(x);
+
+ // call function
+ glContext->hooks->gl.glVertexAttrib1f(indx, x);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glVertexAttrib1fv(GLuint indx, const GLfloat* values) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glVertexAttrib1fv);
+
+ // copy argument indx
+ GLMessage_DataType *arg_indx = glmsg.add_args();
+ arg_indx->set_isarray(false);
+ arg_indx->set_type(GLMessage::DataType::INT);
+ arg_indx->add_intvalue(indx);
+
+ // copy argument values
+ GLMessage_DataType *arg_values = glmsg.add_args();
+ arg_values->set_isarray(false);
+ arg_values->set_type(GLMessage::DataType::INT);
+ arg_values->add_intvalue((int)values);
+
+ // call function
+ glContext->hooks->gl.glVertexAttrib1fv(indx, values);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glVertexAttrib2f);
+
+ // copy argument indx
+ GLMessage_DataType *arg_indx = glmsg.add_args();
+ arg_indx->set_isarray(false);
+ arg_indx->set_type(GLMessage::DataType::INT);
+ arg_indx->add_intvalue(indx);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::FLOAT);
+ arg_x->add_floatvalue(x);
+
+ // copy argument y
+ GLMessage_DataType *arg_y = glmsg.add_args();
+ arg_y->set_isarray(false);
+ arg_y->set_type(GLMessage::DataType::FLOAT);
+ arg_y->add_floatvalue(y);
+
+ // call function
+ glContext->hooks->gl.glVertexAttrib2f(indx, x, y);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glVertexAttrib2fv(GLuint indx, const GLfloat* values) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glVertexAttrib2fv);
+
+ // copy argument indx
+ GLMessage_DataType *arg_indx = glmsg.add_args();
+ arg_indx->set_isarray(false);
+ arg_indx->set_type(GLMessage::DataType::INT);
+ arg_indx->add_intvalue(indx);
+
+ // copy argument values
+ GLMessage_DataType *arg_values = glmsg.add_args();
+ arg_values->set_isarray(false);
+ arg_values->set_type(GLMessage::DataType::INT);
+ arg_values->add_intvalue((int)values);
+
+ // call function
+ glContext->hooks->gl.glVertexAttrib2fv(indx, values);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glVertexAttrib3f);
+
+ // copy argument indx
+ GLMessage_DataType *arg_indx = glmsg.add_args();
+ arg_indx->set_isarray(false);
+ arg_indx->set_type(GLMessage::DataType::INT);
+ arg_indx->add_intvalue(indx);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::FLOAT);
+ arg_x->add_floatvalue(x);
+
+ // copy argument y
+ GLMessage_DataType *arg_y = glmsg.add_args();
+ arg_y->set_isarray(false);
+ arg_y->set_type(GLMessage::DataType::FLOAT);
+ arg_y->add_floatvalue(y);
+
+ // copy argument z
+ GLMessage_DataType *arg_z = glmsg.add_args();
+ arg_z->set_isarray(false);
+ arg_z->set_type(GLMessage::DataType::FLOAT);
+ arg_z->add_floatvalue(z);
+
+ // call function
+ glContext->hooks->gl.glVertexAttrib3f(indx, x, y, z);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glVertexAttrib3fv(GLuint indx, const GLfloat* values) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glVertexAttrib3fv);
+
+ // copy argument indx
+ GLMessage_DataType *arg_indx = glmsg.add_args();
+ arg_indx->set_isarray(false);
+ arg_indx->set_type(GLMessage::DataType::INT);
+ arg_indx->add_intvalue(indx);
+
+ // copy argument values
+ GLMessage_DataType *arg_values = glmsg.add_args();
+ arg_values->set_isarray(false);
+ arg_values->set_type(GLMessage::DataType::INT);
+ arg_values->add_intvalue((int)values);
+
+ // call function
+ glContext->hooks->gl.glVertexAttrib3fv(indx, values);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glVertexAttrib4f);
+
+ // copy argument indx
+ GLMessage_DataType *arg_indx = glmsg.add_args();
+ arg_indx->set_isarray(false);
+ arg_indx->set_type(GLMessage::DataType::INT);
+ arg_indx->add_intvalue(indx);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::FLOAT);
+ arg_x->add_floatvalue(x);
+
+ // copy argument y
+ GLMessage_DataType *arg_y = glmsg.add_args();
+ arg_y->set_isarray(false);
+ arg_y->set_type(GLMessage::DataType::FLOAT);
+ arg_y->add_floatvalue(y);
+
+ // copy argument z
+ GLMessage_DataType *arg_z = glmsg.add_args();
+ arg_z->set_isarray(false);
+ arg_z->set_type(GLMessage::DataType::FLOAT);
+ arg_z->add_floatvalue(z);
+
+ // copy argument w
+ GLMessage_DataType *arg_w = glmsg.add_args();
+ arg_w->set_isarray(false);
+ arg_w->set_type(GLMessage::DataType::FLOAT);
+ arg_w->add_floatvalue(w);
+
+ // call function
+ glContext->hooks->gl.glVertexAttrib4f(indx, x, y, z, w);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glVertexAttrib4fv(GLuint indx, const GLfloat* values) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glVertexAttrib4fv);
+
+ // copy argument indx
+ GLMessage_DataType *arg_indx = glmsg.add_args();
+ arg_indx->set_isarray(false);
+ arg_indx->set_type(GLMessage::DataType::INT);
+ arg_indx->add_intvalue(indx);
+
+ // copy argument values
+ GLMessage_DataType *arg_values = glmsg.add_args();
+ arg_values->set_isarray(false);
+ arg_values->set_type(GLMessage::DataType::INT);
+ arg_values->add_intvalue((int)values);
+
+ // call function
+ glContext->hooks->gl.glVertexAttrib4fv(indx, values);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glVertexAttribPointer);
+
+ // copy argument indx
+ GLMessage_DataType *arg_indx = glmsg.add_args();
+ arg_indx->set_isarray(false);
+ arg_indx->set_type(GLMessage::DataType::INT);
+ arg_indx->add_intvalue(indx);
+
+ // copy argument size
+ GLMessage_DataType *arg_size = glmsg.add_args();
+ arg_size->set_isarray(false);
+ arg_size->set_type(GLMessage::DataType::INT);
+ arg_size->add_intvalue(size);
+
+ // copy argument type
+ GLMessage_DataType *arg_type = glmsg.add_args();
+ arg_type->set_isarray(false);
+ arg_type->set_type(GLMessage::DataType::ENUM);
+ arg_type->add_intvalue((int)type);
+
+ // copy argument normalized
+ GLMessage_DataType *arg_normalized = glmsg.add_args();
+ arg_normalized->set_isarray(false);
+ arg_normalized->set_type(GLMessage::DataType::BOOL);
+ arg_normalized->add_boolvalue(normalized);
+
+ // copy argument stride
+ GLMessage_DataType *arg_stride = glmsg.add_args();
+ arg_stride->set_isarray(false);
+ arg_stride->set_type(GLMessage::DataType::INT);
+ arg_stride->add_intvalue(stride);
+
+ // copy argument ptr
+ GLMessage_DataType *arg_ptr = glmsg.add_args();
+ arg_ptr->set_isarray(false);
+ arg_ptr->set_type(GLMessage::DataType::INT);
+ arg_ptr->add_intvalue((int)ptr);
+
+ // call function
+ glContext->hooks->gl.glVertexAttribPointer(indx, size, type, normalized, stride, ptr);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glViewport(GLint x, GLint y, GLsizei width, GLsizei height) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glViewport);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::INT);
+ arg_x->add_intvalue(x);
+
+ // copy argument y
+ GLMessage_DataType *arg_y = glmsg.add_args();
+ arg_y->set_isarray(false);
+ arg_y->set_type(GLMessage::DataType::INT);
+ arg_y->add_intvalue(y);
+
+ // copy argument width
+ GLMessage_DataType *arg_width = glmsg.add_args();
+ arg_width->set_isarray(false);
+ arg_width->set_type(GLMessage::DataType::INT);
+ arg_width->add_intvalue(width);
+
+ // copy argument height
+ GLMessage_DataType *arg_height = glmsg.add_args();
+ arg_height->set_isarray(false);
+ arg_height->set_type(GLMessage::DataType::INT);
+ arg_height->add_intvalue(height);
+
+ // call function
+ glContext->hooks->gl.glViewport(x, y, width, height);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+
+// Definitions for GL2Ext APIs
+
+void GLTrace_glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glEGLImageTargetTexture2DOES);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument image
+ GLMessage_DataType *arg_image = glmsg.add_args();
+ arg_image->set_isarray(false);
+ arg_image->set_type(GLMessage::DataType::INT);
+ arg_image->add_intvalue((int)image);
+
+ // call function
+ glContext->hooks->gl.glEGLImageTargetTexture2DOES(target, image);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glEGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glEGLImageTargetRenderbufferStorageOES);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument image
+ GLMessage_DataType *arg_image = glmsg.add_args();
+ arg_image->set_isarray(false);
+ arg_image->set_type(GLMessage::DataType::INT);
+ arg_image->add_intvalue((int)image);
+
+ // call function
+ glContext->hooks->gl.glEGLImageTargetRenderbufferStorageOES(target, image);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetProgramBinaryOES(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetProgramBinaryOES);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // copy argument bufSize
+ GLMessage_DataType *arg_bufSize = glmsg.add_args();
+ arg_bufSize->set_isarray(false);
+ arg_bufSize->set_type(GLMessage::DataType::INT);
+ arg_bufSize->add_intvalue(bufSize);
+
+ // copy argument length
+ GLMessage_DataType *arg_length = glmsg.add_args();
+ arg_length->set_isarray(false);
+ arg_length->set_type(GLMessage::DataType::INT);
+ arg_length->add_intvalue((int)length);
+
+ // copy argument binaryFormat
+ GLMessage_DataType *arg_binaryFormat = glmsg.add_args();
+ arg_binaryFormat->set_isarray(false);
+ arg_binaryFormat->set_type(GLMessage::DataType::INT);
+ arg_binaryFormat->add_intvalue((int)binaryFormat);
+
+ // copy argument binary
+ GLMessage_DataType *arg_binary = glmsg.add_args();
+ arg_binary->set_isarray(false);
+ arg_binary->set_type(GLMessage::DataType::INT);
+ arg_binary->add_intvalue((int)binary);
+
+ // call function
+ glContext->hooks->gl.glGetProgramBinaryOES(program, bufSize, length, binaryFormat, binary);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramBinaryOES(GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glProgramBinaryOES);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // copy argument binaryFormat
+ GLMessage_DataType *arg_binaryFormat = glmsg.add_args();
+ arg_binaryFormat->set_isarray(false);
+ arg_binaryFormat->set_type(GLMessage::DataType::ENUM);
+ arg_binaryFormat->add_intvalue((int)binaryFormat);
+
+ // copy argument binary
+ GLMessage_DataType *arg_binary = glmsg.add_args();
+ arg_binary->set_isarray(false);
+ arg_binary->set_type(GLMessage::DataType::INT);
+ arg_binary->add_intvalue((int)binary);
+
+ // copy argument length
+ GLMessage_DataType *arg_length = glmsg.add_args();
+ arg_length->set_isarray(false);
+ arg_length->set_type(GLMessage::DataType::INT);
+ arg_length->add_intvalue(length);
+
+ // call function
+ glContext->hooks->gl.glProgramBinaryOES(program, binaryFormat, binary, length);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void* GLTrace_glMapBufferOES(GLenum target, GLenum access) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glMapBufferOES);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument access
+ GLMessage_DataType *arg_access = glmsg.add_args();
+ arg_access->set_isarray(false);
+ arg_access->set_type(GLMessage::DataType::ENUM);
+ arg_access->add_intvalue((int)access);
+
+ // call function
+ void* retValue = glContext->hooks->gl.glMapBufferOES(target, access);
+
+ // set return value
+ GLMessage_DataType *rt = glmsg.mutable_returnvalue();
+ rt->set_isarray(false);
+ rt->set_type(GLMessage::DataType::INT);
+ rt->add_intvalue((int)retValue);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+
+ return retValue;
+}
+
+GLboolean GLTrace_glUnmapBufferOES(GLenum target) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glUnmapBufferOES);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // call function
+ GLboolean retValue = glContext->hooks->gl.glUnmapBufferOES(target);
+
+ // set return value
+ GLMessage_DataType *rt = glmsg.mutable_returnvalue();
+ rt->set_isarray(false);
+ rt->set_type(GLMessage::DataType::BOOL);
+ rt->add_boolvalue(retValue);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+
+ return retValue;
+}
+
+void GLTrace_glGetBufferPointervOES(GLenum target, GLenum pname, GLvoid** params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetBufferPointervOES);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glGetBufferPointervOES(target, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glTexImage3DOES);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument level
+ GLMessage_DataType *arg_level = glmsg.add_args();
+ arg_level->set_isarray(false);
+ arg_level->set_type(GLMessage::DataType::INT);
+ arg_level->add_intvalue(level);
+
+ // copy argument internalformat
+ GLMessage_DataType *arg_internalformat = glmsg.add_args();
+ arg_internalformat->set_isarray(false);
+ arg_internalformat->set_type(GLMessage::DataType::ENUM);
+ arg_internalformat->add_intvalue((int)internalformat);
+
+ // copy argument width
+ GLMessage_DataType *arg_width = glmsg.add_args();
+ arg_width->set_isarray(false);
+ arg_width->set_type(GLMessage::DataType::INT);
+ arg_width->add_intvalue(width);
+
+ // copy argument height
+ GLMessage_DataType *arg_height = glmsg.add_args();
+ arg_height->set_isarray(false);
+ arg_height->set_type(GLMessage::DataType::INT);
+ arg_height->add_intvalue(height);
+
+ // copy argument depth
+ GLMessage_DataType *arg_depth = glmsg.add_args();
+ arg_depth->set_isarray(false);
+ arg_depth->set_type(GLMessage::DataType::INT);
+ arg_depth->add_intvalue(depth);
+
+ // copy argument border
+ GLMessage_DataType *arg_border = glmsg.add_args();
+ arg_border->set_isarray(false);
+ arg_border->set_type(GLMessage::DataType::INT);
+ arg_border->add_intvalue(border);
+
+ // copy argument format
+ GLMessage_DataType *arg_format = glmsg.add_args();
+ arg_format->set_isarray(false);
+ arg_format->set_type(GLMessage::DataType::ENUM);
+ arg_format->add_intvalue((int)format);
+
+ // copy argument type
+ GLMessage_DataType *arg_type = glmsg.add_args();
+ arg_type->set_isarray(false);
+ arg_type->set_type(GLMessage::DataType::ENUM);
+ arg_type->add_intvalue((int)type);
+
+ // copy argument pixels
+ GLMessage_DataType *arg_pixels = glmsg.add_args();
+ arg_pixels->set_isarray(false);
+ arg_pixels->set_type(GLMessage::DataType::INT);
+ arg_pixels->add_intvalue((int)pixels);
+
+ // call function
+ glContext->hooks->gl.glTexImage3DOES(target, level, internalformat, width, height, depth, border, format, type, pixels);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glTexSubImage3DOES);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument level
+ GLMessage_DataType *arg_level = glmsg.add_args();
+ arg_level->set_isarray(false);
+ arg_level->set_type(GLMessage::DataType::INT);
+ arg_level->add_intvalue(level);
+
+ // copy argument xoffset
+ GLMessage_DataType *arg_xoffset = glmsg.add_args();
+ arg_xoffset->set_isarray(false);
+ arg_xoffset->set_type(GLMessage::DataType::INT);
+ arg_xoffset->add_intvalue(xoffset);
+
+ // copy argument yoffset
+ GLMessage_DataType *arg_yoffset = glmsg.add_args();
+ arg_yoffset->set_isarray(false);
+ arg_yoffset->set_type(GLMessage::DataType::INT);
+ arg_yoffset->add_intvalue(yoffset);
+
+ // copy argument zoffset
+ GLMessage_DataType *arg_zoffset = glmsg.add_args();
+ arg_zoffset->set_isarray(false);
+ arg_zoffset->set_type(GLMessage::DataType::INT);
+ arg_zoffset->add_intvalue(zoffset);
+
+ // copy argument width
+ GLMessage_DataType *arg_width = glmsg.add_args();
+ arg_width->set_isarray(false);
+ arg_width->set_type(GLMessage::DataType::INT);
+ arg_width->add_intvalue(width);
+
+ // copy argument height
+ GLMessage_DataType *arg_height = glmsg.add_args();
+ arg_height->set_isarray(false);
+ arg_height->set_type(GLMessage::DataType::INT);
+ arg_height->add_intvalue(height);
+
+ // copy argument depth
+ GLMessage_DataType *arg_depth = glmsg.add_args();
+ arg_depth->set_isarray(false);
+ arg_depth->set_type(GLMessage::DataType::INT);
+ arg_depth->add_intvalue(depth);
+
+ // copy argument format
+ GLMessage_DataType *arg_format = glmsg.add_args();
+ arg_format->set_isarray(false);
+ arg_format->set_type(GLMessage::DataType::ENUM);
+ arg_format->add_intvalue((int)format);
+
+ // copy argument type
+ GLMessage_DataType *arg_type = glmsg.add_args();
+ arg_type->set_isarray(false);
+ arg_type->set_type(GLMessage::DataType::ENUM);
+ arg_type->add_intvalue((int)type);
+
+ // copy argument pixels
+ GLMessage_DataType *arg_pixels = glmsg.add_args();
+ arg_pixels->set_isarray(false);
+ arg_pixels->set_type(GLMessage::DataType::INT);
+ arg_pixels->add_intvalue((int)pixels);
+
+ // call function
+ glContext->hooks->gl.glTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glCopyTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glCopyTexSubImage3DOES);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument level
+ GLMessage_DataType *arg_level = glmsg.add_args();
+ arg_level->set_isarray(false);
+ arg_level->set_type(GLMessage::DataType::INT);
+ arg_level->add_intvalue(level);
+
+ // copy argument xoffset
+ GLMessage_DataType *arg_xoffset = glmsg.add_args();
+ arg_xoffset->set_isarray(false);
+ arg_xoffset->set_type(GLMessage::DataType::INT);
+ arg_xoffset->add_intvalue(xoffset);
+
+ // copy argument yoffset
+ GLMessage_DataType *arg_yoffset = glmsg.add_args();
+ arg_yoffset->set_isarray(false);
+ arg_yoffset->set_type(GLMessage::DataType::INT);
+ arg_yoffset->add_intvalue(yoffset);
+
+ // copy argument zoffset
+ GLMessage_DataType *arg_zoffset = glmsg.add_args();
+ arg_zoffset->set_isarray(false);
+ arg_zoffset->set_type(GLMessage::DataType::INT);
+ arg_zoffset->add_intvalue(zoffset);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::INT);
+ arg_x->add_intvalue(x);
+
+ // copy argument y
+ GLMessage_DataType *arg_y = glmsg.add_args();
+ arg_y->set_isarray(false);
+ arg_y->set_type(GLMessage::DataType::INT);
+ arg_y->add_intvalue(y);
+
+ // copy argument width
+ GLMessage_DataType *arg_width = glmsg.add_args();
+ arg_width->set_isarray(false);
+ arg_width->set_type(GLMessage::DataType::INT);
+ arg_width->add_intvalue(width);
+
+ // copy argument height
+ GLMessage_DataType *arg_height = glmsg.add_args();
+ arg_height->set_isarray(false);
+ arg_height->set_type(GLMessage::DataType::INT);
+ arg_height->add_intvalue(height);
+
+ // call function
+ glContext->hooks->gl.glCopyTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, x, y, width, height);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glCompressedTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glCompressedTexImage3DOES);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument level
+ GLMessage_DataType *arg_level = glmsg.add_args();
+ arg_level->set_isarray(false);
+ arg_level->set_type(GLMessage::DataType::INT);
+ arg_level->add_intvalue(level);
+
+ // copy argument internalformat
+ GLMessage_DataType *arg_internalformat = glmsg.add_args();
+ arg_internalformat->set_isarray(false);
+ arg_internalformat->set_type(GLMessage::DataType::ENUM);
+ arg_internalformat->add_intvalue((int)internalformat);
+
+ // copy argument width
+ GLMessage_DataType *arg_width = glmsg.add_args();
+ arg_width->set_isarray(false);
+ arg_width->set_type(GLMessage::DataType::INT);
+ arg_width->add_intvalue(width);
+
+ // copy argument height
+ GLMessage_DataType *arg_height = glmsg.add_args();
+ arg_height->set_isarray(false);
+ arg_height->set_type(GLMessage::DataType::INT);
+ arg_height->add_intvalue(height);
+
+ // copy argument depth
+ GLMessage_DataType *arg_depth = glmsg.add_args();
+ arg_depth->set_isarray(false);
+ arg_depth->set_type(GLMessage::DataType::INT);
+ arg_depth->add_intvalue(depth);
+
+ // copy argument border
+ GLMessage_DataType *arg_border = glmsg.add_args();
+ arg_border->set_isarray(false);
+ arg_border->set_type(GLMessage::DataType::INT);
+ arg_border->add_intvalue(border);
+
+ // copy argument imageSize
+ GLMessage_DataType *arg_imageSize = glmsg.add_args();
+ arg_imageSize->set_isarray(false);
+ arg_imageSize->set_type(GLMessage::DataType::INT);
+ arg_imageSize->add_intvalue(imageSize);
+
+ // copy argument data
+ GLMessage_DataType *arg_data = glmsg.add_args();
+ arg_data->set_isarray(false);
+ arg_data->set_type(GLMessage::DataType::INT);
+ arg_data->add_intvalue((int)data);
+
+ // call function
+ glContext->hooks->gl.glCompressedTexImage3DOES(target, level, internalformat, width, height, depth, border, imageSize, data);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glCompressedTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glCompressedTexSubImage3DOES);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument level
+ GLMessage_DataType *arg_level = glmsg.add_args();
+ arg_level->set_isarray(false);
+ arg_level->set_type(GLMessage::DataType::INT);
+ arg_level->add_intvalue(level);
+
+ // copy argument xoffset
+ GLMessage_DataType *arg_xoffset = glmsg.add_args();
+ arg_xoffset->set_isarray(false);
+ arg_xoffset->set_type(GLMessage::DataType::INT);
+ arg_xoffset->add_intvalue(xoffset);
+
+ // copy argument yoffset
+ GLMessage_DataType *arg_yoffset = glmsg.add_args();
+ arg_yoffset->set_isarray(false);
+ arg_yoffset->set_type(GLMessage::DataType::INT);
+ arg_yoffset->add_intvalue(yoffset);
+
+ // copy argument zoffset
+ GLMessage_DataType *arg_zoffset = glmsg.add_args();
+ arg_zoffset->set_isarray(false);
+ arg_zoffset->set_type(GLMessage::DataType::INT);
+ arg_zoffset->add_intvalue(zoffset);
+
+ // copy argument width
+ GLMessage_DataType *arg_width = glmsg.add_args();
+ arg_width->set_isarray(false);
+ arg_width->set_type(GLMessage::DataType::INT);
+ arg_width->add_intvalue(width);
+
+ // copy argument height
+ GLMessage_DataType *arg_height = glmsg.add_args();
+ arg_height->set_isarray(false);
+ arg_height->set_type(GLMessage::DataType::INT);
+ arg_height->add_intvalue(height);
+
+ // copy argument depth
+ GLMessage_DataType *arg_depth = glmsg.add_args();
+ arg_depth->set_isarray(false);
+ arg_depth->set_type(GLMessage::DataType::INT);
+ arg_depth->add_intvalue(depth);
+
+ // copy argument format
+ GLMessage_DataType *arg_format = glmsg.add_args();
+ arg_format->set_isarray(false);
+ arg_format->set_type(GLMessage::DataType::ENUM);
+ arg_format->add_intvalue((int)format);
+
+ // copy argument imageSize
+ GLMessage_DataType *arg_imageSize = glmsg.add_args();
+ arg_imageSize->set_isarray(false);
+ arg_imageSize->set_type(GLMessage::DataType::INT);
+ arg_imageSize->add_intvalue(imageSize);
+
+ // copy argument data
+ GLMessage_DataType *arg_data = glmsg.add_args();
+ arg_data->set_isarray(false);
+ arg_data->set_type(GLMessage::DataType::INT);
+ arg_data->add_intvalue((int)data);
+
+ // call function
+ glContext->hooks->gl.glCompressedTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glFramebufferTexture3DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glFramebufferTexture3DOES);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument attachment
+ GLMessage_DataType *arg_attachment = glmsg.add_args();
+ arg_attachment->set_isarray(false);
+ arg_attachment->set_type(GLMessage::DataType::ENUM);
+ arg_attachment->add_intvalue((int)attachment);
+
+ // copy argument textarget
+ GLMessage_DataType *arg_textarget = glmsg.add_args();
+ arg_textarget->set_isarray(false);
+ arg_textarget->set_type(GLMessage::DataType::ENUM);
+ arg_textarget->add_intvalue((int)textarget);
+
+ // copy argument texture
+ GLMessage_DataType *arg_texture = glmsg.add_args();
+ arg_texture->set_isarray(false);
+ arg_texture->set_type(GLMessage::DataType::INT);
+ arg_texture->add_intvalue(texture);
+
+ // copy argument level
+ GLMessage_DataType *arg_level = glmsg.add_args();
+ arg_level->set_isarray(false);
+ arg_level->set_type(GLMessage::DataType::INT);
+ arg_level->add_intvalue(level);
+
+ // copy argument zoffset
+ GLMessage_DataType *arg_zoffset = glmsg.add_args();
+ arg_zoffset->set_isarray(false);
+ arg_zoffset->set_type(GLMessage::DataType::INT);
+ arg_zoffset->add_intvalue(zoffset);
+
+ // call function
+ glContext->hooks->gl.glFramebufferTexture3DOES(target, attachment, textarget, texture, level, zoffset);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glBindVertexArrayOES(GLuint array) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glBindVertexArrayOES);
+
+ // copy argument array
+ GLMessage_DataType *arg_array = glmsg.add_args();
+ arg_array->set_isarray(false);
+ arg_array->set_type(GLMessage::DataType::INT);
+ arg_array->add_intvalue(array);
+
+ // call function
+ glContext->hooks->gl.glBindVertexArrayOES(array);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDeleteVertexArraysOES(GLsizei n, const GLuint *arrays) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glDeleteVertexArraysOES);
+
+ // copy argument n
+ GLMessage_DataType *arg_n = glmsg.add_args();
+ arg_n->set_isarray(false);
+ arg_n->set_type(GLMessage::DataType::INT);
+ arg_n->add_intvalue(n);
+
+ // copy argument arrays
+ GLMessage_DataType *arg_arrays = glmsg.add_args();
+ arg_arrays->set_isarray(false);
+ arg_arrays->set_type(GLMessage::DataType::INT);
+ arg_arrays->add_intvalue((int)arrays);
+
+ // call function
+ glContext->hooks->gl.glDeleteVertexArraysOES(n, arrays);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGenVertexArraysOES(GLsizei n, GLuint *arrays) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGenVertexArraysOES);
+
+ // copy argument n
+ GLMessage_DataType *arg_n = glmsg.add_args();
+ arg_n->set_isarray(false);
+ arg_n->set_type(GLMessage::DataType::INT);
+ arg_n->add_intvalue(n);
+
+ // copy argument arrays
+ GLMessage_DataType *arg_arrays = glmsg.add_args();
+ arg_arrays->set_isarray(false);
+ arg_arrays->set_type(GLMessage::DataType::INT);
+ arg_arrays->add_intvalue((int)arrays);
+
+ // call function
+ glContext->hooks->gl.glGenVertexArraysOES(n, arrays);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+GLboolean GLTrace_glIsVertexArrayOES(GLuint array) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glIsVertexArrayOES);
+
+ // copy argument array
+ GLMessage_DataType *arg_array = glmsg.add_args();
+ arg_array->set_isarray(false);
+ arg_array->set_type(GLMessage::DataType::INT);
+ arg_array->add_intvalue(array);
+
+ // call function
+ GLboolean retValue = glContext->hooks->gl.glIsVertexArrayOES(array);
+
+ // set return value
+ GLMessage_DataType *rt = glmsg.mutable_returnvalue();
+ rt->set_isarray(false);
+ rt->set_type(GLMessage::DataType::BOOL);
+ rt->add_boolvalue(retValue);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+
+ return retValue;
+}
+
+void GLTrace_glGetPerfMonitorGroupsAMD(GLint *numGroups, GLsizei groupsSize, GLuint *groups) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetPerfMonitorGroupsAMD);
+
+ // copy argument numGroups
+ GLMessage_DataType *arg_numGroups = glmsg.add_args();
+ arg_numGroups->set_isarray(false);
+ arg_numGroups->set_type(GLMessage::DataType::INT);
+ arg_numGroups->add_intvalue((int)numGroups);
+
+ // copy argument groupsSize
+ GLMessage_DataType *arg_groupsSize = glmsg.add_args();
+ arg_groupsSize->set_isarray(false);
+ arg_groupsSize->set_type(GLMessage::DataType::INT);
+ arg_groupsSize->add_intvalue(groupsSize);
+
+ // copy argument groups
+ GLMessage_DataType *arg_groups = glmsg.add_args();
+ arg_groups->set_isarray(false);
+ arg_groups->set_type(GLMessage::DataType::INT);
+ arg_groups->add_intvalue((int)groups);
+
+ // call function
+ glContext->hooks->gl.glGetPerfMonitorGroupsAMD(numGroups, groupsSize, groups);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetPerfMonitorCountersAMD(GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetPerfMonitorCountersAMD);
+
+ // copy argument group
+ GLMessage_DataType *arg_group = glmsg.add_args();
+ arg_group->set_isarray(false);
+ arg_group->set_type(GLMessage::DataType::INT);
+ arg_group->add_intvalue(group);
+
+ // copy argument numCounters
+ GLMessage_DataType *arg_numCounters = glmsg.add_args();
+ arg_numCounters->set_isarray(false);
+ arg_numCounters->set_type(GLMessage::DataType::INT);
+ arg_numCounters->add_intvalue((int)numCounters);
+
+ // copy argument maxActiveCounters
+ GLMessage_DataType *arg_maxActiveCounters = glmsg.add_args();
+ arg_maxActiveCounters->set_isarray(false);
+ arg_maxActiveCounters->set_type(GLMessage::DataType::INT);
+ arg_maxActiveCounters->add_intvalue((int)maxActiveCounters);
+
+ // copy argument counterSize
+ GLMessage_DataType *arg_counterSize = glmsg.add_args();
+ arg_counterSize->set_isarray(false);
+ arg_counterSize->set_type(GLMessage::DataType::INT);
+ arg_counterSize->add_intvalue(counterSize);
+
+ // copy argument counters
+ GLMessage_DataType *arg_counters = glmsg.add_args();
+ arg_counters->set_isarray(false);
+ arg_counters->set_type(GLMessage::DataType::INT);
+ arg_counters->add_intvalue((int)counters);
+
+ // call function
+ glContext->hooks->gl.glGetPerfMonitorCountersAMD(group, numCounters, maxActiveCounters, counterSize, counters);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetPerfMonitorGroupStringAMD(GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetPerfMonitorGroupStringAMD);
+
+ // copy argument group
+ GLMessage_DataType *arg_group = glmsg.add_args();
+ arg_group->set_isarray(false);
+ arg_group->set_type(GLMessage::DataType::INT);
+ arg_group->add_intvalue(group);
+
+ // copy argument bufSize
+ GLMessage_DataType *arg_bufSize = glmsg.add_args();
+ arg_bufSize->set_isarray(false);
+ arg_bufSize->set_type(GLMessage::DataType::INT);
+ arg_bufSize->add_intvalue(bufSize);
+
+ // copy argument length
+ GLMessage_DataType *arg_length = glmsg.add_args();
+ arg_length->set_isarray(false);
+ arg_length->set_type(GLMessage::DataType::INT);
+ arg_length->add_intvalue((int)length);
+
+ // copy argument groupString
+ GLMessage_DataType *arg_groupString = glmsg.add_args();
+ arg_groupString->set_isarray(false);
+ arg_groupString->set_type(GLMessage::DataType::INT);
+ arg_groupString->add_intvalue((int)groupString);
+
+ // call function
+ glContext->hooks->gl.glGetPerfMonitorGroupStringAMD(group, bufSize, length, groupString);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetPerfMonitorCounterStringAMD(GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetPerfMonitorCounterStringAMD);
+
+ // copy argument group
+ GLMessage_DataType *arg_group = glmsg.add_args();
+ arg_group->set_isarray(false);
+ arg_group->set_type(GLMessage::DataType::INT);
+ arg_group->add_intvalue(group);
+
+ // copy argument counter
+ GLMessage_DataType *arg_counter = glmsg.add_args();
+ arg_counter->set_isarray(false);
+ arg_counter->set_type(GLMessage::DataType::INT);
+ arg_counter->add_intvalue(counter);
+
+ // copy argument bufSize
+ GLMessage_DataType *arg_bufSize = glmsg.add_args();
+ arg_bufSize->set_isarray(false);
+ arg_bufSize->set_type(GLMessage::DataType::INT);
+ arg_bufSize->add_intvalue(bufSize);
+
+ // copy argument length
+ GLMessage_DataType *arg_length = glmsg.add_args();
+ arg_length->set_isarray(false);
+ arg_length->set_type(GLMessage::DataType::INT);
+ arg_length->add_intvalue((int)length);
+
+ // copy argument counterString
+ GLMessage_DataType *arg_counterString = glmsg.add_args();
+ arg_counterString->set_isarray(false);
+ arg_counterString->set_type(GLMessage::DataType::INT);
+ arg_counterString->add_intvalue((int)counterString);
+
+ // call function
+ glContext->hooks->gl.glGetPerfMonitorCounterStringAMD(group, counter, bufSize, length, counterString);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetPerfMonitorCounterInfoAMD(GLuint group, GLuint counter, GLenum pname, GLvoid *data) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetPerfMonitorCounterInfoAMD);
+
+ // copy argument group
+ GLMessage_DataType *arg_group = glmsg.add_args();
+ arg_group->set_isarray(false);
+ arg_group->set_type(GLMessage::DataType::INT);
+ arg_group->add_intvalue(group);
+
+ // copy argument counter
+ GLMessage_DataType *arg_counter = glmsg.add_args();
+ arg_counter->set_isarray(false);
+ arg_counter->set_type(GLMessage::DataType::INT);
+ arg_counter->add_intvalue(counter);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument data
+ GLMessage_DataType *arg_data = glmsg.add_args();
+ arg_data->set_isarray(false);
+ arg_data->set_type(GLMessage::DataType::INT);
+ arg_data->add_intvalue((int)data);
+
+ // call function
+ glContext->hooks->gl.glGetPerfMonitorCounterInfoAMD(group, counter, pname, data);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGenPerfMonitorsAMD(GLsizei n, GLuint *monitors) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGenPerfMonitorsAMD);
+
+ // copy argument n
+ GLMessage_DataType *arg_n = glmsg.add_args();
+ arg_n->set_isarray(false);
+ arg_n->set_type(GLMessage::DataType::INT);
+ arg_n->add_intvalue(n);
+
+ // copy argument monitors
+ GLMessage_DataType *arg_monitors = glmsg.add_args();
+ arg_monitors->set_isarray(false);
+ arg_monitors->set_type(GLMessage::DataType::INT);
+ arg_monitors->add_intvalue((int)monitors);
+
+ // call function
+ glContext->hooks->gl.glGenPerfMonitorsAMD(n, monitors);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDeletePerfMonitorsAMD(GLsizei n, GLuint *monitors) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glDeletePerfMonitorsAMD);
+
+ // copy argument n
+ GLMessage_DataType *arg_n = glmsg.add_args();
+ arg_n->set_isarray(false);
+ arg_n->set_type(GLMessage::DataType::INT);
+ arg_n->add_intvalue(n);
+
+ // copy argument monitors
+ GLMessage_DataType *arg_monitors = glmsg.add_args();
+ arg_monitors->set_isarray(false);
+ arg_monitors->set_type(GLMessage::DataType::INT);
+ arg_monitors->add_intvalue((int)monitors);
+
+ // call function
+ glContext->hooks->gl.glDeletePerfMonitorsAMD(n, monitors);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glSelectPerfMonitorCountersAMD(GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glSelectPerfMonitorCountersAMD);
+
+ // copy argument monitor
+ GLMessage_DataType *arg_monitor = glmsg.add_args();
+ arg_monitor->set_isarray(false);
+ arg_monitor->set_type(GLMessage::DataType::INT);
+ arg_monitor->add_intvalue(monitor);
+
+ // copy argument enable
+ GLMessage_DataType *arg_enable = glmsg.add_args();
+ arg_enable->set_isarray(false);
+ arg_enable->set_type(GLMessage::DataType::BOOL);
+ arg_enable->add_boolvalue(enable);
+
+ // copy argument group
+ GLMessage_DataType *arg_group = glmsg.add_args();
+ arg_group->set_isarray(false);
+ arg_group->set_type(GLMessage::DataType::INT);
+ arg_group->add_intvalue(group);
+
+ // copy argument numCounters
+ GLMessage_DataType *arg_numCounters = glmsg.add_args();
+ arg_numCounters->set_isarray(false);
+ arg_numCounters->set_type(GLMessage::DataType::INT);
+ arg_numCounters->add_intvalue(numCounters);
+
+ // copy argument countersList
+ GLMessage_DataType *arg_countersList = glmsg.add_args();
+ arg_countersList->set_isarray(false);
+ arg_countersList->set_type(GLMessage::DataType::INT);
+ arg_countersList->add_intvalue((int)countersList);
+
+ // call function
+ glContext->hooks->gl.glSelectPerfMonitorCountersAMD(monitor, enable, group, numCounters, countersList);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glBeginPerfMonitorAMD(GLuint monitor) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glBeginPerfMonitorAMD);
+
+ // copy argument monitor
+ GLMessage_DataType *arg_monitor = glmsg.add_args();
+ arg_monitor->set_isarray(false);
+ arg_monitor->set_type(GLMessage::DataType::INT);
+ arg_monitor->add_intvalue(monitor);
+
+ // call function
+ glContext->hooks->gl.glBeginPerfMonitorAMD(monitor);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glEndPerfMonitorAMD(GLuint monitor) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glEndPerfMonitorAMD);
+
+ // copy argument monitor
+ GLMessage_DataType *arg_monitor = glmsg.add_args();
+ arg_monitor->set_isarray(false);
+ arg_monitor->set_type(GLMessage::DataType::INT);
+ arg_monitor->add_intvalue(monitor);
+
+ // call function
+ glContext->hooks->gl.glEndPerfMonitorAMD(monitor);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetPerfMonitorCounterDataAMD(GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetPerfMonitorCounterDataAMD);
+
+ // copy argument monitor
+ GLMessage_DataType *arg_monitor = glmsg.add_args();
+ arg_monitor->set_isarray(false);
+ arg_monitor->set_type(GLMessage::DataType::INT);
+ arg_monitor->add_intvalue(monitor);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument dataSize
+ GLMessage_DataType *arg_dataSize = glmsg.add_args();
+ arg_dataSize->set_isarray(false);
+ arg_dataSize->set_type(GLMessage::DataType::INT);
+ arg_dataSize->add_intvalue(dataSize);
+
+ // copy argument data
+ GLMessage_DataType *arg_data = glmsg.add_args();
+ arg_data->set_isarray(false);
+ arg_data->set_type(GLMessage::DataType::INT);
+ arg_data->add_intvalue((int)data);
+
+ // copy argument bytesWritten
+ GLMessage_DataType *arg_bytesWritten = glmsg.add_args();
+ arg_bytesWritten->set_isarray(false);
+ arg_bytesWritten->set_type(GLMessage::DataType::INT);
+ arg_bytesWritten->add_intvalue((int)bytesWritten);
+
+ // call function
+ glContext->hooks->gl.glGetPerfMonitorCounterDataAMD(monitor, pname, dataSize, data, bytesWritten);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDiscardFramebufferEXT(GLenum target, GLsizei numAttachments, const GLenum *attachments) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glDiscardFramebufferEXT);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument numAttachments
+ GLMessage_DataType *arg_numAttachments = glmsg.add_args();
+ arg_numAttachments->set_isarray(false);
+ arg_numAttachments->set_type(GLMessage::DataType::INT);
+ arg_numAttachments->add_intvalue(numAttachments);
+
+ // copy argument attachments
+ GLMessage_DataType *arg_attachments = glmsg.add_args();
+ arg_attachments->set_isarray(false);
+ arg_attachments->set_type(GLMessage::DataType::INT);
+ arg_attachments->add_intvalue((int)attachments);
+
+ // call function
+ glContext->hooks->gl.glDiscardFramebufferEXT(target, numAttachments, attachments);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glMultiDrawArraysEXT(GLenum mode, GLint *first, GLsizei *count, GLsizei primcount) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glMultiDrawArraysEXT);
+
+ // copy argument mode
+ GLMessage_DataType *arg_mode = glmsg.add_args();
+ arg_mode->set_isarray(false);
+ arg_mode->set_type(GLMessage::DataType::ENUM);
+ arg_mode->add_intvalue((int)mode);
+
+ // copy argument first
+ GLMessage_DataType *arg_first = glmsg.add_args();
+ arg_first->set_isarray(false);
+ arg_first->set_type(GLMessage::DataType::INT);
+ arg_first->add_intvalue((int)first);
+
+ // copy argument count
+ GLMessage_DataType *arg_count = glmsg.add_args();
+ arg_count->set_isarray(false);
+ arg_count->set_type(GLMessage::DataType::INT);
+ arg_count->add_intvalue((int)count);
+
+ // copy argument primcount
+ GLMessage_DataType *arg_primcount = glmsg.add_args();
+ arg_primcount->set_isarray(false);
+ arg_primcount->set_type(GLMessage::DataType::INT);
+ arg_primcount->add_intvalue(primcount);
+
+ // call function
+ glContext->hooks->gl.glMultiDrawArraysEXT(mode, first, count, primcount);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glMultiDrawElementsEXT(GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glMultiDrawElementsEXT);
+
+ // copy argument mode
+ GLMessage_DataType *arg_mode = glmsg.add_args();
+ arg_mode->set_isarray(false);
+ arg_mode->set_type(GLMessage::DataType::ENUM);
+ arg_mode->add_intvalue((int)mode);
+
+ // copy argument count
+ GLMessage_DataType *arg_count = glmsg.add_args();
+ arg_count->set_isarray(false);
+ arg_count->set_type(GLMessage::DataType::INT);
+ arg_count->add_intvalue((int)count);
+
+ // copy argument type
+ GLMessage_DataType *arg_type = glmsg.add_args();
+ arg_type->set_isarray(false);
+ arg_type->set_type(GLMessage::DataType::ENUM);
+ arg_type->add_intvalue((int)type);
+
+ // copy argument indices
+ GLMessage_DataType *arg_indices = glmsg.add_args();
+ arg_indices->set_isarray(false);
+ arg_indices->set_type(GLMessage::DataType::INT);
+ arg_indices->add_intvalue((int)indices);
+
+ // copy argument primcount
+ GLMessage_DataType *arg_primcount = glmsg.add_args();
+ arg_primcount->set_isarray(false);
+ arg_primcount->set_type(GLMessage::DataType::INT);
+ arg_primcount->add_intvalue(primcount);
+
+ // call function
+ glContext->hooks->gl.glMultiDrawElementsEXT(mode, count, type, indices, primcount);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glRenderbufferStorageMultisampleIMG(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glRenderbufferStorageMultisampleIMG);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument samples
+ GLMessage_DataType *arg_samples = glmsg.add_args();
+ arg_samples->set_isarray(false);
+ arg_samples->set_type(GLMessage::DataType::INT);
+ arg_samples->add_intvalue(samples);
+
+ // copy argument internalformat
+ GLMessage_DataType *arg_internalformat = glmsg.add_args();
+ arg_internalformat->set_isarray(false);
+ arg_internalformat->set_type(GLMessage::DataType::ENUM);
+ arg_internalformat->add_intvalue((int)internalformat);
+
+ // copy argument width
+ GLMessage_DataType *arg_width = glmsg.add_args();
+ arg_width->set_isarray(false);
+ arg_width->set_type(GLMessage::DataType::INT);
+ arg_width->add_intvalue(width);
+
+ // copy argument height
+ GLMessage_DataType *arg_height = glmsg.add_args();
+ arg_height->set_isarray(false);
+ arg_height->set_type(GLMessage::DataType::INT);
+ arg_height->add_intvalue(height);
+
+ // call function
+ glContext->hooks->gl.glRenderbufferStorageMultisampleIMG(target, samples, internalformat, width, height);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glFramebufferTexture2DMultisampleIMG(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glFramebufferTexture2DMultisampleIMG);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument attachment
+ GLMessage_DataType *arg_attachment = glmsg.add_args();
+ arg_attachment->set_isarray(false);
+ arg_attachment->set_type(GLMessage::DataType::ENUM);
+ arg_attachment->add_intvalue((int)attachment);
+
+ // copy argument textarget
+ GLMessage_DataType *arg_textarget = glmsg.add_args();
+ arg_textarget->set_isarray(false);
+ arg_textarget->set_type(GLMessage::DataType::ENUM);
+ arg_textarget->add_intvalue((int)textarget);
+
+ // copy argument texture
+ GLMessage_DataType *arg_texture = glmsg.add_args();
+ arg_texture->set_isarray(false);
+ arg_texture->set_type(GLMessage::DataType::INT);
+ arg_texture->add_intvalue(texture);
+
+ // copy argument level
+ GLMessage_DataType *arg_level = glmsg.add_args();
+ arg_level->set_isarray(false);
+ arg_level->set_type(GLMessage::DataType::INT);
+ arg_level->add_intvalue(level);
+
+ // copy argument samples
+ GLMessage_DataType *arg_samples = glmsg.add_args();
+ arg_samples->set_isarray(false);
+ arg_samples->set_type(GLMessage::DataType::INT);
+ arg_samples->add_intvalue(samples);
+
+ // call function
+ glContext->hooks->gl.glFramebufferTexture2DMultisampleIMG(target, attachment, textarget, texture, level, samples);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDeleteFencesNV(GLsizei n, const GLuint *fences) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glDeleteFencesNV);
+
+ // copy argument n
+ GLMessage_DataType *arg_n = glmsg.add_args();
+ arg_n->set_isarray(false);
+ arg_n->set_type(GLMessage::DataType::INT);
+ arg_n->add_intvalue(n);
+
+ // copy argument fences
+ GLMessage_DataType *arg_fences = glmsg.add_args();
+ arg_fences->set_isarray(false);
+ arg_fences->set_type(GLMessage::DataType::INT);
+ arg_fences->add_intvalue((int)fences);
+
+ // call function
+ glContext->hooks->gl.glDeleteFencesNV(n, fences);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGenFencesNV(GLsizei n, GLuint *fences) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGenFencesNV);
+
+ // copy argument n
+ GLMessage_DataType *arg_n = glmsg.add_args();
+ arg_n->set_isarray(false);
+ arg_n->set_type(GLMessage::DataType::INT);
+ arg_n->add_intvalue(n);
+
+ // copy argument fences
+ GLMessage_DataType *arg_fences = glmsg.add_args();
+ arg_fences->set_isarray(false);
+ arg_fences->set_type(GLMessage::DataType::INT);
+ arg_fences->add_intvalue((int)fences);
+
+ // call function
+ glContext->hooks->gl.glGenFencesNV(n, fences);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+GLboolean GLTrace_glIsFenceNV(GLuint fence) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glIsFenceNV);
+
+ // copy argument fence
+ GLMessage_DataType *arg_fence = glmsg.add_args();
+ arg_fence->set_isarray(false);
+ arg_fence->set_type(GLMessage::DataType::INT);
+ arg_fence->add_intvalue(fence);
+
+ // call function
+ GLboolean retValue = glContext->hooks->gl.glIsFenceNV(fence);
+
+ // set return value
+ GLMessage_DataType *rt = glmsg.mutable_returnvalue();
+ rt->set_isarray(false);
+ rt->set_type(GLMessage::DataType::BOOL);
+ rt->add_boolvalue(retValue);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+
+ return retValue;
+}
+
+GLboolean GLTrace_glTestFenceNV(GLuint fence) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glTestFenceNV);
+
+ // copy argument fence
+ GLMessage_DataType *arg_fence = glmsg.add_args();
+ arg_fence->set_isarray(false);
+ arg_fence->set_type(GLMessage::DataType::INT);
+ arg_fence->add_intvalue(fence);
+
+ // call function
+ GLboolean retValue = glContext->hooks->gl.glTestFenceNV(fence);
+
+ // set return value
+ GLMessage_DataType *rt = glmsg.mutable_returnvalue();
+ rt->set_isarray(false);
+ rt->set_type(GLMessage::DataType::BOOL);
+ rt->add_boolvalue(retValue);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+
+ return retValue;
+}
+
+void GLTrace_glGetFenceivNV(GLuint fence, GLenum pname, GLint *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetFenceivNV);
+
+ // copy argument fence
+ GLMessage_DataType *arg_fence = glmsg.add_args();
+ arg_fence->set_isarray(false);
+ arg_fence->set_type(GLMessage::DataType::INT);
+ arg_fence->add_intvalue(fence);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glGetFenceivNV(fence, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glFinishFenceNV(GLuint fence) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glFinishFenceNV);
+
+ // copy argument fence
+ GLMessage_DataType *arg_fence = glmsg.add_args();
+ arg_fence->set_isarray(false);
+ arg_fence->set_type(GLMessage::DataType::INT);
+ arg_fence->add_intvalue(fence);
+
+ // call function
+ glContext->hooks->gl.glFinishFenceNV(fence);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glSetFenceNV(GLuint fence, GLenum condition) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glSetFenceNV);
+
+ // copy argument fence
+ GLMessage_DataType *arg_fence = glmsg.add_args();
+ arg_fence->set_isarray(false);
+ arg_fence->set_type(GLMessage::DataType::INT);
+ arg_fence->add_intvalue(fence);
+
+ // copy argument condition
+ GLMessage_DataType *arg_condition = glmsg.add_args();
+ arg_condition->set_isarray(false);
+ arg_condition->set_type(GLMessage::DataType::ENUM);
+ arg_condition->add_intvalue((int)condition);
+
+ // call function
+ glContext->hooks->gl.glSetFenceNV(fence, condition);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glCoverageMaskNV(GLboolean mask) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glCoverageMaskNV);
+
+ // copy argument mask
+ GLMessage_DataType *arg_mask = glmsg.add_args();
+ arg_mask->set_isarray(false);
+ arg_mask->set_type(GLMessage::DataType::BOOL);
+ arg_mask->add_boolvalue(mask);
+
+ // call function
+ glContext->hooks->gl.glCoverageMaskNV(mask);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glCoverageOperationNV(GLenum operation) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glCoverageOperationNV);
+
+ // copy argument operation
+ GLMessage_DataType *arg_operation = glmsg.add_args();
+ arg_operation->set_isarray(false);
+ arg_operation->set_type(GLMessage::DataType::ENUM);
+ arg_operation->add_intvalue((int)operation);
+
+ // call function
+ glContext->hooks->gl.glCoverageOperationNV(operation);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetDriverControlsQCOM(GLint *num, GLsizei size, GLuint *driverControls) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetDriverControlsQCOM);
+
+ // copy argument num
+ GLMessage_DataType *arg_num = glmsg.add_args();
+ arg_num->set_isarray(false);
+ arg_num->set_type(GLMessage::DataType::INT);
+ arg_num->add_intvalue((int)num);
+
+ // copy argument size
+ GLMessage_DataType *arg_size = glmsg.add_args();
+ arg_size->set_isarray(false);
+ arg_size->set_type(GLMessage::DataType::INT);
+ arg_size->add_intvalue(size);
+
+ // copy argument driverControls
+ GLMessage_DataType *arg_driverControls = glmsg.add_args();
+ arg_driverControls->set_isarray(false);
+ arg_driverControls->set_type(GLMessage::DataType::INT);
+ arg_driverControls->add_intvalue((int)driverControls);
+
+ // call function
+ glContext->hooks->gl.glGetDriverControlsQCOM(num, size, driverControls);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetDriverControlStringQCOM(GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetDriverControlStringQCOM);
+
+ // copy argument driverControl
+ GLMessage_DataType *arg_driverControl = glmsg.add_args();
+ arg_driverControl->set_isarray(false);
+ arg_driverControl->set_type(GLMessage::DataType::INT);
+ arg_driverControl->add_intvalue(driverControl);
+
+ // copy argument bufSize
+ GLMessage_DataType *arg_bufSize = glmsg.add_args();
+ arg_bufSize->set_isarray(false);
+ arg_bufSize->set_type(GLMessage::DataType::INT);
+ arg_bufSize->add_intvalue(bufSize);
+
+ // copy argument length
+ GLMessage_DataType *arg_length = glmsg.add_args();
+ arg_length->set_isarray(false);
+ arg_length->set_type(GLMessage::DataType::INT);
+ arg_length->add_intvalue((int)length);
+
+ // copy argument driverControlString
+ GLMessage_DataType *arg_driverControlString = glmsg.add_args();
+ arg_driverControlString->set_isarray(false);
+ arg_driverControlString->set_type(GLMessage::DataType::INT);
+ arg_driverControlString->add_intvalue((int)driverControlString);
+
+ // call function
+ glContext->hooks->gl.glGetDriverControlStringQCOM(driverControl, bufSize, length, driverControlString);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glEnableDriverControlQCOM(GLuint driverControl) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glEnableDriverControlQCOM);
+
+ // copy argument driverControl
+ GLMessage_DataType *arg_driverControl = glmsg.add_args();
+ arg_driverControl->set_isarray(false);
+ arg_driverControl->set_type(GLMessage::DataType::INT);
+ arg_driverControl->add_intvalue(driverControl);
+
+ // call function
+ glContext->hooks->gl.glEnableDriverControlQCOM(driverControl);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDisableDriverControlQCOM(GLuint driverControl) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glDisableDriverControlQCOM);
+
+ // copy argument driverControl
+ GLMessage_DataType *arg_driverControl = glmsg.add_args();
+ arg_driverControl->set_isarray(false);
+ arg_driverControl->set_type(GLMessage::DataType::INT);
+ arg_driverControl->add_intvalue(driverControl);
+
+ // call function
+ glContext->hooks->gl.glDisableDriverControlQCOM(driverControl);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glExtGetTexturesQCOM(GLuint *textures, GLint maxTextures, GLint *numTextures) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glExtGetTexturesQCOM);
+
+ // copy argument textures
+ GLMessage_DataType *arg_textures = glmsg.add_args();
+ arg_textures->set_isarray(false);
+ arg_textures->set_type(GLMessage::DataType::INT);
+ arg_textures->add_intvalue((int)textures);
+
+ // copy argument maxTextures
+ GLMessage_DataType *arg_maxTextures = glmsg.add_args();
+ arg_maxTextures->set_isarray(false);
+ arg_maxTextures->set_type(GLMessage::DataType::INT);
+ arg_maxTextures->add_intvalue(maxTextures);
+
+ // copy argument numTextures
+ GLMessage_DataType *arg_numTextures = glmsg.add_args();
+ arg_numTextures->set_isarray(false);
+ arg_numTextures->set_type(GLMessage::DataType::INT);
+ arg_numTextures->add_intvalue((int)numTextures);
+
+ // call function
+ glContext->hooks->gl.glExtGetTexturesQCOM(textures, maxTextures, numTextures);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glExtGetBuffersQCOM(GLuint *buffers, GLint maxBuffers, GLint *numBuffers) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glExtGetBuffersQCOM);
+
+ // copy argument buffers
+ GLMessage_DataType *arg_buffers = glmsg.add_args();
+ arg_buffers->set_isarray(false);
+ arg_buffers->set_type(GLMessage::DataType::INT);
+ arg_buffers->add_intvalue((int)buffers);
+
+ // copy argument maxBuffers
+ GLMessage_DataType *arg_maxBuffers = glmsg.add_args();
+ arg_maxBuffers->set_isarray(false);
+ arg_maxBuffers->set_type(GLMessage::DataType::INT);
+ arg_maxBuffers->add_intvalue(maxBuffers);
+
+ // copy argument numBuffers
+ GLMessage_DataType *arg_numBuffers = glmsg.add_args();
+ arg_numBuffers->set_isarray(false);
+ arg_numBuffers->set_type(GLMessage::DataType::INT);
+ arg_numBuffers->add_intvalue((int)numBuffers);
+
+ // call function
+ glContext->hooks->gl.glExtGetBuffersQCOM(buffers, maxBuffers, numBuffers);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glExtGetRenderbuffersQCOM(GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glExtGetRenderbuffersQCOM);
+
+ // copy argument renderbuffers
+ GLMessage_DataType *arg_renderbuffers = glmsg.add_args();
+ arg_renderbuffers->set_isarray(false);
+ arg_renderbuffers->set_type(GLMessage::DataType::INT);
+ arg_renderbuffers->add_intvalue((int)renderbuffers);
+
+ // copy argument maxRenderbuffers
+ GLMessage_DataType *arg_maxRenderbuffers = glmsg.add_args();
+ arg_maxRenderbuffers->set_isarray(false);
+ arg_maxRenderbuffers->set_type(GLMessage::DataType::INT);
+ arg_maxRenderbuffers->add_intvalue(maxRenderbuffers);
+
+ // copy argument numRenderbuffers
+ GLMessage_DataType *arg_numRenderbuffers = glmsg.add_args();
+ arg_numRenderbuffers->set_isarray(false);
+ arg_numRenderbuffers->set_type(GLMessage::DataType::INT);
+ arg_numRenderbuffers->add_intvalue((int)numRenderbuffers);
+
+ // call function
+ glContext->hooks->gl.glExtGetRenderbuffersQCOM(renderbuffers, maxRenderbuffers, numRenderbuffers);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glExtGetFramebuffersQCOM(GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glExtGetFramebuffersQCOM);
+
+ // copy argument framebuffers
+ GLMessage_DataType *arg_framebuffers = glmsg.add_args();
+ arg_framebuffers->set_isarray(false);
+ arg_framebuffers->set_type(GLMessage::DataType::INT);
+ arg_framebuffers->add_intvalue((int)framebuffers);
+
+ // copy argument maxFramebuffers
+ GLMessage_DataType *arg_maxFramebuffers = glmsg.add_args();
+ arg_maxFramebuffers->set_isarray(false);
+ arg_maxFramebuffers->set_type(GLMessage::DataType::INT);
+ arg_maxFramebuffers->add_intvalue(maxFramebuffers);
+
+ // copy argument numFramebuffers
+ GLMessage_DataType *arg_numFramebuffers = glmsg.add_args();
+ arg_numFramebuffers->set_isarray(false);
+ arg_numFramebuffers->set_type(GLMessage::DataType::INT);
+ arg_numFramebuffers->add_intvalue((int)numFramebuffers);
+
+ // call function
+ glContext->hooks->gl.glExtGetFramebuffersQCOM(framebuffers, maxFramebuffers, numFramebuffers);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glExtGetTexLevelParameterivQCOM(GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glExtGetTexLevelParameterivQCOM);
+
+ // copy argument texture
+ GLMessage_DataType *arg_texture = glmsg.add_args();
+ arg_texture->set_isarray(false);
+ arg_texture->set_type(GLMessage::DataType::INT);
+ arg_texture->add_intvalue(texture);
+
+ // copy argument face
+ GLMessage_DataType *arg_face = glmsg.add_args();
+ arg_face->set_isarray(false);
+ arg_face->set_type(GLMessage::DataType::ENUM);
+ arg_face->add_intvalue((int)face);
+
+ // copy argument level
+ GLMessage_DataType *arg_level = glmsg.add_args();
+ arg_level->set_isarray(false);
+ arg_level->set_type(GLMessage::DataType::INT);
+ arg_level->add_intvalue(level);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glExtGetTexLevelParameterivQCOM(texture, face, level, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glExtTexObjectStateOverrideiQCOM(GLenum target, GLenum pname, GLint param) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glExtTexObjectStateOverrideiQCOM);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument param
+ GLMessage_DataType *arg_param = glmsg.add_args();
+ arg_param->set_isarray(false);
+ arg_param->set_type(GLMessage::DataType::INT);
+ arg_param->add_intvalue(param);
+
+ // call function
+ glContext->hooks->gl.glExtTexObjectStateOverrideiQCOM(target, pname, param);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glExtGetTexSubImageQCOM(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glExtGetTexSubImageQCOM);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument level
+ GLMessage_DataType *arg_level = glmsg.add_args();
+ arg_level->set_isarray(false);
+ arg_level->set_type(GLMessage::DataType::INT);
+ arg_level->add_intvalue(level);
+
+ // copy argument xoffset
+ GLMessage_DataType *arg_xoffset = glmsg.add_args();
+ arg_xoffset->set_isarray(false);
+ arg_xoffset->set_type(GLMessage::DataType::INT);
+ arg_xoffset->add_intvalue(xoffset);
+
+ // copy argument yoffset
+ GLMessage_DataType *arg_yoffset = glmsg.add_args();
+ arg_yoffset->set_isarray(false);
+ arg_yoffset->set_type(GLMessage::DataType::INT);
+ arg_yoffset->add_intvalue(yoffset);
+
+ // copy argument zoffset
+ GLMessage_DataType *arg_zoffset = glmsg.add_args();
+ arg_zoffset->set_isarray(false);
+ arg_zoffset->set_type(GLMessage::DataType::INT);
+ arg_zoffset->add_intvalue(zoffset);
+
+ // copy argument width
+ GLMessage_DataType *arg_width = glmsg.add_args();
+ arg_width->set_isarray(false);
+ arg_width->set_type(GLMessage::DataType::INT);
+ arg_width->add_intvalue(width);
+
+ // copy argument height
+ GLMessage_DataType *arg_height = glmsg.add_args();
+ arg_height->set_isarray(false);
+ arg_height->set_type(GLMessage::DataType::INT);
+ arg_height->add_intvalue(height);
+
+ // copy argument depth
+ GLMessage_DataType *arg_depth = glmsg.add_args();
+ arg_depth->set_isarray(false);
+ arg_depth->set_type(GLMessage::DataType::INT);
+ arg_depth->add_intvalue(depth);
+
+ // copy argument format
+ GLMessage_DataType *arg_format = glmsg.add_args();
+ arg_format->set_isarray(false);
+ arg_format->set_type(GLMessage::DataType::ENUM);
+ arg_format->add_intvalue((int)format);
+
+ // copy argument type
+ GLMessage_DataType *arg_type = glmsg.add_args();
+ arg_type->set_isarray(false);
+ arg_type->set_type(GLMessage::DataType::ENUM);
+ arg_type->add_intvalue((int)type);
+
+ // copy argument texels
+ GLMessage_DataType *arg_texels = glmsg.add_args();
+ arg_texels->set_isarray(false);
+ arg_texels->set_type(GLMessage::DataType::INT);
+ arg_texels->add_intvalue((int)texels);
+
+ // call function
+ glContext->hooks->gl.glExtGetTexSubImageQCOM(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, texels);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glExtGetBufferPointervQCOM(GLenum target, GLvoid **params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glExtGetBufferPointervQCOM);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glExtGetBufferPointervQCOM(target, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glExtGetShadersQCOM(GLuint *shaders, GLint maxShaders, GLint *numShaders) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glExtGetShadersQCOM);
+
+ // copy argument shaders
+ GLMessage_DataType *arg_shaders = glmsg.add_args();
+ arg_shaders->set_isarray(false);
+ arg_shaders->set_type(GLMessage::DataType::INT);
+ arg_shaders->add_intvalue((int)shaders);
+
+ // copy argument maxShaders
+ GLMessage_DataType *arg_maxShaders = glmsg.add_args();
+ arg_maxShaders->set_isarray(false);
+ arg_maxShaders->set_type(GLMessage::DataType::INT);
+ arg_maxShaders->add_intvalue(maxShaders);
+
+ // copy argument numShaders
+ GLMessage_DataType *arg_numShaders = glmsg.add_args();
+ arg_numShaders->set_isarray(false);
+ arg_numShaders->set_type(GLMessage::DataType::INT);
+ arg_numShaders->add_intvalue((int)numShaders);
+
+ // call function
+ glContext->hooks->gl.glExtGetShadersQCOM(shaders, maxShaders, numShaders);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glExtGetProgramsQCOM(GLuint *programs, GLint maxPrograms, GLint *numPrograms) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glExtGetProgramsQCOM);
+
+ // copy argument programs
+ GLMessage_DataType *arg_programs = glmsg.add_args();
+ arg_programs->set_isarray(false);
+ arg_programs->set_type(GLMessage::DataType::INT);
+ arg_programs->add_intvalue((int)programs);
+
+ // copy argument maxPrograms
+ GLMessage_DataType *arg_maxPrograms = glmsg.add_args();
+ arg_maxPrograms->set_isarray(false);
+ arg_maxPrograms->set_type(GLMessage::DataType::INT);
+ arg_maxPrograms->add_intvalue(maxPrograms);
+
+ // copy argument numPrograms
+ GLMessage_DataType *arg_numPrograms = glmsg.add_args();
+ arg_numPrograms->set_isarray(false);
+ arg_numPrograms->set_type(GLMessage::DataType::INT);
+ arg_numPrograms->add_intvalue((int)numPrograms);
+
+ // call function
+ glContext->hooks->gl.glExtGetProgramsQCOM(programs, maxPrograms, numPrograms);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+GLboolean GLTrace_glExtIsProgramBinaryQCOM(GLuint program) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glExtIsProgramBinaryQCOM);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // call function
+ GLboolean retValue = glContext->hooks->gl.glExtIsProgramBinaryQCOM(program);
+
+ // set return value
+ GLMessage_DataType *rt = glmsg.mutable_returnvalue();
+ rt->set_isarray(false);
+ rt->set_type(GLMessage::DataType::BOOL);
+ rt->add_boolvalue(retValue);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+
+ return retValue;
+}
+
+void GLTrace_glExtGetProgramBinarySourceQCOM(GLuint program, GLenum shadertype, GLchar *source, GLint *length) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glExtGetProgramBinarySourceQCOM);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // copy argument shadertype
+ GLMessage_DataType *arg_shadertype = glmsg.add_args();
+ arg_shadertype->set_isarray(false);
+ arg_shadertype->set_type(GLMessage::DataType::ENUM);
+ arg_shadertype->add_intvalue((int)shadertype);
+
+ // copy argument source
+ GLMessage_DataType *arg_source = glmsg.add_args();
+ arg_source->set_isarray(false);
+ arg_source->set_type(GLMessage::DataType::INT);
+ arg_source->add_intvalue((int)source);
+
+ // copy argument length
+ GLMessage_DataType *arg_length = glmsg.add_args();
+ arg_length->set_isarray(false);
+ arg_length->set_type(GLMessage::DataType::INT);
+ arg_length->add_intvalue((int)length);
+
+ // call function
+ glContext->hooks->gl.glExtGetProgramBinarySourceQCOM(program, shadertype, source, length);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glStartTilingQCOM(GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glStartTilingQCOM);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::INT);
+ arg_x->add_intvalue(x);
+
+ // copy argument y
+ GLMessage_DataType *arg_y = glmsg.add_args();
+ arg_y->set_isarray(false);
+ arg_y->set_type(GLMessage::DataType::INT);
+ arg_y->add_intvalue(y);
+
+ // copy argument width
+ GLMessage_DataType *arg_width = glmsg.add_args();
+ arg_width->set_isarray(false);
+ arg_width->set_type(GLMessage::DataType::INT);
+ arg_width->add_intvalue(width);
+
+ // copy argument height
+ GLMessage_DataType *arg_height = glmsg.add_args();
+ arg_height->set_isarray(false);
+ arg_height->set_type(GLMessage::DataType::INT);
+ arg_height->add_intvalue(height);
+
+ // copy argument preserveMask
+ GLMessage_DataType *arg_preserveMask = glmsg.add_args();
+ arg_preserveMask->set_isarray(false);
+ arg_preserveMask->set_type(GLMessage::DataType::INT);
+ arg_preserveMask->add_intvalue(preserveMask);
+
+ // call function
+ glContext->hooks->gl.glStartTilingQCOM(x, y, width, height, preserveMask);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glEndTilingQCOM(GLbitfield preserveMask) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glEndTilingQCOM);
+
+ // copy argument preserveMask
+ GLMessage_DataType *arg_preserveMask = glmsg.add_args();
+ arg_preserveMask->set_isarray(false);
+ arg_preserveMask->set_type(GLMessage::DataType::INT);
+ arg_preserveMask->add_intvalue(preserveMask);
+
+ // call function
+ glContext->hooks->gl.glEndTilingQCOM(preserveMask);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+
+// Definitions for GL1 APIs
+
+void GLTrace_glAlphaFunc(GLenum func, GLclampf ref) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glAlphaFunc);
+
+ // copy argument func
+ GLMessage_DataType *arg_func = glmsg.add_args();
+ arg_func->set_isarray(false);
+ arg_func->set_type(GLMessage::DataType::ENUM);
+ arg_func->add_intvalue((int)func);
+
+ // copy argument ref
+ GLMessage_DataType *arg_ref = glmsg.add_args();
+ arg_ref->set_isarray(false);
+ arg_ref->set_type(GLMessage::DataType::FLOAT);
+ arg_ref->add_floatvalue(ref);
+
+ // call function
+ glContext->hooks->gl.glAlphaFunc(func, ref);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glClipPlanef(GLenum plane, const GLfloat *equation) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glClipPlanef);
+
+ // copy argument plane
+ GLMessage_DataType *arg_plane = glmsg.add_args();
+ arg_plane->set_isarray(false);
+ arg_plane->set_type(GLMessage::DataType::ENUM);
+ arg_plane->add_intvalue((int)plane);
+
+ // copy argument equation
+ GLMessage_DataType *arg_equation = glmsg.add_args();
+ arg_equation->set_isarray(false);
+ arg_equation->set_type(GLMessage::DataType::INT);
+ arg_equation->add_intvalue((int)equation);
+
+ // call function
+ glContext->hooks->gl.glClipPlanef(plane, equation);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glColor4f);
+
+ // copy argument red
+ GLMessage_DataType *arg_red = glmsg.add_args();
+ arg_red->set_isarray(false);
+ arg_red->set_type(GLMessage::DataType::FLOAT);
+ arg_red->add_floatvalue(red);
+
+ // copy argument green
+ GLMessage_DataType *arg_green = glmsg.add_args();
+ arg_green->set_isarray(false);
+ arg_green->set_type(GLMessage::DataType::FLOAT);
+ arg_green->add_floatvalue(green);
+
+ // copy argument blue
+ GLMessage_DataType *arg_blue = glmsg.add_args();
+ arg_blue->set_isarray(false);
+ arg_blue->set_type(GLMessage::DataType::FLOAT);
+ arg_blue->add_floatvalue(blue);
+
+ // copy argument alpha
+ GLMessage_DataType *arg_alpha = glmsg.add_args();
+ arg_alpha->set_isarray(false);
+ arg_alpha->set_type(GLMessage::DataType::FLOAT);
+ arg_alpha->add_floatvalue(alpha);
+
+ // call function
+ glContext->hooks->gl.glColor4f(red, green, blue, alpha);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glFogf(GLenum pname, GLfloat param) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glFogf);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument param
+ GLMessage_DataType *arg_param = glmsg.add_args();
+ arg_param->set_isarray(false);
+ arg_param->set_type(GLMessage::DataType::FLOAT);
+ arg_param->add_floatvalue(param);
+
+ // call function
+ glContext->hooks->gl.glFogf(pname, param);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glFogfv(GLenum pname, const GLfloat *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glFogfv);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glFogfv(pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glFrustumf(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glFrustumf);
+
+ // copy argument left
+ GLMessage_DataType *arg_left = glmsg.add_args();
+ arg_left->set_isarray(false);
+ arg_left->set_type(GLMessage::DataType::FLOAT);
+ arg_left->add_floatvalue(left);
+
+ // copy argument right
+ GLMessage_DataType *arg_right = glmsg.add_args();
+ arg_right->set_isarray(false);
+ arg_right->set_type(GLMessage::DataType::FLOAT);
+ arg_right->add_floatvalue(right);
+
+ // copy argument bottom
+ GLMessage_DataType *arg_bottom = glmsg.add_args();
+ arg_bottom->set_isarray(false);
+ arg_bottom->set_type(GLMessage::DataType::FLOAT);
+ arg_bottom->add_floatvalue(bottom);
+
+ // copy argument top
+ GLMessage_DataType *arg_top = glmsg.add_args();
+ arg_top->set_isarray(false);
+ arg_top->set_type(GLMessage::DataType::FLOAT);
+ arg_top->add_floatvalue(top);
+
+ // copy argument zNear
+ GLMessage_DataType *arg_zNear = glmsg.add_args();
+ arg_zNear->set_isarray(false);
+ arg_zNear->set_type(GLMessage::DataType::FLOAT);
+ arg_zNear->add_floatvalue(zNear);
+
+ // copy argument zFar
+ GLMessage_DataType *arg_zFar = glmsg.add_args();
+ arg_zFar->set_isarray(false);
+ arg_zFar->set_type(GLMessage::DataType::FLOAT);
+ arg_zFar->add_floatvalue(zFar);
+
+ // call function
+ glContext->hooks->gl.glFrustumf(left, right, bottom, top, zNear, zFar);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetClipPlanef(GLenum pname, GLfloat eqn[4]) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetClipPlanef);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument eqn
+ GLMessage_DataType *arg_eqn = glmsg.add_args();
+ arg_eqn->set_isarray(false);
+ arg_eqn->set_type(GLMessage::DataType::INT);
+ arg_eqn->add_intvalue((int)eqn);
+
+ // call function
+ glContext->hooks->gl.glGetClipPlanef(pname, eqn);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetLightfv(GLenum light, GLenum pname, GLfloat *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetLightfv);
+
+ // copy argument light
+ GLMessage_DataType *arg_light = glmsg.add_args();
+ arg_light->set_isarray(false);
+ arg_light->set_type(GLMessage::DataType::ENUM);
+ arg_light->add_intvalue((int)light);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glGetLightfv(light, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetMaterialfv(GLenum face, GLenum pname, GLfloat *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetMaterialfv);
+
+ // copy argument face
+ GLMessage_DataType *arg_face = glmsg.add_args();
+ arg_face->set_isarray(false);
+ arg_face->set_type(GLMessage::DataType::ENUM);
+ arg_face->add_intvalue((int)face);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glGetMaterialfv(face, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetTexEnvfv(GLenum env, GLenum pname, GLfloat *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetTexEnvfv);
+
+ // copy argument env
+ GLMessage_DataType *arg_env = glmsg.add_args();
+ arg_env->set_isarray(false);
+ arg_env->set_type(GLMessage::DataType::ENUM);
+ arg_env->add_intvalue((int)env);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glGetTexEnvfv(env, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glLightModelf(GLenum pname, GLfloat param) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glLightModelf);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument param
+ GLMessage_DataType *arg_param = glmsg.add_args();
+ arg_param->set_isarray(false);
+ arg_param->set_type(GLMessage::DataType::FLOAT);
+ arg_param->add_floatvalue(param);
+
+ // call function
+ glContext->hooks->gl.glLightModelf(pname, param);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glLightModelfv(GLenum pname, const GLfloat *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glLightModelfv);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glLightModelfv(pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glLightf(GLenum light, GLenum pname, GLfloat param) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glLightf);
+
+ // copy argument light
+ GLMessage_DataType *arg_light = glmsg.add_args();
+ arg_light->set_isarray(false);
+ arg_light->set_type(GLMessage::DataType::ENUM);
+ arg_light->add_intvalue((int)light);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument param
+ GLMessage_DataType *arg_param = glmsg.add_args();
+ arg_param->set_isarray(false);
+ arg_param->set_type(GLMessage::DataType::FLOAT);
+ arg_param->add_floatvalue(param);
+
+ // call function
+ glContext->hooks->gl.glLightf(light, pname, param);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glLightfv(GLenum light, GLenum pname, const GLfloat *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glLightfv);
+
+ // copy argument light
+ GLMessage_DataType *arg_light = glmsg.add_args();
+ arg_light->set_isarray(false);
+ arg_light->set_type(GLMessage::DataType::ENUM);
+ arg_light->add_intvalue((int)light);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glLightfv(light, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glLoadMatrixf(const GLfloat *m) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glLoadMatrixf);
+
+ // copy argument m
+ GLMessage_DataType *arg_m = glmsg.add_args();
+ arg_m->set_isarray(false);
+ arg_m->set_type(GLMessage::DataType::INT);
+ arg_m->add_intvalue((int)m);
+
+ // call function
+ glContext->hooks->gl.glLoadMatrixf(m);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glMaterialf(GLenum face, GLenum pname, GLfloat param) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glMaterialf);
+
+ // copy argument face
+ GLMessage_DataType *arg_face = glmsg.add_args();
+ arg_face->set_isarray(false);
+ arg_face->set_type(GLMessage::DataType::ENUM);
+ arg_face->add_intvalue((int)face);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument param
+ GLMessage_DataType *arg_param = glmsg.add_args();
+ arg_param->set_isarray(false);
+ arg_param->set_type(GLMessage::DataType::FLOAT);
+ arg_param->add_floatvalue(param);
+
+ // call function
+ glContext->hooks->gl.glMaterialf(face, pname, param);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glMaterialfv(GLenum face, GLenum pname, const GLfloat *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glMaterialfv);
+
+ // copy argument face
+ GLMessage_DataType *arg_face = glmsg.add_args();
+ arg_face->set_isarray(false);
+ arg_face->set_type(GLMessage::DataType::ENUM);
+ arg_face->add_intvalue((int)face);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glMaterialfv(face, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glMultMatrixf(const GLfloat *m) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glMultMatrixf);
+
+ // copy argument m
+ GLMessage_DataType *arg_m = glmsg.add_args();
+ arg_m->set_isarray(false);
+ arg_m->set_type(GLMessage::DataType::INT);
+ arg_m->add_intvalue((int)m);
+
+ // call function
+ glContext->hooks->gl.glMultMatrixf(m);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glMultiTexCoord4f(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glMultiTexCoord4f);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument s
+ GLMessage_DataType *arg_s = glmsg.add_args();
+ arg_s->set_isarray(false);
+ arg_s->set_type(GLMessage::DataType::FLOAT);
+ arg_s->add_floatvalue(s);
+
+ // copy argument t
+ GLMessage_DataType *arg_t = glmsg.add_args();
+ arg_t->set_isarray(false);
+ arg_t->set_type(GLMessage::DataType::FLOAT);
+ arg_t->add_floatvalue(t);
+
+ // copy argument r
+ GLMessage_DataType *arg_r = glmsg.add_args();
+ arg_r->set_isarray(false);
+ arg_r->set_type(GLMessage::DataType::FLOAT);
+ arg_r->add_floatvalue(r);
+
+ // copy argument q
+ GLMessage_DataType *arg_q = glmsg.add_args();
+ arg_q->set_isarray(false);
+ arg_q->set_type(GLMessage::DataType::FLOAT);
+ arg_q->add_floatvalue(q);
+
+ // call function
+ glContext->hooks->gl.glMultiTexCoord4f(target, s, t, r, q);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glNormal3f);
+
+ // copy argument nx
+ GLMessage_DataType *arg_nx = glmsg.add_args();
+ arg_nx->set_isarray(false);
+ arg_nx->set_type(GLMessage::DataType::FLOAT);
+ arg_nx->add_floatvalue(nx);
+
+ // copy argument ny
+ GLMessage_DataType *arg_ny = glmsg.add_args();
+ arg_ny->set_isarray(false);
+ arg_ny->set_type(GLMessage::DataType::FLOAT);
+ arg_ny->add_floatvalue(ny);
+
+ // copy argument nz
+ GLMessage_DataType *arg_nz = glmsg.add_args();
+ arg_nz->set_isarray(false);
+ arg_nz->set_type(GLMessage::DataType::FLOAT);
+ arg_nz->add_floatvalue(nz);
+
+ // call function
+ glContext->hooks->gl.glNormal3f(nx, ny, nz);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glOrthof(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glOrthof);
+
+ // copy argument left
+ GLMessage_DataType *arg_left = glmsg.add_args();
+ arg_left->set_isarray(false);
+ arg_left->set_type(GLMessage::DataType::FLOAT);
+ arg_left->add_floatvalue(left);
+
+ // copy argument right
+ GLMessage_DataType *arg_right = glmsg.add_args();
+ arg_right->set_isarray(false);
+ arg_right->set_type(GLMessage::DataType::FLOAT);
+ arg_right->add_floatvalue(right);
+
+ // copy argument bottom
+ GLMessage_DataType *arg_bottom = glmsg.add_args();
+ arg_bottom->set_isarray(false);
+ arg_bottom->set_type(GLMessage::DataType::FLOAT);
+ arg_bottom->add_floatvalue(bottom);
+
+ // copy argument top
+ GLMessage_DataType *arg_top = glmsg.add_args();
+ arg_top->set_isarray(false);
+ arg_top->set_type(GLMessage::DataType::FLOAT);
+ arg_top->add_floatvalue(top);
+
+ // copy argument zNear
+ GLMessage_DataType *arg_zNear = glmsg.add_args();
+ arg_zNear->set_isarray(false);
+ arg_zNear->set_type(GLMessage::DataType::FLOAT);
+ arg_zNear->add_floatvalue(zNear);
+
+ // copy argument zFar
+ GLMessage_DataType *arg_zFar = glmsg.add_args();
+ arg_zFar->set_isarray(false);
+ arg_zFar->set_type(GLMessage::DataType::FLOAT);
+ arg_zFar->add_floatvalue(zFar);
+
+ // call function
+ glContext->hooks->gl.glOrthof(left, right, bottom, top, zNear, zFar);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glPointParameterf(GLenum pname, GLfloat param) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glPointParameterf);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument param
+ GLMessage_DataType *arg_param = glmsg.add_args();
+ arg_param->set_isarray(false);
+ arg_param->set_type(GLMessage::DataType::FLOAT);
+ arg_param->add_floatvalue(param);
+
+ // call function
+ glContext->hooks->gl.glPointParameterf(pname, param);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glPointParameterfv(GLenum pname, const GLfloat *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glPointParameterfv);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glPointParameterfv(pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glPointSize(GLfloat size) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glPointSize);
+
+ // copy argument size
+ GLMessage_DataType *arg_size = glmsg.add_args();
+ arg_size->set_isarray(false);
+ arg_size->set_type(GLMessage::DataType::FLOAT);
+ arg_size->add_floatvalue(size);
+
+ // call function
+ glContext->hooks->gl.glPointSize(size);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glRotatef);
+
+ // copy argument angle
+ GLMessage_DataType *arg_angle = glmsg.add_args();
+ arg_angle->set_isarray(false);
+ arg_angle->set_type(GLMessage::DataType::FLOAT);
+ arg_angle->add_floatvalue(angle);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::FLOAT);
+ arg_x->add_floatvalue(x);
+
+ // copy argument y
+ GLMessage_DataType *arg_y = glmsg.add_args();
+ arg_y->set_isarray(false);
+ arg_y->set_type(GLMessage::DataType::FLOAT);
+ arg_y->add_floatvalue(y);
+
+ // copy argument z
+ GLMessage_DataType *arg_z = glmsg.add_args();
+ arg_z->set_isarray(false);
+ arg_z->set_type(GLMessage::DataType::FLOAT);
+ arg_z->add_floatvalue(z);
+
+ // call function
+ glContext->hooks->gl.glRotatef(angle, x, y, z);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glScalef(GLfloat x, GLfloat y, GLfloat z) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glScalef);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::FLOAT);
+ arg_x->add_floatvalue(x);
+
+ // copy argument y
+ GLMessage_DataType *arg_y = glmsg.add_args();
+ arg_y->set_isarray(false);
+ arg_y->set_type(GLMessage::DataType::FLOAT);
+ arg_y->add_floatvalue(y);
+
+ // copy argument z
+ GLMessage_DataType *arg_z = glmsg.add_args();
+ arg_z->set_isarray(false);
+ arg_z->set_type(GLMessage::DataType::FLOAT);
+ arg_z->add_floatvalue(z);
+
+ // call function
+ glContext->hooks->gl.glScalef(x, y, z);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexEnvf(GLenum target, GLenum pname, GLfloat param) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glTexEnvf);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument param
+ GLMessage_DataType *arg_param = glmsg.add_args();
+ arg_param->set_isarray(false);
+ arg_param->set_type(GLMessage::DataType::FLOAT);
+ arg_param->add_floatvalue(param);
+
+ // call function
+ glContext->hooks->gl.glTexEnvf(target, pname, param);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexEnvfv(GLenum target, GLenum pname, const GLfloat *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glTexEnvfv);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glTexEnvfv(target, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTranslatef(GLfloat x, GLfloat y, GLfloat z) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glTranslatef);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::FLOAT);
+ arg_x->add_floatvalue(x);
+
+ // copy argument y
+ GLMessage_DataType *arg_y = glmsg.add_args();
+ arg_y->set_isarray(false);
+ arg_y->set_type(GLMessage::DataType::FLOAT);
+ arg_y->add_floatvalue(y);
+
+ // copy argument z
+ GLMessage_DataType *arg_z = glmsg.add_args();
+ arg_z->set_isarray(false);
+ arg_z->set_type(GLMessage::DataType::FLOAT);
+ arg_z->add_floatvalue(z);
+
+ // call function
+ glContext->hooks->gl.glTranslatef(x, y, z);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glAlphaFuncx(GLenum func, GLclampx ref) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glAlphaFuncx);
+
+ // copy argument func
+ GLMessage_DataType *arg_func = glmsg.add_args();
+ arg_func->set_isarray(false);
+ arg_func->set_type(GLMessage::DataType::ENUM);
+ arg_func->add_intvalue((int)func);
+
+ // copy argument ref
+ GLMessage_DataType *arg_ref = glmsg.add_args();
+ arg_ref->set_isarray(false);
+ arg_ref->set_type(GLMessage::DataType::INT);
+ arg_ref->add_intvalue(ref);
+
+ // call function
+ glContext->hooks->gl.glAlphaFuncx(func, ref);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glClearColorx(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glClearColorx);
+
+ // copy argument red
+ GLMessage_DataType *arg_red = glmsg.add_args();
+ arg_red->set_isarray(false);
+ arg_red->set_type(GLMessage::DataType::INT);
+ arg_red->add_intvalue(red);
+
+ // copy argument green
+ GLMessage_DataType *arg_green = glmsg.add_args();
+ arg_green->set_isarray(false);
+ arg_green->set_type(GLMessage::DataType::INT);
+ arg_green->add_intvalue(green);
+
+ // copy argument blue
+ GLMessage_DataType *arg_blue = glmsg.add_args();
+ arg_blue->set_isarray(false);
+ arg_blue->set_type(GLMessage::DataType::INT);
+ arg_blue->add_intvalue(blue);
+
+ // copy argument alpha
+ GLMessage_DataType *arg_alpha = glmsg.add_args();
+ arg_alpha->set_isarray(false);
+ arg_alpha->set_type(GLMessage::DataType::INT);
+ arg_alpha->add_intvalue(alpha);
+
+ // call function
+ glContext->hooks->gl.glClearColorx(red, green, blue, alpha);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glClearDepthx(GLclampx depth) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glClearDepthx);
+
+ // copy argument depth
+ GLMessage_DataType *arg_depth = glmsg.add_args();
+ arg_depth->set_isarray(false);
+ arg_depth->set_type(GLMessage::DataType::INT);
+ arg_depth->add_intvalue(depth);
+
+ // call function
+ glContext->hooks->gl.glClearDepthx(depth);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glClientActiveTexture(GLenum texture) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glClientActiveTexture);
+
+ // copy argument texture
+ GLMessage_DataType *arg_texture = glmsg.add_args();
+ arg_texture->set_isarray(false);
+ arg_texture->set_type(GLMessage::DataType::ENUM);
+ arg_texture->add_intvalue((int)texture);
+
+ // call function
+ glContext->hooks->gl.glClientActiveTexture(texture);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glClipPlanex(GLenum plane, const GLfixed *equation) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glClipPlanex);
+
+ // copy argument plane
+ GLMessage_DataType *arg_plane = glmsg.add_args();
+ arg_plane->set_isarray(false);
+ arg_plane->set_type(GLMessage::DataType::ENUM);
+ arg_plane->add_intvalue((int)plane);
+
+ // copy argument equation
+ GLMessage_DataType *arg_equation = glmsg.add_args();
+ arg_equation->set_isarray(false);
+ arg_equation->set_type(GLMessage::DataType::INT);
+ arg_equation->add_intvalue((int)equation);
+
+ // call function
+ glContext->hooks->gl.glClipPlanex(plane, equation);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glColor4ub);
+
+ // copy argument red
+ GLMessage_DataType *arg_red = glmsg.add_args();
+ arg_red->set_isarray(false);
+ arg_red->set_type(GLMessage::DataType::BYTE);
+ arg_red->add_intvalue((int)red);
+
+ // copy argument green
+ GLMessage_DataType *arg_green = glmsg.add_args();
+ arg_green->set_isarray(false);
+ arg_green->set_type(GLMessage::DataType::BYTE);
+ arg_green->add_intvalue((int)green);
+
+ // copy argument blue
+ GLMessage_DataType *arg_blue = glmsg.add_args();
+ arg_blue->set_isarray(false);
+ arg_blue->set_type(GLMessage::DataType::BYTE);
+ arg_blue->add_intvalue((int)blue);
+
+ // copy argument alpha
+ GLMessage_DataType *arg_alpha = glmsg.add_args();
+ arg_alpha->set_isarray(false);
+ arg_alpha->set_type(GLMessage::DataType::BYTE);
+ arg_alpha->add_intvalue((int)alpha);
+
+ // call function
+ glContext->hooks->gl.glColor4ub(red, green, blue, alpha);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glColor4x(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glColor4x);
+
+ // copy argument red
+ GLMessage_DataType *arg_red = glmsg.add_args();
+ arg_red->set_isarray(false);
+ arg_red->set_type(GLMessage::DataType::INT);
+ arg_red->add_intvalue(red);
+
+ // copy argument green
+ GLMessage_DataType *arg_green = glmsg.add_args();
+ arg_green->set_isarray(false);
+ arg_green->set_type(GLMessage::DataType::INT);
+ arg_green->add_intvalue(green);
+
+ // copy argument blue
+ GLMessage_DataType *arg_blue = glmsg.add_args();
+ arg_blue->set_isarray(false);
+ arg_blue->set_type(GLMessage::DataType::INT);
+ arg_blue->add_intvalue(blue);
+
+ // copy argument alpha
+ GLMessage_DataType *arg_alpha = glmsg.add_args();
+ arg_alpha->set_isarray(false);
+ arg_alpha->set_type(GLMessage::DataType::INT);
+ arg_alpha->add_intvalue(alpha);
+
+ // call function
+ glContext->hooks->gl.glColor4x(red, green, blue, alpha);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glColorPointer);
+
+ // copy argument size
+ GLMessage_DataType *arg_size = glmsg.add_args();
+ arg_size->set_isarray(false);
+ arg_size->set_type(GLMessage::DataType::INT);
+ arg_size->add_intvalue(size);
+
+ // copy argument type
+ GLMessage_DataType *arg_type = glmsg.add_args();
+ arg_type->set_isarray(false);
+ arg_type->set_type(GLMessage::DataType::ENUM);
+ arg_type->add_intvalue((int)type);
+
+ // copy argument stride
+ GLMessage_DataType *arg_stride = glmsg.add_args();
+ arg_stride->set_isarray(false);
+ arg_stride->set_type(GLMessage::DataType::INT);
+ arg_stride->add_intvalue(stride);
+
+ // copy argument pointer
+ GLMessage_DataType *arg_pointer = glmsg.add_args();
+ arg_pointer->set_isarray(false);
+ arg_pointer->set_type(GLMessage::DataType::INT);
+ arg_pointer->add_intvalue((int)pointer);
+
+ // call function
+ glContext->hooks->gl.glColorPointer(size, type, stride, pointer);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDepthRangex(GLclampx zNear, GLclampx zFar) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glDepthRangex);
+
+ // copy argument zNear
+ GLMessage_DataType *arg_zNear = glmsg.add_args();
+ arg_zNear->set_isarray(false);
+ arg_zNear->set_type(GLMessage::DataType::INT);
+ arg_zNear->add_intvalue(zNear);
+
+ // copy argument zFar
+ GLMessage_DataType *arg_zFar = glmsg.add_args();
+ arg_zFar->set_isarray(false);
+ arg_zFar->set_type(GLMessage::DataType::INT);
+ arg_zFar->add_intvalue(zFar);
+
+ // call function
+ glContext->hooks->gl.glDepthRangex(zNear, zFar);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDisableClientState(GLenum array) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glDisableClientState);
+
+ // copy argument array
+ GLMessage_DataType *arg_array = glmsg.add_args();
+ arg_array->set_isarray(false);
+ arg_array->set_type(GLMessage::DataType::ENUM);
+ arg_array->add_intvalue((int)array);
+
+ // call function
+ glContext->hooks->gl.glDisableClientState(array);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glEnableClientState(GLenum array) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glEnableClientState);
+
+ // copy argument array
+ GLMessage_DataType *arg_array = glmsg.add_args();
+ arg_array->set_isarray(false);
+ arg_array->set_type(GLMessage::DataType::ENUM);
+ arg_array->add_intvalue((int)array);
+
+ // call function
+ glContext->hooks->gl.glEnableClientState(array);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glFogx(GLenum pname, GLfixed param) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glFogx);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument param
+ GLMessage_DataType *arg_param = glmsg.add_args();
+ arg_param->set_isarray(false);
+ arg_param->set_type(GLMessage::DataType::INT);
+ arg_param->add_intvalue(param);
+
+ // call function
+ glContext->hooks->gl.glFogx(pname, param);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glFogxv(GLenum pname, const GLfixed *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glFogxv);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glFogxv(pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glFrustumx(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glFrustumx);
+
+ // copy argument left
+ GLMessage_DataType *arg_left = glmsg.add_args();
+ arg_left->set_isarray(false);
+ arg_left->set_type(GLMessage::DataType::INT);
+ arg_left->add_intvalue(left);
+
+ // copy argument right
+ GLMessage_DataType *arg_right = glmsg.add_args();
+ arg_right->set_isarray(false);
+ arg_right->set_type(GLMessage::DataType::INT);
+ arg_right->add_intvalue(right);
+
+ // copy argument bottom
+ GLMessage_DataType *arg_bottom = glmsg.add_args();
+ arg_bottom->set_isarray(false);
+ arg_bottom->set_type(GLMessage::DataType::INT);
+ arg_bottom->add_intvalue(bottom);
+
+ // copy argument top
+ GLMessage_DataType *arg_top = glmsg.add_args();
+ arg_top->set_isarray(false);
+ arg_top->set_type(GLMessage::DataType::INT);
+ arg_top->add_intvalue(top);
+
+ // copy argument zNear
+ GLMessage_DataType *arg_zNear = glmsg.add_args();
+ arg_zNear->set_isarray(false);
+ arg_zNear->set_type(GLMessage::DataType::INT);
+ arg_zNear->add_intvalue(zNear);
+
+ // copy argument zFar
+ GLMessage_DataType *arg_zFar = glmsg.add_args();
+ arg_zFar->set_isarray(false);
+ arg_zFar->set_type(GLMessage::DataType::INT);
+ arg_zFar->add_intvalue(zFar);
+
+ // call function
+ glContext->hooks->gl.glFrustumx(left, right, bottom, top, zNear, zFar);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetClipPlanex(GLenum pname, GLfixed eqn[4]) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetClipPlanex);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument eqn
+ GLMessage_DataType *arg_eqn = glmsg.add_args();
+ arg_eqn->set_isarray(false);
+ arg_eqn->set_type(GLMessage::DataType::INT);
+ arg_eqn->add_intvalue((int)eqn);
+
+ // call function
+ glContext->hooks->gl.glGetClipPlanex(pname, eqn);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetFixedv(GLenum pname, GLfixed *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetFixedv);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glGetFixedv(pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetLightxv(GLenum light, GLenum pname, GLfixed *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetLightxv);
+
+ // copy argument light
+ GLMessage_DataType *arg_light = glmsg.add_args();
+ arg_light->set_isarray(false);
+ arg_light->set_type(GLMessage::DataType::ENUM);
+ arg_light->add_intvalue((int)light);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glGetLightxv(light, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetMaterialxv(GLenum face, GLenum pname, GLfixed *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetMaterialxv);
+
+ // copy argument face
+ GLMessage_DataType *arg_face = glmsg.add_args();
+ arg_face->set_isarray(false);
+ arg_face->set_type(GLMessage::DataType::ENUM);
+ arg_face->add_intvalue((int)face);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glGetMaterialxv(face, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetPointerv(GLenum pname, GLvoid **params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetPointerv);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glGetPointerv(pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetTexEnviv(GLenum env, GLenum pname, GLint *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetTexEnviv);
+
+ // copy argument env
+ GLMessage_DataType *arg_env = glmsg.add_args();
+ arg_env->set_isarray(false);
+ arg_env->set_type(GLMessage::DataType::ENUM);
+ arg_env->add_intvalue((int)env);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glGetTexEnviv(env, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetTexEnvxv(GLenum env, GLenum pname, GLfixed *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetTexEnvxv);
+
+ // copy argument env
+ GLMessage_DataType *arg_env = glmsg.add_args();
+ arg_env->set_isarray(false);
+ arg_env->set_type(GLMessage::DataType::ENUM);
+ arg_env->add_intvalue((int)env);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glGetTexEnvxv(env, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetTexParameterxv(GLenum target, GLenum pname, GLfixed *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetTexParameterxv);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glGetTexParameterxv(target, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glLightModelx(GLenum pname, GLfixed param) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glLightModelx);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument param
+ GLMessage_DataType *arg_param = glmsg.add_args();
+ arg_param->set_isarray(false);
+ arg_param->set_type(GLMessage::DataType::INT);
+ arg_param->add_intvalue(param);
+
+ // call function
+ glContext->hooks->gl.glLightModelx(pname, param);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glLightModelxv(GLenum pname, const GLfixed *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glLightModelxv);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glLightModelxv(pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glLightx(GLenum light, GLenum pname, GLfixed param) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glLightx);
+
+ // copy argument light
+ GLMessage_DataType *arg_light = glmsg.add_args();
+ arg_light->set_isarray(false);
+ arg_light->set_type(GLMessage::DataType::ENUM);
+ arg_light->add_intvalue((int)light);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument param
+ GLMessage_DataType *arg_param = glmsg.add_args();
+ arg_param->set_isarray(false);
+ arg_param->set_type(GLMessage::DataType::INT);
+ arg_param->add_intvalue(param);
+
+ // call function
+ glContext->hooks->gl.glLightx(light, pname, param);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glLightxv(GLenum light, GLenum pname, const GLfixed *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glLightxv);
+
+ // copy argument light
+ GLMessage_DataType *arg_light = glmsg.add_args();
+ arg_light->set_isarray(false);
+ arg_light->set_type(GLMessage::DataType::ENUM);
+ arg_light->add_intvalue((int)light);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glLightxv(light, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glLineWidthx(GLfixed width) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glLineWidthx);
+
+ // copy argument width
+ GLMessage_DataType *arg_width = glmsg.add_args();
+ arg_width->set_isarray(false);
+ arg_width->set_type(GLMessage::DataType::INT);
+ arg_width->add_intvalue(width);
+
+ // call function
+ glContext->hooks->gl.glLineWidthx(width);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glLoadIdentity(void) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glLoadIdentity);
+
+ // call function
+ glContext->hooks->gl.glLoadIdentity();
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glLoadMatrixx(const GLfixed *m) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glLoadMatrixx);
+
+ // copy argument m
+ GLMessage_DataType *arg_m = glmsg.add_args();
+ arg_m->set_isarray(false);
+ arg_m->set_type(GLMessage::DataType::INT);
+ arg_m->add_intvalue((int)m);
+
+ // call function
+ glContext->hooks->gl.glLoadMatrixx(m);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glLogicOp(GLenum opcode) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glLogicOp);
+
+ // copy argument opcode
+ GLMessage_DataType *arg_opcode = glmsg.add_args();
+ arg_opcode->set_isarray(false);
+ arg_opcode->set_type(GLMessage::DataType::ENUM);
+ arg_opcode->add_intvalue((int)opcode);
+
+ // call function
+ glContext->hooks->gl.glLogicOp(opcode);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glMaterialx(GLenum face, GLenum pname, GLfixed param) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glMaterialx);
+
+ // copy argument face
+ GLMessage_DataType *arg_face = glmsg.add_args();
+ arg_face->set_isarray(false);
+ arg_face->set_type(GLMessage::DataType::ENUM);
+ arg_face->add_intvalue((int)face);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument param
+ GLMessage_DataType *arg_param = glmsg.add_args();
+ arg_param->set_isarray(false);
+ arg_param->set_type(GLMessage::DataType::INT);
+ arg_param->add_intvalue(param);
+
+ // call function
+ glContext->hooks->gl.glMaterialx(face, pname, param);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glMaterialxv(GLenum face, GLenum pname, const GLfixed *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glMaterialxv);
+
+ // copy argument face
+ GLMessage_DataType *arg_face = glmsg.add_args();
+ arg_face->set_isarray(false);
+ arg_face->set_type(GLMessage::DataType::ENUM);
+ arg_face->add_intvalue((int)face);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glMaterialxv(face, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glMatrixMode(GLenum mode) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glMatrixMode);
+
+ // copy argument mode
+ GLMessage_DataType *arg_mode = glmsg.add_args();
+ arg_mode->set_isarray(false);
+ arg_mode->set_type(GLMessage::DataType::ENUM);
+ arg_mode->add_intvalue((int)mode);
+
+ // call function
+ glContext->hooks->gl.glMatrixMode(mode);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glMultMatrixx(const GLfixed *m) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glMultMatrixx);
+
+ // copy argument m
+ GLMessage_DataType *arg_m = glmsg.add_args();
+ arg_m->set_isarray(false);
+ arg_m->set_type(GLMessage::DataType::INT);
+ arg_m->add_intvalue((int)m);
+
+ // call function
+ glContext->hooks->gl.glMultMatrixx(m);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glMultiTexCoord4x(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glMultiTexCoord4x);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument s
+ GLMessage_DataType *arg_s = glmsg.add_args();
+ arg_s->set_isarray(false);
+ arg_s->set_type(GLMessage::DataType::INT);
+ arg_s->add_intvalue(s);
+
+ // copy argument t
+ GLMessage_DataType *arg_t = glmsg.add_args();
+ arg_t->set_isarray(false);
+ arg_t->set_type(GLMessage::DataType::INT);
+ arg_t->add_intvalue(t);
+
+ // copy argument r
+ GLMessage_DataType *arg_r = glmsg.add_args();
+ arg_r->set_isarray(false);
+ arg_r->set_type(GLMessage::DataType::INT);
+ arg_r->add_intvalue(r);
+
+ // copy argument q
+ GLMessage_DataType *arg_q = glmsg.add_args();
+ arg_q->set_isarray(false);
+ arg_q->set_type(GLMessage::DataType::INT);
+ arg_q->add_intvalue(q);
+
+ // call function
+ glContext->hooks->gl.glMultiTexCoord4x(target, s, t, r, q);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glNormal3x(GLfixed nx, GLfixed ny, GLfixed nz) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glNormal3x);
+
+ // copy argument nx
+ GLMessage_DataType *arg_nx = glmsg.add_args();
+ arg_nx->set_isarray(false);
+ arg_nx->set_type(GLMessage::DataType::INT);
+ arg_nx->add_intvalue(nx);
+
+ // copy argument ny
+ GLMessage_DataType *arg_ny = glmsg.add_args();
+ arg_ny->set_isarray(false);
+ arg_ny->set_type(GLMessage::DataType::INT);
+ arg_ny->add_intvalue(ny);
+
+ // copy argument nz
+ GLMessage_DataType *arg_nz = glmsg.add_args();
+ arg_nz->set_isarray(false);
+ arg_nz->set_type(GLMessage::DataType::INT);
+ arg_nz->add_intvalue(nz);
+
+ // call function
+ glContext->hooks->gl.glNormal3x(nx, ny, nz);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glNormalPointer(GLenum type, GLsizei stride, const GLvoid *pointer) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glNormalPointer);
+
+ // copy argument type
+ GLMessage_DataType *arg_type = glmsg.add_args();
+ arg_type->set_isarray(false);
+ arg_type->set_type(GLMessage::DataType::ENUM);
+ arg_type->add_intvalue((int)type);
+
+ // copy argument stride
+ GLMessage_DataType *arg_stride = glmsg.add_args();
+ arg_stride->set_isarray(false);
+ arg_stride->set_type(GLMessage::DataType::INT);
+ arg_stride->add_intvalue(stride);
+
+ // copy argument pointer
+ GLMessage_DataType *arg_pointer = glmsg.add_args();
+ arg_pointer->set_isarray(false);
+ arg_pointer->set_type(GLMessage::DataType::INT);
+ arg_pointer->add_intvalue((int)pointer);
+
+ // call function
+ glContext->hooks->gl.glNormalPointer(type, stride, pointer);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glOrthox(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glOrthox);
+
+ // copy argument left
+ GLMessage_DataType *arg_left = glmsg.add_args();
+ arg_left->set_isarray(false);
+ arg_left->set_type(GLMessage::DataType::INT);
+ arg_left->add_intvalue(left);
+
+ // copy argument right
+ GLMessage_DataType *arg_right = glmsg.add_args();
+ arg_right->set_isarray(false);
+ arg_right->set_type(GLMessage::DataType::INT);
+ arg_right->add_intvalue(right);
+
+ // copy argument bottom
+ GLMessage_DataType *arg_bottom = glmsg.add_args();
+ arg_bottom->set_isarray(false);
+ arg_bottom->set_type(GLMessage::DataType::INT);
+ arg_bottom->add_intvalue(bottom);
+
+ // copy argument top
+ GLMessage_DataType *arg_top = glmsg.add_args();
+ arg_top->set_isarray(false);
+ arg_top->set_type(GLMessage::DataType::INT);
+ arg_top->add_intvalue(top);
+
+ // copy argument zNear
+ GLMessage_DataType *arg_zNear = glmsg.add_args();
+ arg_zNear->set_isarray(false);
+ arg_zNear->set_type(GLMessage::DataType::INT);
+ arg_zNear->add_intvalue(zNear);
+
+ // copy argument zFar
+ GLMessage_DataType *arg_zFar = glmsg.add_args();
+ arg_zFar->set_isarray(false);
+ arg_zFar->set_type(GLMessage::DataType::INT);
+ arg_zFar->add_intvalue(zFar);
+
+ // call function
+ glContext->hooks->gl.glOrthox(left, right, bottom, top, zNear, zFar);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glPointParameterx(GLenum pname, GLfixed param) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glPointParameterx);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument param
+ GLMessage_DataType *arg_param = glmsg.add_args();
+ arg_param->set_isarray(false);
+ arg_param->set_type(GLMessage::DataType::INT);
+ arg_param->add_intvalue(param);
+
+ // call function
+ glContext->hooks->gl.glPointParameterx(pname, param);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glPointParameterxv(GLenum pname, const GLfixed *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glPointParameterxv);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glPointParameterxv(pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glPointSizex(GLfixed size) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glPointSizex);
+
+ // copy argument size
+ GLMessage_DataType *arg_size = glmsg.add_args();
+ arg_size->set_isarray(false);
+ arg_size->set_type(GLMessage::DataType::INT);
+ arg_size->add_intvalue(size);
+
+ // call function
+ glContext->hooks->gl.glPointSizex(size);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glPolygonOffsetx(GLfixed factor, GLfixed units) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glPolygonOffsetx);
+
+ // copy argument factor
+ GLMessage_DataType *arg_factor = glmsg.add_args();
+ arg_factor->set_isarray(false);
+ arg_factor->set_type(GLMessage::DataType::INT);
+ arg_factor->add_intvalue(factor);
+
+ // copy argument units
+ GLMessage_DataType *arg_units = glmsg.add_args();
+ arg_units->set_isarray(false);
+ arg_units->set_type(GLMessage::DataType::INT);
+ arg_units->add_intvalue(units);
+
+ // call function
+ glContext->hooks->gl.glPolygonOffsetx(factor, units);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glPopMatrix(void) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glPopMatrix);
+
+ // call function
+ glContext->hooks->gl.glPopMatrix();
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glPushMatrix(void) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glPushMatrix);
+
+ // call function
+ glContext->hooks->gl.glPushMatrix();
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glRotatex(GLfixed angle, GLfixed x, GLfixed y, GLfixed z) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glRotatex);
+
+ // copy argument angle
+ GLMessage_DataType *arg_angle = glmsg.add_args();
+ arg_angle->set_isarray(false);
+ arg_angle->set_type(GLMessage::DataType::INT);
+ arg_angle->add_intvalue(angle);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::INT);
+ arg_x->add_intvalue(x);
+
+ // copy argument y
+ GLMessage_DataType *arg_y = glmsg.add_args();
+ arg_y->set_isarray(false);
+ arg_y->set_type(GLMessage::DataType::INT);
+ arg_y->add_intvalue(y);
+
+ // copy argument z
+ GLMessage_DataType *arg_z = glmsg.add_args();
+ arg_z->set_isarray(false);
+ arg_z->set_type(GLMessage::DataType::INT);
+ arg_z->add_intvalue(z);
+
+ // call function
+ glContext->hooks->gl.glRotatex(angle, x, y, z);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glSampleCoveragex(GLclampx value, GLboolean invert) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glSampleCoveragex);
+
+ // copy argument value
+ GLMessage_DataType *arg_value = glmsg.add_args();
+ arg_value->set_isarray(false);
+ arg_value->set_type(GLMessage::DataType::INT);
+ arg_value->add_intvalue(value);
+
+ // copy argument invert
+ GLMessage_DataType *arg_invert = glmsg.add_args();
+ arg_invert->set_isarray(false);
+ arg_invert->set_type(GLMessage::DataType::BOOL);
+ arg_invert->add_boolvalue(invert);
+
+ // call function
+ glContext->hooks->gl.glSampleCoveragex(value, invert);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glScalex(GLfixed x, GLfixed y, GLfixed z) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glScalex);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::INT);
+ arg_x->add_intvalue(x);
+
+ // copy argument y
+ GLMessage_DataType *arg_y = glmsg.add_args();
+ arg_y->set_isarray(false);
+ arg_y->set_type(GLMessage::DataType::INT);
+ arg_y->add_intvalue(y);
+
+ // copy argument z
+ GLMessage_DataType *arg_z = glmsg.add_args();
+ arg_z->set_isarray(false);
+ arg_z->set_type(GLMessage::DataType::INT);
+ arg_z->add_intvalue(z);
+
+ // call function
+ glContext->hooks->gl.glScalex(x, y, z);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glShadeModel(GLenum mode) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glShadeModel);
+
+ // copy argument mode
+ GLMessage_DataType *arg_mode = glmsg.add_args();
+ arg_mode->set_isarray(false);
+ arg_mode->set_type(GLMessage::DataType::ENUM);
+ arg_mode->add_intvalue((int)mode);
+
+ // call function
+ glContext->hooks->gl.glShadeModel(mode);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glTexCoordPointer);
+
+ // copy argument size
+ GLMessage_DataType *arg_size = glmsg.add_args();
+ arg_size->set_isarray(false);
+ arg_size->set_type(GLMessage::DataType::INT);
+ arg_size->add_intvalue(size);
+
+ // copy argument type
+ GLMessage_DataType *arg_type = glmsg.add_args();
+ arg_type->set_isarray(false);
+ arg_type->set_type(GLMessage::DataType::ENUM);
+ arg_type->add_intvalue((int)type);
+
+ // copy argument stride
+ GLMessage_DataType *arg_stride = glmsg.add_args();
+ arg_stride->set_isarray(false);
+ arg_stride->set_type(GLMessage::DataType::INT);
+ arg_stride->add_intvalue(stride);
+
+ // copy argument pointer
+ GLMessage_DataType *arg_pointer = glmsg.add_args();
+ arg_pointer->set_isarray(false);
+ arg_pointer->set_type(GLMessage::DataType::INT);
+ arg_pointer->add_intvalue((int)pointer);
+
+ // call function
+ glContext->hooks->gl.glTexCoordPointer(size, type, stride, pointer);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexEnvi(GLenum target, GLenum pname, GLint param) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glTexEnvi);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument param
+ GLMessage_DataType *arg_param = glmsg.add_args();
+ arg_param->set_isarray(false);
+ arg_param->set_type(GLMessage::DataType::INT);
+ arg_param->add_intvalue(param);
+
+ // call function
+ glContext->hooks->gl.glTexEnvi(target, pname, param);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexEnvx(GLenum target, GLenum pname, GLfixed param) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glTexEnvx);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument param
+ GLMessage_DataType *arg_param = glmsg.add_args();
+ arg_param->set_isarray(false);
+ arg_param->set_type(GLMessage::DataType::INT);
+ arg_param->add_intvalue(param);
+
+ // call function
+ glContext->hooks->gl.glTexEnvx(target, pname, param);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexEnviv(GLenum target, GLenum pname, const GLint *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glTexEnviv);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glTexEnviv(target, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexEnvxv(GLenum target, GLenum pname, const GLfixed *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glTexEnvxv);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glTexEnvxv(target, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexParameterx(GLenum target, GLenum pname, GLfixed param) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glTexParameterx);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument param
+ GLMessage_DataType *arg_param = glmsg.add_args();
+ arg_param->set_isarray(false);
+ arg_param->set_type(GLMessage::DataType::INT);
+ arg_param->add_intvalue(param);
+
+ // call function
+ glContext->hooks->gl.glTexParameterx(target, pname, param);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexParameterxv(GLenum target, GLenum pname, const GLfixed *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glTexParameterxv);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glTexParameterxv(target, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTranslatex(GLfixed x, GLfixed y, GLfixed z) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glTranslatex);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::INT);
+ arg_x->add_intvalue(x);
+
+ // copy argument y
+ GLMessage_DataType *arg_y = glmsg.add_args();
+ arg_y->set_isarray(false);
+ arg_y->set_type(GLMessage::DataType::INT);
+ arg_y->add_intvalue(y);
+
+ // copy argument z
+ GLMessage_DataType *arg_z = glmsg.add_args();
+ arg_z->set_isarray(false);
+ arg_z->set_type(GLMessage::DataType::INT);
+ arg_z->add_intvalue(z);
+
+ // call function
+ glContext->hooks->gl.glTranslatex(x, y, z);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glVertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glVertexPointer);
+
+ // copy argument size
+ GLMessage_DataType *arg_size = glmsg.add_args();
+ arg_size->set_isarray(false);
+ arg_size->set_type(GLMessage::DataType::INT);
+ arg_size->add_intvalue(size);
+
+ // copy argument type
+ GLMessage_DataType *arg_type = glmsg.add_args();
+ arg_type->set_isarray(false);
+ arg_type->set_type(GLMessage::DataType::ENUM);
+ arg_type->add_intvalue((int)type);
+
+ // copy argument stride
+ GLMessage_DataType *arg_stride = glmsg.add_args();
+ arg_stride->set_isarray(false);
+ arg_stride->set_type(GLMessage::DataType::INT);
+ arg_stride->add_intvalue(stride);
+
+ // copy argument pointer
+ GLMessage_DataType *arg_pointer = glmsg.add_args();
+ arg_pointer->set_isarray(false);
+ arg_pointer->set_type(GLMessage::DataType::INT);
+ arg_pointer->add_intvalue((int)pointer);
+
+ // call function
+ glContext->hooks->gl.glVertexPointer(size, type, stride, pointer);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glPointSizePointerOES(GLenum type, GLsizei stride, const GLvoid *pointer) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glPointSizePointerOES);
+
+ // copy argument type
+ GLMessage_DataType *arg_type = glmsg.add_args();
+ arg_type->set_isarray(false);
+ arg_type->set_type(GLMessage::DataType::ENUM);
+ arg_type->add_intvalue((int)type);
+
+ // copy argument stride
+ GLMessage_DataType *arg_stride = glmsg.add_args();
+ arg_stride->set_isarray(false);
+ arg_stride->set_type(GLMessage::DataType::INT);
+ arg_stride->add_intvalue(stride);
+
+ // copy argument pointer
+ GLMessage_DataType *arg_pointer = glmsg.add_args();
+ arg_pointer->set_isarray(false);
+ arg_pointer->set_type(GLMessage::DataType::INT);
+ arg_pointer->add_intvalue((int)pointer);
+
+ // call function
+ glContext->hooks->gl.glPointSizePointerOES(type, stride, pointer);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+
+// Definitions for GL1Ext APIs
+
+void GLTrace_glBlendEquationSeparateOES(GLenum modeRGB, GLenum modeAlpha) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glBlendEquationSeparateOES);
+
+ // copy argument modeRGB
+ GLMessage_DataType *arg_modeRGB = glmsg.add_args();
+ arg_modeRGB->set_isarray(false);
+ arg_modeRGB->set_type(GLMessage::DataType::ENUM);
+ arg_modeRGB->add_intvalue((int)modeRGB);
+
+ // copy argument modeAlpha
+ GLMessage_DataType *arg_modeAlpha = glmsg.add_args();
+ arg_modeAlpha->set_isarray(false);
+ arg_modeAlpha->set_type(GLMessage::DataType::ENUM);
+ arg_modeAlpha->add_intvalue((int)modeAlpha);
+
+ // call function
+ glContext->hooks->gl.glBlendEquationSeparateOES(modeRGB, modeAlpha);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glBlendFuncSeparateOES(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glBlendFuncSeparateOES);
+
+ // copy argument srcRGB
+ GLMessage_DataType *arg_srcRGB = glmsg.add_args();
+ arg_srcRGB->set_isarray(false);
+ arg_srcRGB->set_type(GLMessage::DataType::ENUM);
+ arg_srcRGB->add_intvalue((int)srcRGB);
+
+ // copy argument dstRGB
+ GLMessage_DataType *arg_dstRGB = glmsg.add_args();
+ arg_dstRGB->set_isarray(false);
+ arg_dstRGB->set_type(GLMessage::DataType::ENUM);
+ arg_dstRGB->add_intvalue((int)dstRGB);
+
+ // copy argument srcAlpha
+ GLMessage_DataType *arg_srcAlpha = glmsg.add_args();
+ arg_srcAlpha->set_isarray(false);
+ arg_srcAlpha->set_type(GLMessage::DataType::ENUM);
+ arg_srcAlpha->add_intvalue((int)srcAlpha);
+
+ // copy argument dstAlpha
+ GLMessage_DataType *arg_dstAlpha = glmsg.add_args();
+ arg_dstAlpha->set_isarray(false);
+ arg_dstAlpha->set_type(GLMessage::DataType::ENUM);
+ arg_dstAlpha->add_intvalue((int)dstAlpha);
+
+ // call function
+ glContext->hooks->gl.glBlendFuncSeparateOES(srcRGB, dstRGB, srcAlpha, dstAlpha);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glBlendEquationOES(GLenum mode) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glBlendEquationOES);
+
+ // copy argument mode
+ GLMessage_DataType *arg_mode = glmsg.add_args();
+ arg_mode->set_isarray(false);
+ arg_mode->set_type(GLMessage::DataType::ENUM);
+ arg_mode->add_intvalue((int)mode);
+
+ // call function
+ glContext->hooks->gl.glBlendEquationOES(mode);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDrawTexsOES(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glDrawTexsOES);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::INT);
+ arg_x->add_intvalue(x);
+
+ // copy argument y
+ GLMessage_DataType *arg_y = glmsg.add_args();
+ arg_y->set_isarray(false);
+ arg_y->set_type(GLMessage::DataType::INT);
+ arg_y->add_intvalue(y);
+
+ // copy argument z
+ GLMessage_DataType *arg_z = glmsg.add_args();
+ arg_z->set_isarray(false);
+ arg_z->set_type(GLMessage::DataType::INT);
+ arg_z->add_intvalue(z);
+
+ // copy argument width
+ GLMessage_DataType *arg_width = glmsg.add_args();
+ arg_width->set_isarray(false);
+ arg_width->set_type(GLMessage::DataType::INT);
+ arg_width->add_intvalue(width);
+
+ // copy argument height
+ GLMessage_DataType *arg_height = glmsg.add_args();
+ arg_height->set_isarray(false);
+ arg_height->set_type(GLMessage::DataType::INT);
+ arg_height->add_intvalue(height);
+
+ // call function
+ glContext->hooks->gl.glDrawTexsOES(x, y, z, width, height);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDrawTexiOES(GLint x, GLint y, GLint z, GLint width, GLint height) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glDrawTexiOES);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::INT);
+ arg_x->add_intvalue(x);
+
+ // copy argument y
+ GLMessage_DataType *arg_y = glmsg.add_args();
+ arg_y->set_isarray(false);
+ arg_y->set_type(GLMessage::DataType::INT);
+ arg_y->add_intvalue(y);
+
+ // copy argument z
+ GLMessage_DataType *arg_z = glmsg.add_args();
+ arg_z->set_isarray(false);
+ arg_z->set_type(GLMessage::DataType::INT);
+ arg_z->add_intvalue(z);
+
+ // copy argument width
+ GLMessage_DataType *arg_width = glmsg.add_args();
+ arg_width->set_isarray(false);
+ arg_width->set_type(GLMessage::DataType::INT);
+ arg_width->add_intvalue(width);
+
+ // copy argument height
+ GLMessage_DataType *arg_height = glmsg.add_args();
+ arg_height->set_isarray(false);
+ arg_height->set_type(GLMessage::DataType::INT);
+ arg_height->add_intvalue(height);
+
+ // call function
+ glContext->hooks->gl.glDrawTexiOES(x, y, z, width, height);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDrawTexxOES(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glDrawTexxOES);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::INT);
+ arg_x->add_intvalue(x);
+
+ // copy argument y
+ GLMessage_DataType *arg_y = glmsg.add_args();
+ arg_y->set_isarray(false);
+ arg_y->set_type(GLMessage::DataType::INT);
+ arg_y->add_intvalue(y);
+
+ // copy argument z
+ GLMessage_DataType *arg_z = glmsg.add_args();
+ arg_z->set_isarray(false);
+ arg_z->set_type(GLMessage::DataType::INT);
+ arg_z->add_intvalue(z);
+
+ // copy argument width
+ GLMessage_DataType *arg_width = glmsg.add_args();
+ arg_width->set_isarray(false);
+ arg_width->set_type(GLMessage::DataType::INT);
+ arg_width->add_intvalue(width);
+
+ // copy argument height
+ GLMessage_DataType *arg_height = glmsg.add_args();
+ arg_height->set_isarray(false);
+ arg_height->set_type(GLMessage::DataType::INT);
+ arg_height->add_intvalue(height);
+
+ // call function
+ glContext->hooks->gl.glDrawTexxOES(x, y, z, width, height);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDrawTexsvOES(const GLshort *coords) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glDrawTexsvOES);
+
+ // copy argument coords
+ GLMessage_DataType *arg_coords = glmsg.add_args();
+ arg_coords->set_isarray(false);
+ arg_coords->set_type(GLMessage::DataType::INT);
+ arg_coords->add_intvalue((int)coords);
+
+ // call function
+ glContext->hooks->gl.glDrawTexsvOES(coords);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDrawTexivOES(const GLint *coords) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glDrawTexivOES);
+
+ // copy argument coords
+ GLMessage_DataType *arg_coords = glmsg.add_args();
+ arg_coords->set_isarray(false);
+ arg_coords->set_type(GLMessage::DataType::INT);
+ arg_coords->add_intvalue((int)coords);
+
+ // call function
+ glContext->hooks->gl.glDrawTexivOES(coords);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDrawTexxvOES(const GLfixed *coords) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glDrawTexxvOES);
+
+ // copy argument coords
+ GLMessage_DataType *arg_coords = glmsg.add_args();
+ arg_coords->set_isarray(false);
+ arg_coords->set_type(GLMessage::DataType::INT);
+ arg_coords->add_intvalue((int)coords);
+
+ // call function
+ glContext->hooks->gl.glDrawTexxvOES(coords);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDrawTexfOES(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glDrawTexfOES);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::FLOAT);
+ arg_x->add_floatvalue(x);
+
+ // copy argument y
+ GLMessage_DataType *arg_y = glmsg.add_args();
+ arg_y->set_isarray(false);
+ arg_y->set_type(GLMessage::DataType::FLOAT);
+ arg_y->add_floatvalue(y);
+
+ // copy argument z
+ GLMessage_DataType *arg_z = glmsg.add_args();
+ arg_z->set_isarray(false);
+ arg_z->set_type(GLMessage::DataType::FLOAT);
+ arg_z->add_floatvalue(z);
+
+ // copy argument width
+ GLMessage_DataType *arg_width = glmsg.add_args();
+ arg_width->set_isarray(false);
+ arg_width->set_type(GLMessage::DataType::FLOAT);
+ arg_width->add_floatvalue(width);
+
+ // copy argument height
+ GLMessage_DataType *arg_height = glmsg.add_args();
+ arg_height->set_isarray(false);
+ arg_height->set_type(GLMessage::DataType::FLOAT);
+ arg_height->add_floatvalue(height);
+
+ // call function
+ glContext->hooks->gl.glDrawTexfOES(x, y, z, width, height);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDrawTexfvOES(const GLfloat *coords) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glDrawTexfvOES);
+
+ // copy argument coords
+ GLMessage_DataType *arg_coords = glmsg.add_args();
+ arg_coords->set_isarray(false);
+ arg_coords->set_type(GLMessage::DataType::INT);
+ arg_coords->add_intvalue((int)coords);
+
+ // call function
+ glContext->hooks->gl.glDrawTexfvOES(coords);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glAlphaFuncxOES(GLenum func, GLclampx ref) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glAlphaFuncxOES);
+
+ // copy argument func
+ GLMessage_DataType *arg_func = glmsg.add_args();
+ arg_func->set_isarray(false);
+ arg_func->set_type(GLMessage::DataType::ENUM);
+ arg_func->add_intvalue((int)func);
+
+ // copy argument ref
+ GLMessage_DataType *arg_ref = glmsg.add_args();
+ arg_ref->set_isarray(false);
+ arg_ref->set_type(GLMessage::DataType::INT);
+ arg_ref->add_intvalue(ref);
+
+ // call function
+ glContext->hooks->gl.glAlphaFuncxOES(func, ref);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glClearColorxOES(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glClearColorxOES);
+
+ // copy argument red
+ GLMessage_DataType *arg_red = glmsg.add_args();
+ arg_red->set_isarray(false);
+ arg_red->set_type(GLMessage::DataType::INT);
+ arg_red->add_intvalue(red);
+
+ // copy argument green
+ GLMessage_DataType *arg_green = glmsg.add_args();
+ arg_green->set_isarray(false);
+ arg_green->set_type(GLMessage::DataType::INT);
+ arg_green->add_intvalue(green);
+
+ // copy argument blue
+ GLMessage_DataType *arg_blue = glmsg.add_args();
+ arg_blue->set_isarray(false);
+ arg_blue->set_type(GLMessage::DataType::INT);
+ arg_blue->add_intvalue(blue);
+
+ // copy argument alpha
+ GLMessage_DataType *arg_alpha = glmsg.add_args();
+ arg_alpha->set_isarray(false);
+ arg_alpha->set_type(GLMessage::DataType::INT);
+ arg_alpha->add_intvalue(alpha);
+
+ // call function
+ glContext->hooks->gl.glClearColorxOES(red, green, blue, alpha);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glClearDepthxOES(GLclampx depth) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glClearDepthxOES);
+
+ // copy argument depth
+ GLMessage_DataType *arg_depth = glmsg.add_args();
+ arg_depth->set_isarray(false);
+ arg_depth->set_type(GLMessage::DataType::INT);
+ arg_depth->add_intvalue(depth);
+
+ // call function
+ glContext->hooks->gl.glClearDepthxOES(depth);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glClipPlanexOES(GLenum plane, const GLfixed *equation) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glClipPlanexOES);
+
+ // copy argument plane
+ GLMessage_DataType *arg_plane = glmsg.add_args();
+ arg_plane->set_isarray(false);
+ arg_plane->set_type(GLMessage::DataType::ENUM);
+ arg_plane->add_intvalue((int)plane);
+
+ // copy argument equation
+ GLMessage_DataType *arg_equation = glmsg.add_args();
+ arg_equation->set_isarray(false);
+ arg_equation->set_type(GLMessage::DataType::INT);
+ arg_equation->add_intvalue((int)equation);
+
+ // call function
+ glContext->hooks->gl.glClipPlanexOES(plane, equation);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glColor4xOES(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glColor4xOES);
+
+ // copy argument red
+ GLMessage_DataType *arg_red = glmsg.add_args();
+ arg_red->set_isarray(false);
+ arg_red->set_type(GLMessage::DataType::INT);
+ arg_red->add_intvalue(red);
+
+ // copy argument green
+ GLMessage_DataType *arg_green = glmsg.add_args();
+ arg_green->set_isarray(false);
+ arg_green->set_type(GLMessage::DataType::INT);
+ arg_green->add_intvalue(green);
+
+ // copy argument blue
+ GLMessage_DataType *arg_blue = glmsg.add_args();
+ arg_blue->set_isarray(false);
+ arg_blue->set_type(GLMessage::DataType::INT);
+ arg_blue->add_intvalue(blue);
+
+ // copy argument alpha
+ GLMessage_DataType *arg_alpha = glmsg.add_args();
+ arg_alpha->set_isarray(false);
+ arg_alpha->set_type(GLMessage::DataType::INT);
+ arg_alpha->add_intvalue(alpha);
+
+ // call function
+ glContext->hooks->gl.glColor4xOES(red, green, blue, alpha);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDepthRangexOES(GLclampx zNear, GLclampx zFar) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glDepthRangexOES);
+
+ // copy argument zNear
+ GLMessage_DataType *arg_zNear = glmsg.add_args();
+ arg_zNear->set_isarray(false);
+ arg_zNear->set_type(GLMessage::DataType::INT);
+ arg_zNear->add_intvalue(zNear);
+
+ // copy argument zFar
+ GLMessage_DataType *arg_zFar = glmsg.add_args();
+ arg_zFar->set_isarray(false);
+ arg_zFar->set_type(GLMessage::DataType::INT);
+ arg_zFar->add_intvalue(zFar);
+
+ // call function
+ glContext->hooks->gl.glDepthRangexOES(zNear, zFar);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glFogxOES(GLenum pname, GLfixed param) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glFogxOES);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument param
+ GLMessage_DataType *arg_param = glmsg.add_args();
+ arg_param->set_isarray(false);
+ arg_param->set_type(GLMessage::DataType::INT);
+ arg_param->add_intvalue(param);
+
+ // call function
+ glContext->hooks->gl.glFogxOES(pname, param);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glFogxvOES(GLenum pname, const GLfixed *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glFogxvOES);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glFogxvOES(pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glFrustumxOES(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glFrustumxOES);
+
+ // copy argument left
+ GLMessage_DataType *arg_left = glmsg.add_args();
+ arg_left->set_isarray(false);
+ arg_left->set_type(GLMessage::DataType::INT);
+ arg_left->add_intvalue(left);
+
+ // copy argument right
+ GLMessage_DataType *arg_right = glmsg.add_args();
+ arg_right->set_isarray(false);
+ arg_right->set_type(GLMessage::DataType::INT);
+ arg_right->add_intvalue(right);
+
+ // copy argument bottom
+ GLMessage_DataType *arg_bottom = glmsg.add_args();
+ arg_bottom->set_isarray(false);
+ arg_bottom->set_type(GLMessage::DataType::INT);
+ arg_bottom->add_intvalue(bottom);
+
+ // copy argument top
+ GLMessage_DataType *arg_top = glmsg.add_args();
+ arg_top->set_isarray(false);
+ arg_top->set_type(GLMessage::DataType::INT);
+ arg_top->add_intvalue(top);
+
+ // copy argument zNear
+ GLMessage_DataType *arg_zNear = glmsg.add_args();
+ arg_zNear->set_isarray(false);
+ arg_zNear->set_type(GLMessage::DataType::INT);
+ arg_zNear->add_intvalue(zNear);
+
+ // copy argument zFar
+ GLMessage_DataType *arg_zFar = glmsg.add_args();
+ arg_zFar->set_isarray(false);
+ arg_zFar->set_type(GLMessage::DataType::INT);
+ arg_zFar->add_intvalue(zFar);
+
+ // call function
+ glContext->hooks->gl.glFrustumxOES(left, right, bottom, top, zNear, zFar);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetClipPlanexOES(GLenum pname, GLfixed eqn[4]) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetClipPlanexOES);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument eqn
+ GLMessage_DataType *arg_eqn = glmsg.add_args();
+ arg_eqn->set_isarray(false);
+ arg_eqn->set_type(GLMessage::DataType::INT);
+ arg_eqn->add_intvalue((int)eqn);
+
+ // call function
+ glContext->hooks->gl.glGetClipPlanexOES(pname, eqn);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetFixedvOES(GLenum pname, GLfixed *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetFixedvOES);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glGetFixedvOES(pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetLightxvOES(GLenum light, GLenum pname, GLfixed *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetLightxvOES);
+
+ // copy argument light
+ GLMessage_DataType *arg_light = glmsg.add_args();
+ arg_light->set_isarray(false);
+ arg_light->set_type(GLMessage::DataType::ENUM);
+ arg_light->add_intvalue((int)light);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glGetLightxvOES(light, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetMaterialxvOES(GLenum face, GLenum pname, GLfixed *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetMaterialxvOES);
+
+ // copy argument face
+ GLMessage_DataType *arg_face = glmsg.add_args();
+ arg_face->set_isarray(false);
+ arg_face->set_type(GLMessage::DataType::ENUM);
+ arg_face->add_intvalue((int)face);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glGetMaterialxvOES(face, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetTexEnvxvOES(GLenum env, GLenum pname, GLfixed *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetTexEnvxvOES);
+
+ // copy argument env
+ GLMessage_DataType *arg_env = glmsg.add_args();
+ arg_env->set_isarray(false);
+ arg_env->set_type(GLMessage::DataType::ENUM);
+ arg_env->add_intvalue((int)env);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glGetTexEnvxvOES(env, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetTexParameterxvOES(GLenum target, GLenum pname, GLfixed *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetTexParameterxvOES);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glGetTexParameterxvOES(target, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glLightModelxOES(GLenum pname, GLfixed param) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glLightModelxOES);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument param
+ GLMessage_DataType *arg_param = glmsg.add_args();
+ arg_param->set_isarray(false);
+ arg_param->set_type(GLMessage::DataType::INT);
+ arg_param->add_intvalue(param);
+
+ // call function
+ glContext->hooks->gl.glLightModelxOES(pname, param);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glLightModelxvOES(GLenum pname, const GLfixed *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glLightModelxvOES);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glLightModelxvOES(pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glLightxOES(GLenum light, GLenum pname, GLfixed param) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glLightxOES);
+
+ // copy argument light
+ GLMessage_DataType *arg_light = glmsg.add_args();
+ arg_light->set_isarray(false);
+ arg_light->set_type(GLMessage::DataType::ENUM);
+ arg_light->add_intvalue((int)light);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument param
+ GLMessage_DataType *arg_param = glmsg.add_args();
+ arg_param->set_isarray(false);
+ arg_param->set_type(GLMessage::DataType::INT);
+ arg_param->add_intvalue(param);
+
+ // call function
+ glContext->hooks->gl.glLightxOES(light, pname, param);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glLightxvOES(GLenum light, GLenum pname, const GLfixed *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glLightxvOES);
+
+ // copy argument light
+ GLMessage_DataType *arg_light = glmsg.add_args();
+ arg_light->set_isarray(false);
+ arg_light->set_type(GLMessage::DataType::ENUM);
+ arg_light->add_intvalue((int)light);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glLightxvOES(light, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glLineWidthxOES(GLfixed width) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glLineWidthxOES);
+
+ // copy argument width
+ GLMessage_DataType *arg_width = glmsg.add_args();
+ arg_width->set_isarray(false);
+ arg_width->set_type(GLMessage::DataType::INT);
+ arg_width->add_intvalue(width);
+
+ // call function
+ glContext->hooks->gl.glLineWidthxOES(width);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glLoadMatrixxOES(const GLfixed *m) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glLoadMatrixxOES);
+
+ // copy argument m
+ GLMessage_DataType *arg_m = glmsg.add_args();
+ arg_m->set_isarray(false);
+ arg_m->set_type(GLMessage::DataType::INT);
+ arg_m->add_intvalue((int)m);
+
+ // call function
+ glContext->hooks->gl.glLoadMatrixxOES(m);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glMaterialxOES(GLenum face, GLenum pname, GLfixed param) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glMaterialxOES);
+
+ // copy argument face
+ GLMessage_DataType *arg_face = glmsg.add_args();
+ arg_face->set_isarray(false);
+ arg_face->set_type(GLMessage::DataType::ENUM);
+ arg_face->add_intvalue((int)face);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument param
+ GLMessage_DataType *arg_param = glmsg.add_args();
+ arg_param->set_isarray(false);
+ arg_param->set_type(GLMessage::DataType::INT);
+ arg_param->add_intvalue(param);
+
+ // call function
+ glContext->hooks->gl.glMaterialxOES(face, pname, param);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glMaterialxvOES(GLenum face, GLenum pname, const GLfixed *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glMaterialxvOES);
+
+ // copy argument face
+ GLMessage_DataType *arg_face = glmsg.add_args();
+ arg_face->set_isarray(false);
+ arg_face->set_type(GLMessage::DataType::ENUM);
+ arg_face->add_intvalue((int)face);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glMaterialxvOES(face, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glMultMatrixxOES(const GLfixed *m) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glMultMatrixxOES);
+
+ // copy argument m
+ GLMessage_DataType *arg_m = glmsg.add_args();
+ arg_m->set_isarray(false);
+ arg_m->set_type(GLMessage::DataType::INT);
+ arg_m->add_intvalue((int)m);
+
+ // call function
+ glContext->hooks->gl.glMultMatrixxOES(m);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glMultiTexCoord4xOES(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glMultiTexCoord4xOES);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument s
+ GLMessage_DataType *arg_s = glmsg.add_args();
+ arg_s->set_isarray(false);
+ arg_s->set_type(GLMessage::DataType::INT);
+ arg_s->add_intvalue(s);
+
+ // copy argument t
+ GLMessage_DataType *arg_t = glmsg.add_args();
+ arg_t->set_isarray(false);
+ arg_t->set_type(GLMessage::DataType::INT);
+ arg_t->add_intvalue(t);
+
+ // copy argument r
+ GLMessage_DataType *arg_r = glmsg.add_args();
+ arg_r->set_isarray(false);
+ arg_r->set_type(GLMessage::DataType::INT);
+ arg_r->add_intvalue(r);
+
+ // copy argument q
+ GLMessage_DataType *arg_q = glmsg.add_args();
+ arg_q->set_isarray(false);
+ arg_q->set_type(GLMessage::DataType::INT);
+ arg_q->add_intvalue(q);
+
+ // call function
+ glContext->hooks->gl.glMultiTexCoord4xOES(target, s, t, r, q);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glNormal3xOES(GLfixed nx, GLfixed ny, GLfixed nz) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glNormal3xOES);
+
+ // copy argument nx
+ GLMessage_DataType *arg_nx = glmsg.add_args();
+ arg_nx->set_isarray(false);
+ arg_nx->set_type(GLMessage::DataType::INT);
+ arg_nx->add_intvalue(nx);
+
+ // copy argument ny
+ GLMessage_DataType *arg_ny = glmsg.add_args();
+ arg_ny->set_isarray(false);
+ arg_ny->set_type(GLMessage::DataType::INT);
+ arg_ny->add_intvalue(ny);
+
+ // copy argument nz
+ GLMessage_DataType *arg_nz = glmsg.add_args();
+ arg_nz->set_isarray(false);
+ arg_nz->set_type(GLMessage::DataType::INT);
+ arg_nz->add_intvalue(nz);
+
+ // call function
+ glContext->hooks->gl.glNormal3xOES(nx, ny, nz);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glOrthoxOES(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glOrthoxOES);
+
+ // copy argument left
+ GLMessage_DataType *arg_left = glmsg.add_args();
+ arg_left->set_isarray(false);
+ arg_left->set_type(GLMessage::DataType::INT);
+ arg_left->add_intvalue(left);
+
+ // copy argument right
+ GLMessage_DataType *arg_right = glmsg.add_args();
+ arg_right->set_isarray(false);
+ arg_right->set_type(GLMessage::DataType::INT);
+ arg_right->add_intvalue(right);
+
+ // copy argument bottom
+ GLMessage_DataType *arg_bottom = glmsg.add_args();
+ arg_bottom->set_isarray(false);
+ arg_bottom->set_type(GLMessage::DataType::INT);
+ arg_bottom->add_intvalue(bottom);
+
+ // copy argument top
+ GLMessage_DataType *arg_top = glmsg.add_args();
+ arg_top->set_isarray(false);
+ arg_top->set_type(GLMessage::DataType::INT);
+ arg_top->add_intvalue(top);
+
+ // copy argument zNear
+ GLMessage_DataType *arg_zNear = glmsg.add_args();
+ arg_zNear->set_isarray(false);
+ arg_zNear->set_type(GLMessage::DataType::INT);
+ arg_zNear->add_intvalue(zNear);
+
+ // copy argument zFar
+ GLMessage_DataType *arg_zFar = glmsg.add_args();
+ arg_zFar->set_isarray(false);
+ arg_zFar->set_type(GLMessage::DataType::INT);
+ arg_zFar->add_intvalue(zFar);
+
+ // call function
+ glContext->hooks->gl.glOrthoxOES(left, right, bottom, top, zNear, zFar);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glPointParameterxOES(GLenum pname, GLfixed param) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glPointParameterxOES);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument param
+ GLMessage_DataType *arg_param = glmsg.add_args();
+ arg_param->set_isarray(false);
+ arg_param->set_type(GLMessage::DataType::INT);
+ arg_param->add_intvalue(param);
+
+ // call function
+ glContext->hooks->gl.glPointParameterxOES(pname, param);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glPointParameterxvOES(GLenum pname, const GLfixed *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glPointParameterxvOES);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glPointParameterxvOES(pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glPointSizexOES(GLfixed size) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glPointSizexOES);
+
+ // copy argument size
+ GLMessage_DataType *arg_size = glmsg.add_args();
+ arg_size->set_isarray(false);
+ arg_size->set_type(GLMessage::DataType::INT);
+ arg_size->add_intvalue(size);
+
+ // call function
+ glContext->hooks->gl.glPointSizexOES(size);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glPolygonOffsetxOES(GLfixed factor, GLfixed units) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glPolygonOffsetxOES);
+
+ // copy argument factor
+ GLMessage_DataType *arg_factor = glmsg.add_args();
+ arg_factor->set_isarray(false);
+ arg_factor->set_type(GLMessage::DataType::INT);
+ arg_factor->add_intvalue(factor);
+
+ // copy argument units
+ GLMessage_DataType *arg_units = glmsg.add_args();
+ arg_units->set_isarray(false);
+ arg_units->set_type(GLMessage::DataType::INT);
+ arg_units->add_intvalue(units);
+
+ // call function
+ glContext->hooks->gl.glPolygonOffsetxOES(factor, units);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glRotatexOES(GLfixed angle, GLfixed x, GLfixed y, GLfixed z) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glRotatexOES);
+
+ // copy argument angle
+ GLMessage_DataType *arg_angle = glmsg.add_args();
+ arg_angle->set_isarray(false);
+ arg_angle->set_type(GLMessage::DataType::INT);
+ arg_angle->add_intvalue(angle);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::INT);
+ arg_x->add_intvalue(x);
+
+ // copy argument y
+ GLMessage_DataType *arg_y = glmsg.add_args();
+ arg_y->set_isarray(false);
+ arg_y->set_type(GLMessage::DataType::INT);
+ arg_y->add_intvalue(y);
+
+ // copy argument z
+ GLMessage_DataType *arg_z = glmsg.add_args();
+ arg_z->set_isarray(false);
+ arg_z->set_type(GLMessage::DataType::INT);
+ arg_z->add_intvalue(z);
+
+ // call function
+ glContext->hooks->gl.glRotatexOES(angle, x, y, z);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glSampleCoveragexOES(GLclampx value, GLboolean invert) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glSampleCoveragexOES);
+
+ // copy argument value
+ GLMessage_DataType *arg_value = glmsg.add_args();
+ arg_value->set_isarray(false);
+ arg_value->set_type(GLMessage::DataType::INT);
+ arg_value->add_intvalue(value);
+
+ // copy argument invert
+ GLMessage_DataType *arg_invert = glmsg.add_args();
+ arg_invert->set_isarray(false);
+ arg_invert->set_type(GLMessage::DataType::BOOL);
+ arg_invert->add_boolvalue(invert);
+
+ // call function
+ glContext->hooks->gl.glSampleCoveragexOES(value, invert);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glScalexOES(GLfixed x, GLfixed y, GLfixed z) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glScalexOES);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::INT);
+ arg_x->add_intvalue(x);
+
+ // copy argument y
+ GLMessage_DataType *arg_y = glmsg.add_args();
+ arg_y->set_isarray(false);
+ arg_y->set_type(GLMessage::DataType::INT);
+ arg_y->add_intvalue(y);
+
+ // copy argument z
+ GLMessage_DataType *arg_z = glmsg.add_args();
+ arg_z->set_isarray(false);
+ arg_z->set_type(GLMessage::DataType::INT);
+ arg_z->add_intvalue(z);
+
+ // call function
+ glContext->hooks->gl.glScalexOES(x, y, z);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexEnvxOES(GLenum target, GLenum pname, GLfixed param) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glTexEnvxOES);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument param
+ GLMessage_DataType *arg_param = glmsg.add_args();
+ arg_param->set_isarray(false);
+ arg_param->set_type(GLMessage::DataType::INT);
+ arg_param->add_intvalue(param);
+
+ // call function
+ glContext->hooks->gl.glTexEnvxOES(target, pname, param);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexEnvxvOES(GLenum target, GLenum pname, const GLfixed *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glTexEnvxvOES);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glTexEnvxvOES(target, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexParameterxOES(GLenum target, GLenum pname, GLfixed param) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glTexParameterxOES);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument param
+ GLMessage_DataType *arg_param = glmsg.add_args();
+ arg_param->set_isarray(false);
+ arg_param->set_type(GLMessage::DataType::INT);
+ arg_param->add_intvalue(param);
+
+ // call function
+ glContext->hooks->gl.glTexParameterxOES(target, pname, param);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexParameterxvOES(GLenum target, GLenum pname, const GLfixed *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glTexParameterxvOES);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glTexParameterxvOES(target, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTranslatexOES(GLfixed x, GLfixed y, GLfixed z) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glTranslatexOES);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::INT);
+ arg_x->add_intvalue(x);
+
+ // copy argument y
+ GLMessage_DataType *arg_y = glmsg.add_args();
+ arg_y->set_isarray(false);
+ arg_y->set_type(GLMessage::DataType::INT);
+ arg_y->add_intvalue(y);
+
+ // copy argument z
+ GLMessage_DataType *arg_z = glmsg.add_args();
+ arg_z->set_isarray(false);
+ arg_z->set_type(GLMessage::DataType::INT);
+ arg_z->add_intvalue(z);
+
+ // call function
+ glContext->hooks->gl.glTranslatexOES(x, y, z);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+GLboolean GLTrace_glIsRenderbufferOES(GLuint renderbuffer) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glIsRenderbufferOES);
+
+ // copy argument renderbuffer
+ GLMessage_DataType *arg_renderbuffer = glmsg.add_args();
+ arg_renderbuffer->set_isarray(false);
+ arg_renderbuffer->set_type(GLMessage::DataType::INT);
+ arg_renderbuffer->add_intvalue(renderbuffer);
+
+ // call function
+ GLboolean retValue = glContext->hooks->gl.glIsRenderbufferOES(renderbuffer);
+
+ // set return value
+ GLMessage_DataType *rt = glmsg.mutable_returnvalue();
+ rt->set_isarray(false);
+ rt->set_type(GLMessage::DataType::BOOL);
+ rt->add_boolvalue(retValue);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+
+ return retValue;
+}
+
+void GLTrace_glBindRenderbufferOES(GLenum target, GLuint renderbuffer) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glBindRenderbufferOES);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument renderbuffer
+ GLMessage_DataType *arg_renderbuffer = glmsg.add_args();
+ arg_renderbuffer->set_isarray(false);
+ arg_renderbuffer->set_type(GLMessage::DataType::INT);
+ arg_renderbuffer->add_intvalue(renderbuffer);
+
+ // call function
+ glContext->hooks->gl.glBindRenderbufferOES(target, renderbuffer);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDeleteRenderbuffersOES(GLsizei n, const GLuint* renderbuffers) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glDeleteRenderbuffersOES);
+
+ // copy argument n
+ GLMessage_DataType *arg_n = glmsg.add_args();
+ arg_n->set_isarray(false);
+ arg_n->set_type(GLMessage::DataType::INT);
+ arg_n->add_intvalue(n);
+
+ // copy argument renderbuffers
+ GLMessage_DataType *arg_renderbuffers = glmsg.add_args();
+ arg_renderbuffers->set_isarray(false);
+ arg_renderbuffers->set_type(GLMessage::DataType::INT);
+ arg_renderbuffers->add_intvalue((int)renderbuffers);
+
+ // call function
+ glContext->hooks->gl.glDeleteRenderbuffersOES(n, renderbuffers);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGenRenderbuffersOES(GLsizei n, GLuint* renderbuffers) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGenRenderbuffersOES);
+
+ // copy argument n
+ GLMessage_DataType *arg_n = glmsg.add_args();
+ arg_n->set_isarray(false);
+ arg_n->set_type(GLMessage::DataType::INT);
+ arg_n->add_intvalue(n);
+
+ // copy argument renderbuffers
+ GLMessage_DataType *arg_renderbuffers = glmsg.add_args();
+ arg_renderbuffers->set_isarray(false);
+ arg_renderbuffers->set_type(GLMessage::DataType::INT);
+ arg_renderbuffers->add_intvalue((int)renderbuffers);
+
+ // call function
+ glContext->hooks->gl.glGenRenderbuffersOES(n, renderbuffers);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glRenderbufferStorageOES(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glRenderbufferStorageOES);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument internalformat
+ GLMessage_DataType *arg_internalformat = glmsg.add_args();
+ arg_internalformat->set_isarray(false);
+ arg_internalformat->set_type(GLMessage::DataType::ENUM);
+ arg_internalformat->add_intvalue((int)internalformat);
+
+ // copy argument width
+ GLMessage_DataType *arg_width = glmsg.add_args();
+ arg_width->set_isarray(false);
+ arg_width->set_type(GLMessage::DataType::INT);
+ arg_width->add_intvalue(width);
+
+ // copy argument height
+ GLMessage_DataType *arg_height = glmsg.add_args();
+ arg_height->set_isarray(false);
+ arg_height->set_type(GLMessage::DataType::INT);
+ arg_height->add_intvalue(height);
+
+ // call function
+ glContext->hooks->gl.glRenderbufferStorageOES(target, internalformat, width, height);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetRenderbufferParameterivOES(GLenum target, GLenum pname, GLint* params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetRenderbufferParameterivOES);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glGetRenderbufferParameterivOES(target, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+GLboolean GLTrace_glIsFramebufferOES(GLuint framebuffer) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glIsFramebufferOES);
+
+ // copy argument framebuffer
+ GLMessage_DataType *arg_framebuffer = glmsg.add_args();
+ arg_framebuffer->set_isarray(false);
+ arg_framebuffer->set_type(GLMessage::DataType::INT);
+ arg_framebuffer->add_intvalue(framebuffer);
+
+ // call function
+ GLboolean retValue = glContext->hooks->gl.glIsFramebufferOES(framebuffer);
+
+ // set return value
+ GLMessage_DataType *rt = glmsg.mutable_returnvalue();
+ rt->set_isarray(false);
+ rt->set_type(GLMessage::DataType::BOOL);
+ rt->add_boolvalue(retValue);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+
+ return retValue;
+}
+
+void GLTrace_glBindFramebufferOES(GLenum target, GLuint framebuffer) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glBindFramebufferOES);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument framebuffer
+ GLMessage_DataType *arg_framebuffer = glmsg.add_args();
+ arg_framebuffer->set_isarray(false);
+ arg_framebuffer->set_type(GLMessage::DataType::INT);
+ arg_framebuffer->add_intvalue(framebuffer);
+
+ // call function
+ glContext->hooks->gl.glBindFramebufferOES(target, framebuffer);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDeleteFramebuffersOES(GLsizei n, const GLuint* framebuffers) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glDeleteFramebuffersOES);
+
+ // copy argument n
+ GLMessage_DataType *arg_n = glmsg.add_args();
+ arg_n->set_isarray(false);
+ arg_n->set_type(GLMessage::DataType::INT);
+ arg_n->add_intvalue(n);
+
+ // copy argument framebuffers
+ GLMessage_DataType *arg_framebuffers = glmsg.add_args();
+ arg_framebuffers->set_isarray(false);
+ arg_framebuffers->set_type(GLMessage::DataType::INT);
+ arg_framebuffers->add_intvalue((int)framebuffers);
+
+ // call function
+ glContext->hooks->gl.glDeleteFramebuffersOES(n, framebuffers);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGenFramebuffersOES(GLsizei n, GLuint* framebuffers) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGenFramebuffersOES);
+
+ // copy argument n
+ GLMessage_DataType *arg_n = glmsg.add_args();
+ arg_n->set_isarray(false);
+ arg_n->set_type(GLMessage::DataType::INT);
+ arg_n->add_intvalue(n);
+
+ // copy argument framebuffers
+ GLMessage_DataType *arg_framebuffers = glmsg.add_args();
+ arg_framebuffers->set_isarray(false);
+ arg_framebuffers->set_type(GLMessage::DataType::INT);
+ arg_framebuffers->add_intvalue((int)framebuffers);
+
+ // call function
+ glContext->hooks->gl.glGenFramebuffersOES(n, framebuffers);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+GLenum GLTrace_glCheckFramebufferStatusOES(GLenum target) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glCheckFramebufferStatusOES);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // call function
+ GLenum retValue = glContext->hooks->gl.glCheckFramebufferStatusOES(target);
+
+ // set return value
+ GLMessage_DataType *rt = glmsg.mutable_returnvalue();
+ rt->set_isarray(false);
+ rt->set_type(GLMessage::DataType::ENUM);
+ rt->add_intvalue((int)retValue);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+
+ return retValue;
+}
+
+void GLTrace_glFramebufferRenderbufferOES(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glFramebufferRenderbufferOES);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument attachment
+ GLMessage_DataType *arg_attachment = glmsg.add_args();
+ arg_attachment->set_isarray(false);
+ arg_attachment->set_type(GLMessage::DataType::ENUM);
+ arg_attachment->add_intvalue((int)attachment);
+
+ // copy argument renderbuffertarget
+ GLMessage_DataType *arg_renderbuffertarget = glmsg.add_args();
+ arg_renderbuffertarget->set_isarray(false);
+ arg_renderbuffertarget->set_type(GLMessage::DataType::ENUM);
+ arg_renderbuffertarget->add_intvalue((int)renderbuffertarget);
+
+ // copy argument renderbuffer
+ GLMessage_DataType *arg_renderbuffer = glmsg.add_args();
+ arg_renderbuffer->set_isarray(false);
+ arg_renderbuffer->set_type(GLMessage::DataType::INT);
+ arg_renderbuffer->add_intvalue(renderbuffer);
+
+ // call function
+ glContext->hooks->gl.glFramebufferRenderbufferOES(target, attachment, renderbuffertarget, renderbuffer);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glFramebufferTexture2DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glFramebufferTexture2DOES);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument attachment
+ GLMessage_DataType *arg_attachment = glmsg.add_args();
+ arg_attachment->set_isarray(false);
+ arg_attachment->set_type(GLMessage::DataType::ENUM);
+ arg_attachment->add_intvalue((int)attachment);
+
+ // copy argument textarget
+ GLMessage_DataType *arg_textarget = glmsg.add_args();
+ arg_textarget->set_isarray(false);
+ arg_textarget->set_type(GLMessage::DataType::ENUM);
+ arg_textarget->add_intvalue((int)textarget);
+
+ // copy argument texture
+ GLMessage_DataType *arg_texture = glmsg.add_args();
+ arg_texture->set_isarray(false);
+ arg_texture->set_type(GLMessage::DataType::INT);
+ arg_texture->add_intvalue(texture);
+
+ // copy argument level
+ GLMessage_DataType *arg_level = glmsg.add_args();
+ arg_level->set_isarray(false);
+ arg_level->set_type(GLMessage::DataType::INT);
+ arg_level->add_intvalue(level);
+
+ // call function
+ glContext->hooks->gl.glFramebufferTexture2DOES(target, attachment, textarget, texture, level);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetFramebufferAttachmentParameterivOES(GLenum target, GLenum attachment, GLenum pname, GLint* params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetFramebufferAttachmentParameterivOES);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument attachment
+ GLMessage_DataType *arg_attachment = glmsg.add_args();
+ arg_attachment->set_isarray(false);
+ arg_attachment->set_type(GLMessage::DataType::ENUM);
+ arg_attachment->add_intvalue((int)attachment);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glGetFramebufferAttachmentParameterivOES(target, attachment, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGenerateMipmapOES(GLenum target) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGenerateMipmapOES);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // call function
+ glContext->hooks->gl.glGenerateMipmapOES(target);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glCurrentPaletteMatrixOES(GLuint matrixpaletteindex) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glCurrentPaletteMatrixOES);
+
+ // copy argument matrixpaletteindex
+ GLMessage_DataType *arg_matrixpaletteindex = glmsg.add_args();
+ arg_matrixpaletteindex->set_isarray(false);
+ arg_matrixpaletteindex->set_type(GLMessage::DataType::INT);
+ arg_matrixpaletteindex->add_intvalue(matrixpaletteindex);
+
+ // call function
+ glContext->hooks->gl.glCurrentPaletteMatrixOES(matrixpaletteindex);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glLoadPaletteFromModelViewMatrixOES(void) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glLoadPaletteFromModelViewMatrixOES);
+
+ // call function
+ glContext->hooks->gl.glLoadPaletteFromModelViewMatrixOES();
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glMatrixIndexPointerOES(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glMatrixIndexPointerOES);
+
+ // copy argument size
+ GLMessage_DataType *arg_size = glmsg.add_args();
+ arg_size->set_isarray(false);
+ arg_size->set_type(GLMessage::DataType::INT);
+ arg_size->add_intvalue(size);
+
+ // copy argument type
+ GLMessage_DataType *arg_type = glmsg.add_args();
+ arg_type->set_isarray(false);
+ arg_type->set_type(GLMessage::DataType::ENUM);
+ arg_type->add_intvalue((int)type);
+
+ // copy argument stride
+ GLMessage_DataType *arg_stride = glmsg.add_args();
+ arg_stride->set_isarray(false);
+ arg_stride->set_type(GLMessage::DataType::INT);
+ arg_stride->add_intvalue(stride);
+
+ // copy argument pointer
+ GLMessage_DataType *arg_pointer = glmsg.add_args();
+ arg_pointer->set_isarray(false);
+ arg_pointer->set_type(GLMessage::DataType::INT);
+ arg_pointer->add_intvalue((int)pointer);
+
+ // call function
+ glContext->hooks->gl.glMatrixIndexPointerOES(size, type, stride, pointer);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glWeightPointerOES(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glWeightPointerOES);
+
+ // copy argument size
+ GLMessage_DataType *arg_size = glmsg.add_args();
+ arg_size->set_isarray(false);
+ arg_size->set_type(GLMessage::DataType::INT);
+ arg_size->add_intvalue(size);
+
+ // copy argument type
+ GLMessage_DataType *arg_type = glmsg.add_args();
+ arg_type->set_isarray(false);
+ arg_type->set_type(GLMessage::DataType::ENUM);
+ arg_type->add_intvalue((int)type);
+
+ // copy argument stride
+ GLMessage_DataType *arg_stride = glmsg.add_args();
+ arg_stride->set_isarray(false);
+ arg_stride->set_type(GLMessage::DataType::INT);
+ arg_stride->add_intvalue(stride);
+
+ // copy argument pointer
+ GLMessage_DataType *arg_pointer = glmsg.add_args();
+ arg_pointer->set_isarray(false);
+ arg_pointer->set_type(GLMessage::DataType::INT);
+ arg_pointer->add_intvalue((int)pointer);
+
+ // call function
+ glContext->hooks->gl.glWeightPointerOES(size, type, stride, pointer);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+GLbitfield GLTrace_glQueryMatrixxOES(GLfixed mantissa[16], GLint exponent[16]) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glQueryMatrixxOES);
+
+ // copy argument mantissa
+ GLMessage_DataType *arg_mantissa = glmsg.add_args();
+ arg_mantissa->set_isarray(false);
+ arg_mantissa->set_type(GLMessage::DataType::INT);
+ arg_mantissa->add_intvalue((int)mantissa);
+
+ // copy argument exponent
+ GLMessage_DataType *arg_exponent = glmsg.add_args();
+ arg_exponent->set_isarray(false);
+ arg_exponent->set_type(GLMessage::DataType::INT);
+ arg_exponent->add_intvalue((int)exponent);
+
+ // call function
+ GLbitfield retValue = glContext->hooks->gl.glQueryMatrixxOES(mantissa, exponent);
+
+ // set return value
+ GLMessage_DataType *rt = glmsg.mutable_returnvalue();
+ rt->set_isarray(false);
+ rt->set_type(GLMessage::DataType::INT);
+ rt->add_intvalue(retValue);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+
+ return retValue;
+}
+
+void GLTrace_glDepthRangefOES(GLclampf zNear, GLclampf zFar) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glDepthRangefOES);
+
+ // copy argument zNear
+ GLMessage_DataType *arg_zNear = glmsg.add_args();
+ arg_zNear->set_isarray(false);
+ arg_zNear->set_type(GLMessage::DataType::FLOAT);
+ arg_zNear->add_floatvalue(zNear);
+
+ // copy argument zFar
+ GLMessage_DataType *arg_zFar = glmsg.add_args();
+ arg_zFar->set_isarray(false);
+ arg_zFar->set_type(GLMessage::DataType::FLOAT);
+ arg_zFar->add_floatvalue(zFar);
+
+ // call function
+ glContext->hooks->gl.glDepthRangefOES(zNear, zFar);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glFrustumfOES(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glFrustumfOES);
+
+ // copy argument left
+ GLMessage_DataType *arg_left = glmsg.add_args();
+ arg_left->set_isarray(false);
+ arg_left->set_type(GLMessage::DataType::FLOAT);
+ arg_left->add_floatvalue(left);
+
+ // copy argument right
+ GLMessage_DataType *arg_right = glmsg.add_args();
+ arg_right->set_isarray(false);
+ arg_right->set_type(GLMessage::DataType::FLOAT);
+ arg_right->add_floatvalue(right);
+
+ // copy argument bottom
+ GLMessage_DataType *arg_bottom = glmsg.add_args();
+ arg_bottom->set_isarray(false);
+ arg_bottom->set_type(GLMessage::DataType::FLOAT);
+ arg_bottom->add_floatvalue(bottom);
+
+ // copy argument top
+ GLMessage_DataType *arg_top = glmsg.add_args();
+ arg_top->set_isarray(false);
+ arg_top->set_type(GLMessage::DataType::FLOAT);
+ arg_top->add_floatvalue(top);
+
+ // copy argument zNear
+ GLMessage_DataType *arg_zNear = glmsg.add_args();
+ arg_zNear->set_isarray(false);
+ arg_zNear->set_type(GLMessage::DataType::FLOAT);
+ arg_zNear->add_floatvalue(zNear);
+
+ // copy argument zFar
+ GLMessage_DataType *arg_zFar = glmsg.add_args();
+ arg_zFar->set_isarray(false);
+ arg_zFar->set_type(GLMessage::DataType::FLOAT);
+ arg_zFar->add_floatvalue(zFar);
+
+ // call function
+ glContext->hooks->gl.glFrustumfOES(left, right, bottom, top, zNear, zFar);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glOrthofOES(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glOrthofOES);
+
+ // copy argument left
+ GLMessage_DataType *arg_left = glmsg.add_args();
+ arg_left->set_isarray(false);
+ arg_left->set_type(GLMessage::DataType::FLOAT);
+ arg_left->add_floatvalue(left);
+
+ // copy argument right
+ GLMessage_DataType *arg_right = glmsg.add_args();
+ arg_right->set_isarray(false);
+ arg_right->set_type(GLMessage::DataType::FLOAT);
+ arg_right->add_floatvalue(right);
+
+ // copy argument bottom
+ GLMessage_DataType *arg_bottom = glmsg.add_args();
+ arg_bottom->set_isarray(false);
+ arg_bottom->set_type(GLMessage::DataType::FLOAT);
+ arg_bottom->add_floatvalue(bottom);
+
+ // copy argument top
+ GLMessage_DataType *arg_top = glmsg.add_args();
+ arg_top->set_isarray(false);
+ arg_top->set_type(GLMessage::DataType::FLOAT);
+ arg_top->add_floatvalue(top);
+
+ // copy argument zNear
+ GLMessage_DataType *arg_zNear = glmsg.add_args();
+ arg_zNear->set_isarray(false);
+ arg_zNear->set_type(GLMessage::DataType::FLOAT);
+ arg_zNear->add_floatvalue(zNear);
+
+ // copy argument zFar
+ GLMessage_DataType *arg_zFar = glmsg.add_args();
+ arg_zFar->set_isarray(false);
+ arg_zFar->set_type(GLMessage::DataType::FLOAT);
+ arg_zFar->add_floatvalue(zFar);
+
+ // call function
+ glContext->hooks->gl.glOrthofOES(left, right, bottom, top, zNear, zFar);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glClipPlanefOES(GLenum plane, const GLfloat *equation) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glClipPlanefOES);
+
+ // copy argument plane
+ GLMessage_DataType *arg_plane = glmsg.add_args();
+ arg_plane->set_isarray(false);
+ arg_plane->set_type(GLMessage::DataType::ENUM);
+ arg_plane->add_intvalue((int)plane);
+
+ // copy argument equation
+ GLMessage_DataType *arg_equation = glmsg.add_args();
+ arg_equation->set_isarray(false);
+ arg_equation->set_type(GLMessage::DataType::INT);
+ arg_equation->add_intvalue((int)equation);
+
+ // call function
+ glContext->hooks->gl.glClipPlanefOES(plane, equation);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetClipPlanefOES(GLenum pname, GLfloat eqn[4]) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetClipPlanefOES);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument eqn
+ GLMessage_DataType *arg_eqn = glmsg.add_args();
+ arg_eqn->set_isarray(false);
+ arg_eqn->set_type(GLMessage::DataType::INT);
+ arg_eqn->add_intvalue((int)eqn);
+
+ // call function
+ glContext->hooks->gl.glGetClipPlanefOES(pname, eqn);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glClearDepthfOES(GLclampf depth) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glClearDepthfOES);
+
+ // copy argument depth
+ GLMessage_DataType *arg_depth = glmsg.add_args();
+ arg_depth->set_isarray(false);
+ arg_depth->set_type(GLMessage::DataType::FLOAT);
+ arg_depth->add_floatvalue(depth);
+
+ // call function
+ glContext->hooks->gl.glClearDepthfOES(depth);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexGenfOES(GLenum coord, GLenum pname, GLfloat param) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glTexGenfOES);
+
+ // copy argument coord
+ GLMessage_DataType *arg_coord = glmsg.add_args();
+ arg_coord->set_isarray(false);
+ arg_coord->set_type(GLMessage::DataType::ENUM);
+ arg_coord->add_intvalue((int)coord);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument param
+ GLMessage_DataType *arg_param = glmsg.add_args();
+ arg_param->set_isarray(false);
+ arg_param->set_type(GLMessage::DataType::FLOAT);
+ arg_param->add_floatvalue(param);
+
+ // call function
+ glContext->hooks->gl.glTexGenfOES(coord, pname, param);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexGenfvOES(GLenum coord, GLenum pname, const GLfloat *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glTexGenfvOES);
+
+ // copy argument coord
+ GLMessage_DataType *arg_coord = glmsg.add_args();
+ arg_coord->set_isarray(false);
+ arg_coord->set_type(GLMessage::DataType::ENUM);
+ arg_coord->add_intvalue((int)coord);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glTexGenfvOES(coord, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexGeniOES(GLenum coord, GLenum pname, GLint param) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glTexGeniOES);
+
+ // copy argument coord
+ GLMessage_DataType *arg_coord = glmsg.add_args();
+ arg_coord->set_isarray(false);
+ arg_coord->set_type(GLMessage::DataType::ENUM);
+ arg_coord->add_intvalue((int)coord);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument param
+ GLMessage_DataType *arg_param = glmsg.add_args();
+ arg_param->set_isarray(false);
+ arg_param->set_type(GLMessage::DataType::INT);
+ arg_param->add_intvalue(param);
+
+ // call function
+ glContext->hooks->gl.glTexGeniOES(coord, pname, param);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexGenivOES(GLenum coord, GLenum pname, const GLint *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glTexGenivOES);
+
+ // copy argument coord
+ GLMessage_DataType *arg_coord = glmsg.add_args();
+ arg_coord->set_isarray(false);
+ arg_coord->set_type(GLMessage::DataType::ENUM);
+ arg_coord->add_intvalue((int)coord);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glTexGenivOES(coord, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexGenxOES(GLenum coord, GLenum pname, GLfixed param) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glTexGenxOES);
+
+ // copy argument coord
+ GLMessage_DataType *arg_coord = glmsg.add_args();
+ arg_coord->set_isarray(false);
+ arg_coord->set_type(GLMessage::DataType::ENUM);
+ arg_coord->add_intvalue((int)coord);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument param
+ GLMessage_DataType *arg_param = glmsg.add_args();
+ arg_param->set_isarray(false);
+ arg_param->set_type(GLMessage::DataType::INT);
+ arg_param->add_intvalue(param);
+
+ // call function
+ glContext->hooks->gl.glTexGenxOES(coord, pname, param);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexGenxvOES(GLenum coord, GLenum pname, const GLfixed *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glTexGenxvOES);
+
+ // copy argument coord
+ GLMessage_DataType *arg_coord = glmsg.add_args();
+ arg_coord->set_isarray(false);
+ arg_coord->set_type(GLMessage::DataType::ENUM);
+ arg_coord->add_intvalue((int)coord);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glTexGenxvOES(coord, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetTexGenfvOES(GLenum coord, GLenum pname, GLfloat *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetTexGenfvOES);
+
+ // copy argument coord
+ GLMessage_DataType *arg_coord = glmsg.add_args();
+ arg_coord->set_isarray(false);
+ arg_coord->set_type(GLMessage::DataType::ENUM);
+ arg_coord->add_intvalue((int)coord);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glGetTexGenfvOES(coord, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetTexGenivOES(GLenum coord, GLenum pname, GLint *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetTexGenivOES);
+
+ // copy argument coord
+ GLMessage_DataType *arg_coord = glmsg.add_args();
+ arg_coord->set_isarray(false);
+ arg_coord->set_type(GLMessage::DataType::ENUM);
+ arg_coord->add_intvalue((int)coord);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glGetTexGenivOES(coord, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetTexGenxvOES(GLenum coord, GLenum pname, GLfixed *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glGetTexGenxvOES);
+
+ // copy argument coord
+ GLMessage_DataType *arg_coord = glmsg.add_args();
+ arg_coord->set_isarray(false);
+ arg_coord->set_type(GLMessage::DataType::ENUM);
+ arg_coord->add_intvalue((int)coord);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ glContext->hooks->gl.glGetTexGenxvOES(coord, pname, params);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glClipPlanefIMG(GLenum p, const GLfloat *eqn) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glClipPlanefIMG);
+
+ // copy argument p
+ GLMessage_DataType *arg_p = glmsg.add_args();
+ arg_p->set_isarray(false);
+ arg_p->set_type(GLMessage::DataType::ENUM);
+ arg_p->add_intvalue((int)p);
+
+ // copy argument eqn
+ GLMessage_DataType *arg_eqn = glmsg.add_args();
+ arg_eqn->set_isarray(false);
+ arg_eqn->set_type(GLMessage::DataType::INT);
+ arg_eqn->add_intvalue((int)eqn);
+
+ // call function
+ glContext->hooks->gl.glClipPlanefIMG(p, eqn);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+void GLTrace_glClipPlanexIMG(GLenum p, const GLfixed *eqn) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::glClipPlanexIMG);
+
+ // copy argument p
+ GLMessage_DataType *arg_p = glmsg.add_args();
+ arg_p->set_isarray(false);
+ arg_p->set_type(GLMessage::DataType::ENUM);
+ arg_p->add_intvalue((int)p);
+
+ // copy argument eqn
+ GLMessage_DataType *arg_eqn = glmsg.add_args();
+ arg_eqn->set_isarray(false);
+ arg_eqn->set_type(GLMessage::DataType::INT);
+ arg_eqn->add_intvalue((int)eqn);
+
+ // call function
+ glContext->hooks->gl.glClipPlanexIMG(p, eqn);
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+}
+
+
+
+}; // namespace gltrace
+}; // namespace android
diff --git a/opengl/libs/GLES_trace/src/gltrace_api.h b/opengl/libs/GLES_trace/src/gltrace_api.h
new file mode 100644
index 0000000..a13ede3
--- /dev/null
+++ b/opengl/libs/GLES_trace/src/gltrace_api.h
@@ -0,0 +1,421 @@
+/*
+ * Copyright 2011, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * THIS FILE WAS GENERATED BY A SCRIPT. DO NOT EDIT.
+ */
+
+#include <cutils/log.h>
+#include <GLES2/gl2.h>
+
+#include "gltrace.pb.h"
+#include "gltrace_context.h"
+#include "gltrace_fixup.h"
+#include "gltrace_transport.h"
+
+namespace android {
+namespace gltrace {
+
+
+// Declarations for GL2 APIs
+
+void GLTrace_glActiveTexture(GLenum texture);
+void GLTrace_glAttachShader(GLuint program, GLuint shader);
+void GLTrace_glBindAttribLocation(GLuint program, GLuint index, const GLchar* name);
+void GLTrace_glBindBuffer(GLenum target, GLuint buffer);
+void GLTrace_glBindFramebuffer(GLenum target, GLuint framebuffer);
+void GLTrace_glBindRenderbuffer(GLenum target, GLuint renderbuffer);
+void GLTrace_glBindTexture(GLenum target, GLuint texture);
+void GLTrace_glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+void GLTrace_glBlendEquation(GLenum mode);
+void GLTrace_glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha);
+void GLTrace_glBlendFunc(GLenum sfactor, GLenum dfactor);
+void GLTrace_glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
+void GLTrace_glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage);
+void GLTrace_glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data);
+GLenum GLTrace_glCheckFramebufferStatus(GLenum target);
+void GLTrace_glClear(GLbitfield mask);
+void GLTrace_glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+void GLTrace_glClearDepthf(GLclampf depth);
+void GLTrace_glClearStencil(GLint s);
+void GLTrace_glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
+void GLTrace_glCompileShader(GLuint shader);
+void GLTrace_glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data);
+void GLTrace_glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data);
+void GLTrace_glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+void GLTrace_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+GLuint GLTrace_glCreateProgram(void);
+GLuint GLTrace_glCreateShader(GLenum type);
+void GLTrace_glCullFace(GLenum mode);
+void GLTrace_glDeleteBuffers(GLsizei n, const GLuint* buffers);
+void GLTrace_glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers);
+void GLTrace_glDeleteProgram(GLuint program);
+void GLTrace_glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers);
+void GLTrace_glDeleteShader(GLuint shader);
+void GLTrace_glDeleteTextures(GLsizei n, const GLuint* textures);
+void GLTrace_glDepthFunc(GLenum func);
+void GLTrace_glDepthMask(GLboolean flag);
+void GLTrace_glDepthRangef(GLclampf zNear, GLclampf zFar);
+void GLTrace_glDetachShader(GLuint program, GLuint shader);
+void GLTrace_glDisable(GLenum cap);
+void GLTrace_glDisableVertexAttribArray(GLuint index);
+void GLTrace_glDrawArrays(GLenum mode, GLint first, GLsizei count);
+void GLTrace_glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices);
+void GLTrace_glEnable(GLenum cap);
+void GLTrace_glEnableVertexAttribArray(GLuint index);
+void GLTrace_glFinish(void);
+void GLTrace_glFlush(void);
+void GLTrace_glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+void GLTrace_glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+void GLTrace_glFrontFace(GLenum mode);
+void GLTrace_glGenBuffers(GLsizei n, GLuint* buffers);
+void GLTrace_glGenerateMipmap(GLenum target);
+void GLTrace_glGenFramebuffers(GLsizei n, GLuint* framebuffers);
+void GLTrace_glGenRenderbuffers(GLsizei n, GLuint* renderbuffers);
+void GLTrace_glGenTextures(GLsizei n, GLuint* textures);
+void GLTrace_glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
+void GLTrace_glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
+void GLTrace_glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
+int GLTrace_glGetAttribLocation(GLuint program, const GLchar* name);
+void GLTrace_glGetBooleanv(GLenum pname, GLboolean* params);
+void GLTrace_glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params);
+GLenum GLTrace_glGetError(void);
+void GLTrace_glGetFloatv(GLenum pname, GLfloat* params);
+void GLTrace_glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params);
+void GLTrace_glGetIntegerv(GLenum pname, GLint* params);
+void GLTrace_glGetProgramiv(GLuint program, GLenum pname, GLint* params);
+void GLTrace_glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog);
+void GLTrace_glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params);
+void GLTrace_glGetShaderiv(GLuint shader, GLenum pname, GLint* params);
+void GLTrace_glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog);
+void GLTrace_glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
+void GLTrace_glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);
+const GLubyte* GLTrace_glGetString(GLenum name);
+void GLTrace_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params);
+void GLTrace_glGetTexParameteriv(GLenum target, GLenum pname, GLint* params);
+void GLTrace_glGetUniformfv(GLuint program, GLint location, GLfloat* params);
+void GLTrace_glGetUniformiv(GLuint program, GLint location, GLint* params);
+int GLTrace_glGetUniformLocation(GLuint program, const GLchar* name);
+void GLTrace_glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params);
+void GLTrace_glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params);
+void GLTrace_glGetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid** pointer);
+void GLTrace_glHint(GLenum target, GLenum mode);
+GLboolean GLTrace_glIsBuffer(GLuint buffer);
+GLboolean GLTrace_glIsEnabled(GLenum cap);
+GLboolean GLTrace_glIsFramebuffer(GLuint framebuffer);
+GLboolean GLTrace_glIsProgram(GLuint program);
+GLboolean GLTrace_glIsRenderbuffer(GLuint renderbuffer);
+GLboolean GLTrace_glIsShader(GLuint shader);
+GLboolean GLTrace_glIsTexture(GLuint texture);
+void GLTrace_glLineWidth(GLfloat width);
+void GLTrace_glLinkProgram(GLuint program);
+void GLTrace_glPixelStorei(GLenum pname, GLint param);
+void GLTrace_glPolygonOffset(GLfloat factor, GLfloat units);
+void GLTrace_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);
+void GLTrace_glReleaseShaderCompiler(void);
+void GLTrace_glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+void GLTrace_glSampleCoverage(GLclampf value, GLboolean invert);
+void GLTrace_glScissor(GLint x, GLint y, GLsizei width, GLsizei height);
+void GLTrace_glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length);
+void GLTrace_glShaderSource(GLuint shader, GLsizei count, const GLchar** string, const GLint* length);
+void GLTrace_glStencilFunc(GLenum func, GLint ref, GLuint mask);
+void GLTrace_glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask);
+void GLTrace_glStencilMask(GLuint mask);
+void GLTrace_glStencilMaskSeparate(GLenum face, GLuint mask);
+void GLTrace_glStencilOp(GLenum fail, GLenum zfail, GLenum zpass);
+void GLTrace_glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
+void GLTrace_glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
+void GLTrace_glTexParameterf(GLenum target, GLenum pname, GLfloat param);
+void GLTrace_glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params);
+void GLTrace_glTexParameteri(GLenum target, GLenum pname, GLint param);
+void GLTrace_glTexParameteriv(GLenum target, GLenum pname, const GLint* params);
+void GLTrace_glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels);
+void GLTrace_glUniform1f(GLint location, GLfloat x);
+void GLTrace_glUniform1fv(GLint location, GLsizei count, const GLfloat* v);
+void GLTrace_glUniform1i(GLint location, GLint x);
+void GLTrace_glUniform1iv(GLint location, GLsizei count, const GLint* v);
+void GLTrace_glUniform2f(GLint location, GLfloat x, GLfloat y);
+void GLTrace_glUniform2fv(GLint location, GLsizei count, const GLfloat* v);
+void GLTrace_glUniform2i(GLint location, GLint x, GLint y);
+void GLTrace_glUniform2iv(GLint location, GLsizei count, const GLint* v);
+void GLTrace_glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z);
+void GLTrace_glUniform3fv(GLint location, GLsizei count, const GLfloat* v);
+void GLTrace_glUniform3i(GLint location, GLint x, GLint y, GLint z);
+void GLTrace_glUniform3iv(GLint location, GLsizei count, const GLint* v);
+void GLTrace_glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+void GLTrace_glUniform4fv(GLint location, GLsizei count, const GLfloat* v);
+void GLTrace_glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w);
+void GLTrace_glUniform4iv(GLint location, GLsizei count, const GLint* v);
+void GLTrace_glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+void GLTrace_glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+void GLTrace_glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+void GLTrace_glUseProgram(GLuint program);
+void GLTrace_glValidateProgram(GLuint program);
+void GLTrace_glVertexAttrib1f(GLuint indx, GLfloat x);
+void GLTrace_glVertexAttrib1fv(GLuint indx, const GLfloat* values);
+void GLTrace_glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y);
+void GLTrace_glVertexAttrib2fv(GLuint indx, const GLfloat* values);
+void GLTrace_glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z);
+void GLTrace_glVertexAttrib3fv(GLuint indx, const GLfloat* values);
+void GLTrace_glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+void GLTrace_glVertexAttrib4fv(GLuint indx, const GLfloat* values);
+void GLTrace_glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr);
+void GLTrace_glViewport(GLint x, GLint y, GLsizei width, GLsizei height);
+
+// Declarations for GL2Ext APIs
+
+void GLTrace_glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image);
+void GLTrace_glEGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image);
+void GLTrace_glGetProgramBinaryOES(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
+void GLTrace_glProgramBinaryOES(GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);
+void* GLTrace_glMapBufferOES(GLenum target, GLenum access);
+GLboolean GLTrace_glUnmapBufferOES(GLenum target);
+void GLTrace_glGetBufferPointervOES(GLenum target, GLenum pname, GLvoid** params);
+void GLTrace_glTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
+void GLTrace_glTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels);
+void GLTrace_glCopyTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+void GLTrace_glCompressedTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data);
+void GLTrace_glCompressedTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data);
+void GLTrace_glFramebufferTexture3DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+void GLTrace_glBindVertexArrayOES(GLuint array);
+void GLTrace_glDeleteVertexArraysOES(GLsizei n, const GLuint *arrays);
+void GLTrace_glGenVertexArraysOES(GLsizei n, GLuint *arrays);
+GLboolean GLTrace_glIsVertexArrayOES(GLuint array);
+void GLTrace_glGetPerfMonitorGroupsAMD(GLint *numGroups, GLsizei groupsSize, GLuint *groups);
+void GLTrace_glGetPerfMonitorCountersAMD(GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
+void GLTrace_glGetPerfMonitorGroupStringAMD(GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
+void GLTrace_glGetPerfMonitorCounterStringAMD(GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
+void GLTrace_glGetPerfMonitorCounterInfoAMD(GLuint group, GLuint counter, GLenum pname, GLvoid *data);
+void GLTrace_glGenPerfMonitorsAMD(GLsizei n, GLuint *monitors);
+void GLTrace_glDeletePerfMonitorsAMD(GLsizei n, GLuint *monitors);
+void GLTrace_glSelectPerfMonitorCountersAMD(GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);
+void GLTrace_glBeginPerfMonitorAMD(GLuint monitor);
+void GLTrace_glEndPerfMonitorAMD(GLuint monitor);
+void GLTrace_glGetPerfMonitorCounterDataAMD(GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
+void GLTrace_glDiscardFramebufferEXT(GLenum target, GLsizei numAttachments, const GLenum *attachments);
+void GLTrace_glMultiDrawArraysEXT(GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
+void GLTrace_glMultiDrawElementsEXT(GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
+void GLTrace_glRenderbufferStorageMultisampleIMG(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+void GLTrace_glFramebufferTexture2DMultisampleIMG(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
+void GLTrace_glDeleteFencesNV(GLsizei n, const GLuint *fences);
+void GLTrace_glGenFencesNV(GLsizei n, GLuint *fences);
+GLboolean GLTrace_glIsFenceNV(GLuint fence);
+GLboolean GLTrace_glTestFenceNV(GLuint fence);
+void GLTrace_glGetFenceivNV(GLuint fence, GLenum pname, GLint *params);
+void GLTrace_glFinishFenceNV(GLuint fence);
+void GLTrace_glSetFenceNV(GLuint fence, GLenum condition);
+void GLTrace_glCoverageMaskNV(GLboolean mask);
+void GLTrace_glCoverageOperationNV(GLenum operation);
+void GLTrace_glGetDriverControlsQCOM(GLint *num, GLsizei size, GLuint *driverControls);
+void GLTrace_glGetDriverControlStringQCOM(GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
+void GLTrace_glEnableDriverControlQCOM(GLuint driverControl);
+void GLTrace_glDisableDriverControlQCOM(GLuint driverControl);
+void GLTrace_glExtGetTexturesQCOM(GLuint *textures, GLint maxTextures, GLint *numTextures);
+void GLTrace_glExtGetBuffersQCOM(GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
+void GLTrace_glExtGetRenderbuffersQCOM(GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
+void GLTrace_glExtGetFramebuffersQCOM(GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
+void GLTrace_glExtGetTexLevelParameterivQCOM(GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
+void GLTrace_glExtTexObjectStateOverrideiQCOM(GLenum target, GLenum pname, GLint param);
+void GLTrace_glExtGetTexSubImageQCOM(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels);
+void GLTrace_glExtGetBufferPointervQCOM(GLenum target, GLvoid **params);
+void GLTrace_glExtGetShadersQCOM(GLuint *shaders, GLint maxShaders, GLint *numShaders);
+void GLTrace_glExtGetProgramsQCOM(GLuint *programs, GLint maxPrograms, GLint *numPrograms);
+GLboolean GLTrace_glExtIsProgramBinaryQCOM(GLuint program);
+void GLTrace_glExtGetProgramBinarySourceQCOM(GLuint program, GLenum shadertype, GLchar *source, GLint *length);
+void GLTrace_glStartTilingQCOM(GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
+void GLTrace_glEndTilingQCOM(GLbitfield preserveMask);
+
+// Declarations for GL1 APIs
+
+void GLTrace_glAlphaFunc(GLenum func, GLclampf ref);
+void GLTrace_glClipPlanef(GLenum plane, const GLfloat *equation);
+void GLTrace_glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+void GLTrace_glFogf(GLenum pname, GLfloat param);
+void GLTrace_glFogfv(GLenum pname, const GLfloat *params);
+void GLTrace_glFrustumf(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
+void GLTrace_glGetClipPlanef(GLenum pname, GLfloat eqn[4]);
+void GLTrace_glGetLightfv(GLenum light, GLenum pname, GLfloat *params);
+void GLTrace_glGetMaterialfv(GLenum face, GLenum pname, GLfloat *params);
+void GLTrace_glGetTexEnvfv(GLenum env, GLenum pname, GLfloat *params);
+void GLTrace_glLightModelf(GLenum pname, GLfloat param);
+void GLTrace_glLightModelfv(GLenum pname, const GLfloat *params);
+void GLTrace_glLightf(GLenum light, GLenum pname, GLfloat param);
+void GLTrace_glLightfv(GLenum light, GLenum pname, const GLfloat *params);
+void GLTrace_glLoadMatrixf(const GLfloat *m);
+void GLTrace_glMaterialf(GLenum face, GLenum pname, GLfloat param);
+void GLTrace_glMaterialfv(GLenum face, GLenum pname, const GLfloat *params);
+void GLTrace_glMultMatrixf(const GLfloat *m);
+void GLTrace_glMultiTexCoord4f(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+void GLTrace_glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz);
+void GLTrace_glOrthof(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
+void GLTrace_glPointParameterf(GLenum pname, GLfloat param);
+void GLTrace_glPointParameterfv(GLenum pname, const GLfloat *params);
+void GLTrace_glPointSize(GLfloat size);
+void GLTrace_glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
+void GLTrace_glScalef(GLfloat x, GLfloat y, GLfloat z);
+void GLTrace_glTexEnvf(GLenum target, GLenum pname, GLfloat param);
+void GLTrace_glTexEnvfv(GLenum target, GLenum pname, const GLfloat *params);
+void GLTrace_glTranslatef(GLfloat x, GLfloat y, GLfloat z);
+void GLTrace_glAlphaFuncx(GLenum func, GLclampx ref);
+void GLTrace_glClearColorx(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
+void GLTrace_glClearDepthx(GLclampx depth);
+void GLTrace_glClientActiveTexture(GLenum texture);
+void GLTrace_glClipPlanex(GLenum plane, const GLfixed *equation);
+void GLTrace_glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
+void GLTrace_glColor4x(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
+void GLTrace_glColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+void GLTrace_glDepthRangex(GLclampx zNear, GLclampx zFar);
+void GLTrace_glDisableClientState(GLenum array);
+void GLTrace_glEnableClientState(GLenum array);
+void GLTrace_glFogx(GLenum pname, GLfixed param);
+void GLTrace_glFogxv(GLenum pname, const GLfixed *params);
+void GLTrace_glFrustumx(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
+void GLTrace_glGetClipPlanex(GLenum pname, GLfixed eqn[4]);
+void GLTrace_glGetFixedv(GLenum pname, GLfixed *params);
+void GLTrace_glGetLightxv(GLenum light, GLenum pname, GLfixed *params);
+void GLTrace_glGetMaterialxv(GLenum face, GLenum pname, GLfixed *params);
+void GLTrace_glGetPointerv(GLenum pname, GLvoid **params);
+void GLTrace_glGetTexEnviv(GLenum env, GLenum pname, GLint *params);
+void GLTrace_glGetTexEnvxv(GLenum env, GLenum pname, GLfixed *params);
+void GLTrace_glGetTexParameterxv(GLenum target, GLenum pname, GLfixed *params);
+void GLTrace_glLightModelx(GLenum pname, GLfixed param);
+void GLTrace_glLightModelxv(GLenum pname, const GLfixed *params);
+void GLTrace_glLightx(GLenum light, GLenum pname, GLfixed param);
+void GLTrace_glLightxv(GLenum light, GLenum pname, const GLfixed *params);
+void GLTrace_glLineWidthx(GLfixed width);
+void GLTrace_glLoadIdentity(void);
+void GLTrace_glLoadMatrixx(const GLfixed *m);
+void GLTrace_glLogicOp(GLenum opcode);
+void GLTrace_glMaterialx(GLenum face, GLenum pname, GLfixed param);
+void GLTrace_glMaterialxv(GLenum face, GLenum pname, const GLfixed *params);
+void GLTrace_glMatrixMode(GLenum mode);
+void GLTrace_glMultMatrixx(const GLfixed *m);
+void GLTrace_glMultiTexCoord4x(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
+void GLTrace_glNormal3x(GLfixed nx, GLfixed ny, GLfixed nz);
+void GLTrace_glNormalPointer(GLenum type, GLsizei stride, const GLvoid *pointer);
+void GLTrace_glOrthox(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
+void GLTrace_glPointParameterx(GLenum pname, GLfixed param);
+void GLTrace_glPointParameterxv(GLenum pname, const GLfixed *params);
+void GLTrace_glPointSizex(GLfixed size);
+void GLTrace_glPolygonOffsetx(GLfixed factor, GLfixed units);
+void GLTrace_glPopMatrix(void);
+void GLTrace_glPushMatrix(void);
+void GLTrace_glRotatex(GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
+void GLTrace_glSampleCoveragex(GLclampx value, GLboolean invert);
+void GLTrace_glScalex(GLfixed x, GLfixed y, GLfixed z);
+void GLTrace_glShadeModel(GLenum mode);
+void GLTrace_glTexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+void GLTrace_glTexEnvi(GLenum target, GLenum pname, GLint param);
+void GLTrace_glTexEnvx(GLenum target, GLenum pname, GLfixed param);
+void GLTrace_glTexEnviv(GLenum target, GLenum pname, const GLint *params);
+void GLTrace_glTexEnvxv(GLenum target, GLenum pname, const GLfixed *params);
+void GLTrace_glTexParameterx(GLenum target, GLenum pname, GLfixed param);
+void GLTrace_glTexParameterxv(GLenum target, GLenum pname, const GLfixed *params);
+void GLTrace_glTranslatex(GLfixed x, GLfixed y, GLfixed z);
+void GLTrace_glVertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+void GLTrace_glPointSizePointerOES(GLenum type, GLsizei stride, const GLvoid *pointer);
+
+// Declarations for GL1Ext APIs
+
+void GLTrace_glBlendEquationSeparateOES(GLenum modeRGB, GLenum modeAlpha);
+void GLTrace_glBlendFuncSeparateOES(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
+void GLTrace_glBlendEquationOES(GLenum mode);
+void GLTrace_glDrawTexsOES(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height);
+void GLTrace_glDrawTexiOES(GLint x, GLint y, GLint z, GLint width, GLint height);
+void GLTrace_glDrawTexxOES(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height);
+void GLTrace_glDrawTexsvOES(const GLshort *coords);
+void GLTrace_glDrawTexivOES(const GLint *coords);
+void GLTrace_glDrawTexxvOES(const GLfixed *coords);
+void GLTrace_glDrawTexfOES(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height);
+void GLTrace_glDrawTexfvOES(const GLfloat *coords);
+void GLTrace_glAlphaFuncxOES(GLenum func, GLclampx ref);
+void GLTrace_glClearColorxOES(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
+void GLTrace_glClearDepthxOES(GLclampx depth);
+void GLTrace_glClipPlanexOES(GLenum plane, const GLfixed *equation);
+void GLTrace_glColor4xOES(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
+void GLTrace_glDepthRangexOES(GLclampx zNear, GLclampx zFar);
+void GLTrace_glFogxOES(GLenum pname, GLfixed param);
+void GLTrace_glFogxvOES(GLenum pname, const GLfixed *params);
+void GLTrace_glFrustumxOES(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
+void GLTrace_glGetClipPlanexOES(GLenum pname, GLfixed eqn[4]);
+void GLTrace_glGetFixedvOES(GLenum pname, GLfixed *params);
+void GLTrace_glGetLightxvOES(GLenum light, GLenum pname, GLfixed *params);
+void GLTrace_glGetMaterialxvOES(GLenum face, GLenum pname, GLfixed *params);
+void GLTrace_glGetTexEnvxvOES(GLenum env, GLenum pname, GLfixed *params);
+void GLTrace_glGetTexParameterxvOES(GLenum target, GLenum pname, GLfixed *params);
+void GLTrace_glLightModelxOES(GLenum pname, GLfixed param);
+void GLTrace_glLightModelxvOES(GLenum pname, const GLfixed *params);
+void GLTrace_glLightxOES(GLenum light, GLenum pname, GLfixed param);
+void GLTrace_glLightxvOES(GLenum light, GLenum pname, const GLfixed *params);
+void GLTrace_glLineWidthxOES(GLfixed width);
+void GLTrace_glLoadMatrixxOES(const GLfixed *m);
+void GLTrace_glMaterialxOES(GLenum face, GLenum pname, GLfixed param);
+void GLTrace_glMaterialxvOES(GLenum face, GLenum pname, const GLfixed *params);
+void GLTrace_glMultMatrixxOES(const GLfixed *m);
+void GLTrace_glMultiTexCoord4xOES(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
+void GLTrace_glNormal3xOES(GLfixed nx, GLfixed ny, GLfixed nz);
+void GLTrace_glOrthoxOES(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
+void GLTrace_glPointParameterxOES(GLenum pname, GLfixed param);
+void GLTrace_glPointParameterxvOES(GLenum pname, const GLfixed *params);
+void GLTrace_glPointSizexOES(GLfixed size);
+void GLTrace_glPolygonOffsetxOES(GLfixed factor, GLfixed units);
+void GLTrace_glRotatexOES(GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
+void GLTrace_glSampleCoveragexOES(GLclampx value, GLboolean invert);
+void GLTrace_glScalexOES(GLfixed x, GLfixed y, GLfixed z);
+void GLTrace_glTexEnvxOES(GLenum target, GLenum pname, GLfixed param);
+void GLTrace_glTexEnvxvOES(GLenum target, GLenum pname, const GLfixed *params);
+void GLTrace_glTexParameterxOES(GLenum target, GLenum pname, GLfixed param);
+void GLTrace_glTexParameterxvOES(GLenum target, GLenum pname, const GLfixed *params);
+void GLTrace_glTranslatexOES(GLfixed x, GLfixed y, GLfixed z);
+GLboolean GLTrace_glIsRenderbufferOES(GLuint renderbuffer);
+void GLTrace_glBindRenderbufferOES(GLenum target, GLuint renderbuffer);
+void GLTrace_glDeleteRenderbuffersOES(GLsizei n, const GLuint* renderbuffers);
+void GLTrace_glGenRenderbuffersOES(GLsizei n, GLuint* renderbuffers);
+void GLTrace_glRenderbufferStorageOES(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+void GLTrace_glGetRenderbufferParameterivOES(GLenum target, GLenum pname, GLint* params);
+GLboolean GLTrace_glIsFramebufferOES(GLuint framebuffer);
+void GLTrace_glBindFramebufferOES(GLenum target, GLuint framebuffer);
+void GLTrace_glDeleteFramebuffersOES(GLsizei n, const GLuint* framebuffers);
+void GLTrace_glGenFramebuffersOES(GLsizei n, GLuint* framebuffers);
+GLenum GLTrace_glCheckFramebufferStatusOES(GLenum target);
+void GLTrace_glFramebufferRenderbufferOES(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+void GLTrace_glFramebufferTexture2DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+void GLTrace_glGetFramebufferAttachmentParameterivOES(GLenum target, GLenum attachment, GLenum pname, GLint* params);
+void GLTrace_glGenerateMipmapOES(GLenum target);
+void GLTrace_glCurrentPaletteMatrixOES(GLuint matrixpaletteindex);
+void GLTrace_glLoadPaletteFromModelViewMatrixOES(void);
+void GLTrace_glMatrixIndexPointerOES(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+void GLTrace_glWeightPointerOES(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+GLbitfield GLTrace_glQueryMatrixxOES(GLfixed mantissa[16], GLint exponent[16]);
+void GLTrace_glDepthRangefOES(GLclampf zNear, GLclampf zFar);
+void GLTrace_glFrustumfOES(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
+void GLTrace_glOrthofOES(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
+void GLTrace_glClipPlanefOES(GLenum plane, const GLfloat *equation);
+void GLTrace_glGetClipPlanefOES(GLenum pname, GLfloat eqn[4]);
+void GLTrace_glClearDepthfOES(GLclampf depth);
+void GLTrace_glTexGenfOES(GLenum coord, GLenum pname, GLfloat param);
+void GLTrace_glTexGenfvOES(GLenum coord, GLenum pname, const GLfloat *params);
+void GLTrace_glTexGeniOES(GLenum coord, GLenum pname, GLint param);
+void GLTrace_glTexGenivOES(GLenum coord, GLenum pname, const GLint *params);
+void GLTrace_glTexGenxOES(GLenum coord, GLenum pname, GLfixed param);
+void GLTrace_glTexGenxvOES(GLenum coord, GLenum pname, const GLfixed *params);
+void GLTrace_glGetTexGenfvOES(GLenum coord, GLenum pname, GLfloat *params);
+void GLTrace_glGetTexGenivOES(GLenum coord, GLenum pname, GLint *params);
+void GLTrace_glGetTexGenxvOES(GLenum coord, GLenum pname, GLfixed *params);
+void GLTrace_glClipPlanefIMG(GLenum p, const GLfloat *eqn);
+void GLTrace_glClipPlanexIMG(GLenum p, const GLfixed *eqn);
+
+
+}; // namespace gltrace
+}; // namespace android
diff --git a/opengl/libs/GLES_trace/src/gltrace_context.cpp b/opengl/libs/GLES_trace/src/gltrace_context.cpp
new file mode 100644
index 0000000..8cf5a51
--- /dev/null
+++ b/opengl/libs/GLES_trace/src/gltrace_context.cpp
@@ -0,0 +1,105 @@
+/*
+ * Copyright 2011, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <pthread.h>
+
+extern "C" {
+#include "liblzf/lzf.h"
+}
+
+#include "gltrace_context.h"
+
+namespace android {
+namespace gltrace {
+
+using ::android::gl_hooks_t;
+
+static pthread_key_t sTLSKey = -1;
+static pthread_once_t sPthreadOnceKey = PTHREAD_ONCE_INIT;
+
+void createTLSKey() {
+ pthread_key_create(&sTLSKey, NULL);
+}
+
+GLTraceContext *getGLTraceContext() {
+ return (GLTraceContext*) pthread_getspecific(sTLSKey);
+}
+
+void setGLTraceContext(GLTraceContext *c) {
+ pthread_setspecific(sTLSKey, c);
+}
+
+void initContext(unsigned version, gl_hooks_t *hooks) {
+ pthread_once(&sPthreadOnceKey, createTLSKey);
+
+ GLTraceContext *context = new GLTraceContext();
+ context->hooks = hooks;
+
+ setGLTraceContext(context);
+}
+
+void releaseContext() {
+ GLTraceContext *c = getGLTraceContext();
+ if (c != NULL) {
+ delete c;
+ setGLTraceContext(NULL);
+ }
+}
+
+GLTraceContext::GLTraceContext() {
+ fbcontents = fbcompressed = NULL;
+ fbcontentsSize = 0;
+}
+
+void GLTraceContext::resizeFBMemory(unsigned minSize) {
+ if (fbcontentsSize >= minSize) {
+ return;
+ }
+
+ if (fbcontents != NULL) {
+ free(fbcontents);
+ free(fbcompressed);
+ }
+
+ fbcontents = malloc(minSize);
+ fbcompressed = malloc(minSize);
+
+ fbcontentsSize = minSize;
+}
+
+/** obtain a pointer to the compressed framebuffer image */
+void GLTraceContext::getCompressedFB(void **fb, unsigned *fbsize, unsigned *fbwidth,
+ unsigned *fbheight) {
+ int viewport[4] = {};
+ hooks->gl.glGetIntegerv(GL_VIEWPORT, viewport);
+ unsigned fbContentsSize = viewport[2] * viewport[3] * 4;
+
+ resizeFBMemory(fbContentsSize);
+
+ //TODO: On eglSwapBuffer, read FB0. For glDraw calls, read currently
+ // bound FB.
+ //hooks->gl.glGetIntegerv(GL_FRAMEBUFFER_BINDING, &bound_fb);
+ //hooks->gl.glBindFramebuffer(GL_FRAMEBUFFER, 0);
+ hooks->gl.glReadPixels(viewport[0], viewport[1], viewport[2], viewport[3],
+ GL_RGBA, GL_UNSIGNED_BYTE, fbcontents);
+ *fbsize = lzf_compress(fbcontents, fbContentsSize, fbcompressed, fbContentsSize);
+ *fb = fbcompressed;
+ *fbwidth = viewport[2];
+ *fbheight = viewport[3];
+}
+
+}; // namespace gltrace
+}; // namespace android
diff --git a/opengl/libs/GLES_trace/src/gltrace_context.h b/opengl/libs/GLES_trace/src/gltrace_context.h
new file mode 100644
index 0000000..7dbbca4
--- /dev/null
+++ b/opengl/libs/GLES_trace/src/gltrace_context.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2011, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __GLTRACE_CONTEXT_H_
+#define __GLTRACE_CONTEXT_H_
+
+#include "hooks.h"
+
+namespace android {
+namespace gltrace {
+
+using ::android::gl_hooks_t;
+
+class GLTraceContext {
+ void *fbcontents; /* memory area to read framebuffer contents */
+ void *fbcompressed; /* destination for lzf compressed framebuffer */
+ unsigned fbcontentsSize; /* size of fbcontents & fbcompressed buffers */
+
+ void resizeFBMemory(unsigned minSize);
+public:
+ gl_hooks_t *hooks;
+
+ GLTraceContext();
+ void getCompressedFB(void **fb, unsigned *fbsize, unsigned *fbwidth, unsigned *fbheight);
+};
+
+GLTraceContext *getGLTraceContext();
+void setGLTraceContext(GLTraceContext *c);
+void initContext(unsigned version, gl_hooks_t *hooks);
+void releaseContext();
+
+};
+};
+
+#endif
diff --git a/opengl/libs/GLES_trace/src/gltrace_egl.cpp b/opengl/libs/GLES_trace/src/gltrace_egl.cpp
new file mode 100644
index 0000000..5d1f370
--- /dev/null
+++ b/opengl/libs/GLES_trace/src/gltrace_egl.cpp
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2011, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <cutils/log.h>
+
+#include "gltrace.pb.h"
+#include "gltrace_context.h"
+#include "gltrace_fixup.h"
+#include "gltrace_transport.h"
+
+namespace android {
+namespace gltrace {
+
+void GLTrace_eglSwapBuffers(void *dpy, void *draw) {
+ GLMessage glmessage;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmessage.set_context_id(1);
+ glmessage.set_function(GLMessage::eglSwapBuffers);
+
+ fixup_addFBContents(&glmessage);
+ traceGLMessage(&glmessage);
+}
+
+};
+};
diff --git a/opengl/libs/GLES_trace/src/gltrace_egl.h b/opengl/libs/GLES_trace/src/gltrace_egl.h
new file mode 100644
index 0000000..27a4837
--- /dev/null
+++ b/opengl/libs/GLES_trace/src/gltrace_egl.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2011, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __GLTRACE_EGL_H_
+#define __GLTRACE_EGL_H_
+
+namespace android {
+namespace gltrace {
+
+void GLTrace_eglSwapBuffers(void *dpy, void *draw);
+
+};
+};
+
+#endif
diff --git a/opengl/libs/GLES_trace/src/gltrace_eglapi.cpp b/opengl/libs/GLES_trace/src/gltrace_eglapi.cpp
new file mode 100644
index 0000000..3fe5f8b
--- /dev/null
+++ b/opengl/libs/GLES_trace/src/gltrace_eglapi.cpp
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2011, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdlib.h>
+#include <cutils/log.h>
+#include <cutils/properties.h>
+
+#include "hooks.h"
+#include "glestrace.h"
+
+#include "gltrace_context.h"
+#include "gltrace_egl.h"
+#include "gltrace_hooks.h"
+#include "gltrace_transport.h"
+
+namespace android {
+
+void GLTrace_eglMakeCurrent(const unsigned version, gl_hooks_t *hooks) {
+ gltrace::initContext(version, hooks);
+}
+
+void GLTrace_eglReleaseThread() {
+ gltrace::releaseContext();
+}
+
+void GLTrace_eglCreateContext(int version, EGLContext c) {
+ // TODO
+}
+
+void GLTrace_start() {
+ char value[PROPERTY_VALUE_MAX];
+
+ property_get("debug.egl.debug_port", value, "5039");
+ const unsigned short port = (unsigned short)atoi(value);
+
+ gltrace::startServer(port);
+}
+
+void GLTrace_stop() {
+ gltrace::stopServer();
+}
+
+gl_hooks_t *GLTrace_getGLHooks() {
+ return gltrace::getGLHooks();
+}
+
+void GLTrace_eglSwapBuffers(void *dpy, void *draw) {
+ gltrace::GLTrace_eglSwapBuffers(dpy, draw);
+}
+
+}
diff --git a/opengl/libs/GLES_trace/src/gltrace_fixup.cpp b/opengl/libs/GLES_trace/src/gltrace_fixup.cpp
new file mode 100644
index 0000000..90021f4
--- /dev/null
+++ b/opengl/libs/GLES_trace/src/gltrace_fixup.cpp
@@ -0,0 +1,314 @@
+/*
+ * Copyright 2011, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <cutils/log.h>
+#include <GLES2/gl2.h>
+
+#include "gltrace.pb.h"
+#include "gltrace_context.h"
+#include "gltrace_fixup.h"
+
+namespace android {
+namespace gltrace {
+
+unsigned getBytesPerTexel(const GLenum format, const GLenum type) {
+ /*
+ Description from glTexImage2D spec:
+
+ Data is read from data as a sequence of unsigned bytes or shorts, depending on type.
+ When type is GL_UNSIGNED_BYTE, each of the bytes is interpreted as one color component.
+ When type is one of GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_4_4_4_4, or
+ GL_UNSIGNED_SHORT_5_5_5_1, each unsigned short value is interpreted as containing all
+ the components for a single texel, with the color components arranged according to
+ format. Color components are treated as groups of one, two, three, or four values,
+ again based on format. Groups of components are referred to as texels.
+
+ width × height texels are read from memory, starting at location data. By default,
+ these texels are taken from adjacent memory locations, except that after all width
+ texels are read, the read pointer is advanced to the next four-byte boundary.
+ The four-byte row alignment is specified by glPixelStorei with argument
+ GL_UNPACK_ALIGNMENT, and it can be set to one, two, four, or eight bytes.
+ */
+
+ switch (type) {
+ case GL_UNSIGNED_SHORT_5_6_5:
+ case GL_UNSIGNED_SHORT_4_4_4_4:
+ case GL_UNSIGNED_SHORT_5_5_5_1:
+ return 2;
+ case GL_UNSIGNED_BYTE:
+ break;
+ default:
+ LOGE("GetBytesPerPixel: unknown type %x", type);
+ }
+
+ switch (format) {
+ case GL_ALPHA:
+ case GL_LUMINANCE:
+ return 1;
+ case GL_LUMINANCE_ALPHA:
+ return 2;
+ case GL_RGB:
+ return 3;
+ case GL_RGBA:
+ case 0x80E1: // GL_BGRA_EXT
+ return 4;
+ default:
+ LOGE("GetBytesPerPixel: unknown format %x", format);
+ }
+
+ return 1; // in doubt...
+}
+
+/** Generic helper function: extract pointer at argIndex and
+ replace it with the C style string at *pointer */
+void fixup_CStringPtr(int argIndex, GLMessage *glmsg) {
+ GLMessage_DataType *arg = glmsg->mutable_args(argIndex);
+ GLchar *ptr = (GLchar *)arg->intvalue(0);
+
+ arg->set_type(GLMessage::DataType::CHAR);
+ arg->set_isarray(true);
+ arg->add_charvalue(ptr);
+}
+
+void fixup_glGetString(GLMessage *glmsg) {
+ /* const GLubyte* GLTrace_glGetString(GLenum name) */
+ GLMessage_DataType *ret = glmsg->mutable_returnvalue();
+ GLchar *ptr = (GLchar *)ret->intvalue(0);
+
+ if (ptr != NULL) {
+ ret->set_type(GLMessage::DataType::CHAR);
+ ret->set_isarray(true);
+ ret->add_charvalue(ptr);
+ }
+}
+
+/* Add the contents of the framebuffer as an argument */
+void fixup_addFBContents(GLMessage *glmsg) {
+ GLMessage_DataType *arg_fb = glmsg->add_args(); /* Add the FB as the last argument */
+ GLTraceContext *glContext = getGLTraceContext();
+
+ void *fb;
+ unsigned fbsize, fbwidth, fbheight;
+ glContext->getCompressedFB(&fb, &fbsize, &fbwidth, &fbheight);
+
+ arg_fb->set_isarray(true);
+ arg_fb->set_type(GLMessage::DataType::BYTE);
+ arg_fb->add_rawbytes(fb, fbsize);
+ arg_fb->add_intvalue(fbwidth);
+ arg_fb->add_intvalue(fbheight);
+}
+
+void fixup_glTexImage2D(GLMessage *glmsg) {
+ /* void glTexImage2D(GLenum target,
+ GLint level,
+ GLint internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLint border,
+ GLenum format,
+ GLenum type,
+ const GLvoid *data);
+ */
+ GLMessage_DataType arg_width = glmsg->args(3);
+ GLMessage_DataType arg_height = glmsg->args(4);
+ GLMessage_DataType arg_format = glmsg->args(6);
+ GLMessage_DataType arg_type = glmsg->args(7);
+ GLMessage_DataType *arg_data = glmsg->mutable_args(8);
+
+ GLsizei width = arg_width.intvalue(0);
+ GLsizei height = arg_height.intvalue(0);
+ GLenum format = arg_format.intvalue(0);
+ GLenum type = arg_type.intvalue(0);
+ void *data = (void *)arg_data->intvalue(0);
+
+ int bytesPerTexel = getBytesPerTexel(format, type);
+
+ arg_data->set_type(GLMessage::DataType::BYTE);
+ arg_data->set_isarray(true);
+ arg_data->clear_rawbytes();
+
+ if (data != NULL) {
+ arg_data->add_rawbytes(data, bytesPerTexel * width * height);
+ } else {
+ LOGE("fixup_glTexImage2D: image data is NULL.\n");
+ arg_data->set_type(GLMessage::DataType::VOID);
+ // FIXME:
+ // This will create the texture, but it will be uninitialized.
+ // It can later be initialized with glTexSubImage2D or by
+ // attaching an FBO to it and rendering into the FBO.
+ }
+}
+
+void fixup_glShaderSource(GLMessage *glmsg) {
+ /* void glShaderSource(GLuint shader, GLsizei count, const GLchar** string,
+ const GLint* length) */
+ GLMessage_DataType arg_count = glmsg->args(1);
+ GLMessage_DataType arg_lenp = glmsg->args(3);
+ GLMessage_DataType *arg_strpp = glmsg->mutable_args(2);
+
+ GLsizei count = arg_count.intvalue(0);
+ GLchar **stringpp = (GLchar **)arg_strpp->intvalue(0);
+ GLint *lengthp = (GLint *)arg_lenp.intvalue(0);
+
+ arg_strpp->set_type(GLMessage::DataType::CHAR);
+ arg_strpp->set_isarray(true);
+ arg_strpp->clear_charvalue();
+
+ ::std::string src = "";
+ for (int i = 0; i < count; i++) {
+ if (lengthp != NULL)
+ src.append(*stringpp, *lengthp);
+ else
+ src.append(*stringpp); // assume null terminated
+ stringpp++;
+ lengthp++;
+ }
+
+ arg_strpp->add_charvalue(src);
+}
+
+void fixup_glUniformGeneric(int argIndex, int nFloats, GLMessage *glmsg) {
+ GLMessage_DataType *arg_values = glmsg->mutable_args(argIndex);
+ GLfloat *src = (GLfloat*)arg_values->intvalue(0);
+
+ arg_values->set_type(GLMessage::DataType::FLOAT);
+ arg_values->set_isarray(true);
+ arg_values->clear_floatvalue();
+
+ for (int i = 0; i < nFloats; i++) {
+ arg_values->add_floatvalue(*src++);
+ }
+}
+
+void fixup_glUniformMatrixGeneric(int matrixSize, GLMessage *glmsg) {
+ /* void glUniformMatrix?fv(GLint location, GLsizei count, GLboolean transpose,
+ const GLfloat* value) */
+ GLMessage_DataType arg_count = glmsg->args(1);
+ int n_matrices = arg_count.intvalue(0);
+ fixup_glUniformGeneric(3, matrixSize * matrixSize * n_matrices, glmsg);
+}
+
+void fixup_GenericIntArray(int argIndex, int nInts, GLMessage *glmsg) {
+ GLMessage_DataType *arg_intarray = glmsg->mutable_args(argIndex);
+ GLint *intp = (GLint *)arg_intarray->intvalue(0);
+
+ arg_intarray->set_type(GLMessage::DataType::INT);
+ arg_intarray->set_isarray(true);
+ arg_intarray->clear_intvalue();
+
+ for (int i = 0; i < nInts; i++, intp++) {
+ arg_intarray->add_intvalue(*intp);
+ }
+}
+
+void fixup_glGenGeneric(GLMessage *glmsg) {
+ /* void glGen*(GLsizei n, GLuint * buffers); */
+ GLMessage_DataType arg_n = glmsg->args(0);
+ GLsizei n = arg_n.intvalue(0);
+
+ fixup_GenericIntArray(1, n, glmsg);
+}
+
+void fixup_glGetBooleanv(GLMessage *glmsg) {
+ /* void glGetBooleanv(GLenum pname, GLboolean *params); */
+ GLMessage_DataType *arg_params = glmsg->mutable_args(1);
+ GLboolean *src = (GLboolean*)arg_params->intvalue(0);
+
+ arg_params->set_type(GLMessage::DataType::BOOL);
+ arg_params->set_isarray(true);
+ arg_params->clear_boolvalue();
+ arg_params->add_boolvalue(*src);
+}
+
+void fixup_glGetFloatv(GLMessage *glmsg) {
+ /* void glGetFloatv(GLenum pname, GLfloat *params); */
+ GLMessage_DataType *arg_params = glmsg->mutable_args(1);
+ GLfloat *src = (GLfloat*)arg_params->intvalue(0);
+
+ arg_params->set_type(GLMessage::DataType::FLOAT);
+ arg_params->set_isarray(true);
+ arg_params->clear_floatvalue();
+ arg_params->add_floatvalue(*src);
+}
+
+void fixupGLMessage(GLMessage *glmsg) {
+ switch (glmsg->function()) {
+ case GLMessage::glGenBuffers: /* void glGenBuffers(GLsizei n, GLuint * buffers); */
+ case GLMessage::glGenFramebuffers: /* void glGenFramebuffers(GLsizei n, GLuint * buffers); */
+ case GLMessage::glGenRenderbuffers: /* void glGenFramebuffers(GLsizei n, GLuint * buffers); */
+ case GLMessage::glGenTextures: /* void glGenTextures(GLsizei n, GLuint * buffers); */
+ fixup_glGenGeneric(glmsg);
+ break;
+ case GLMessage::glGetAttribLocation:
+ case GLMessage::glGetUniformLocation:
+ /* int glGetAttribLocation(GLuint program, const GLchar* name) */
+ /* int glGetUniformLocation(GLuint program, const GLchar* name) */
+ fixup_CStringPtr(1, glmsg);
+ break;
+ case GLMessage::glGetBooleanv:
+ fixup_glGetBooleanv(glmsg);
+ break;
+ case GLMessage::glGetFloatv:
+ fixup_glGetFloatv(glmsg);
+ break;
+ case GLMessage::glGetIntegerv: /* void glGetIntegerv(GLenum pname, GLint *params); */
+ fixup_GenericIntArray(1, 1, glmsg);
+ break;
+ case GLMessage::glGetProgramiv:
+ case GLMessage::glGetRenderbufferParameteriv:
+ case GLMessage::glGetShaderiv:
+ /* void glGetProgramiv(GLuint program, GLenum pname, GLint* params) */
+ /* void glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params) */
+ /* void glGetShaderiv(GLuint shader, GLenum pname, GLint* params) */
+ fixup_GenericIntArray(2, 1, glmsg);
+ break;
+ case GLMessage::glGetString:
+ fixup_glGetString(glmsg);
+ break;
+ case GLMessage::glTexImage2D:
+ fixup_glTexImage2D(glmsg);
+ break;
+ case GLMessage::glShaderSource:
+ fixup_glShaderSource(glmsg);
+ break;
+ case GLMessage::glUniformMatrix2fv:
+ /* void glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose,
+ const GLfloat* value) */
+ fixup_glUniformMatrixGeneric(2, glmsg);
+ break;
+ case GLMessage::glUniformMatrix3fv:
+ /* void glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose,
+ const GLfloat* value) */
+ fixup_glUniformMatrixGeneric(3, glmsg);
+ break;
+ case GLMessage::glUniformMatrix4fv:
+ /* void glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose,
+ const GLfloat* value) */
+ fixup_glUniformMatrixGeneric(4, glmsg);
+ break;
+ case GLMessage::glDrawArrays:
+ case GLMessage::glDrawElements:
+ /* void glDrawArrays(GLenum mode, GLint first, GLsizei count) */
+ /* void glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices) */
+ fixup_addFBContents(glmsg);
+ break;
+ default:
+ break;
+ }
+}
+
+};
+};
diff --git a/opengl/libs/GLES_trace/src/gltrace_fixup.h b/opengl/libs/GLES_trace/src/gltrace_fixup.h
new file mode 100644
index 0000000..bf15a88
--- /dev/null
+++ b/opengl/libs/GLES_trace/src/gltrace_fixup.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2011, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "gltrace.pb.h"
+
+#ifndef __GLTRACE_FIXUP_H_
+#define __GLTRACE_FIXUP_H_
+
+namespace android {
+namespace gltrace {
+
+void fixupGLMessage(GLMessage *message);
+void fixup_addFBContents(GLMessage *message);
+
+};
+};
+
+#endif
diff --git a/opengl/libs/GLES_trace/src/gltrace_hooks.cpp b/opengl/libs/GLES_trace/src/gltrace_hooks.cpp
new file mode 100644
index 0000000..de8d463
--- /dev/null
+++ b/opengl/libs/GLES_trace/src/gltrace_hooks.cpp
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2011, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "hooks.h"
+#include "gltrace_api.h"
+#include "gltrace_hooks.h"
+
+namespace android {
+namespace gltrace {
+
+// Hook up all the GLTrace functions
+#define GL_ENTRY(_r, _api, ...) GLTrace_ ## _api,
+EGLAPI gl_hooks_t gHooksDebug = {
+ {
+ #include "entries.in"
+ },
+ {
+ {0}
+ }
+};
+#undef GL_ENTRY
+
+gl_hooks_t *getGLHooks() {
+ return &gHooksDebug;
+}
+
+};
+};
diff --git a/opengl/libs/GLES_trace/src/gltrace_hooks.h b/opengl/libs/GLES_trace/src/gltrace_hooks.h
new file mode 100644
index 0000000..c946a09
--- /dev/null
+++ b/opengl/libs/GLES_trace/src/gltrace_hooks.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2011, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __GLD_HOOKS_H_
+#define __GLD_HOOKS_H_
+
+#include "hooks.h"
+
+namespace android {
+namespace gltrace {
+
+using ::android::gl_hooks_t;
+
+gl_hooks_t *getGLHooks();
+
+};
+};
+
+#endif
diff --git a/opengl/libs/GLES_trace/src/gltrace_transport.cpp b/opengl/libs/GLES_trace/src/gltrace_transport.cpp
new file mode 100644
index 0000000..c52ca5f
--- /dev/null
+++ b/opengl/libs/GLES_trace/src/gltrace_transport.cpp
@@ -0,0 +1,113 @@
+/*
+ * Copyright 2011, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdlib.h>
+#include <unistd.h>
+
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+#include <cutils/log.h>
+
+#include "gltrace_transport.h"
+
+namespace android {
+namespace gltrace {
+
+int gServerSocket, gClientSocket;
+
+void startServer(int port) {
+ if (gServerSocket > 0) {
+ LOGD("startServer: server socket already open!");
+ return;
+ }
+
+ gServerSocket = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
+ if (gServerSocket < 0) {
+ LOGE("Error (%d) while creating socket. Check if app has network permissions.",
+ gServerSocket);
+ exit(-1);
+ }
+
+ struct sockaddr_in server, client;
+
+ server.sin_family = AF_INET;
+ server.sin_addr.s_addr = htonl(INADDR_ANY);
+ server.sin_port = htons(port);
+
+ socklen_t sockaddr_len = sizeof(sockaddr_in);
+ if (bind(gServerSocket, (struct sockaddr *) &server, sizeof(server)) < 0) {
+ close(gServerSocket);
+ LOGE("Failed to bind the server socket");
+ exit(-1);
+ }
+
+ if (listen(gServerSocket, 1) < 0) {
+ close(gServerSocket);
+ LOGE("Failed to listen on server socket");
+ exit(-1);
+ }
+
+ LOGD("startServer: server started on %d", port);
+
+ /* Wait for client connection */
+ if ((gClientSocket = accept(gServerSocket, (struct sockaddr *)&client, &sockaddr_len)) < 0) {
+ close(gServerSocket);
+ LOGE("Failed to accept client connection");
+ exit(-1);
+ }
+
+ LOGD("startServer: client connected: %s", inet_ntoa(client.sin_addr));
+}
+
+void stopServer() {
+ if (gServerSocket > 0) {
+ close(gServerSocket);
+ close(gClientSocket);
+ gServerSocket = gClientSocket = 0;
+ }
+}
+
+/** Send GLMessage to the receiver on the host. */
+void traceGLMessage(GLMessage *call) {
+ if (gClientSocket <= 0) {
+ LOGE("traceGLMessage: Attempt to send while client connection is not established");
+ return;
+ }
+
+ std::string str;
+ call->SerializeToString(&str);
+ const uint32_t len = str.length();
+
+ int n = write(gClientSocket, &len, sizeof len);
+ if (n != sizeof len) {
+ LOGE("traceGLMessage: Error (%d) while writing message length\n", n);
+ stopServer();
+ exit(-1);
+ }
+
+ n = write(gClientSocket, str.data(), str.length());
+ if (n != (int) str.length()) {
+ LOGE("traceGLMessage: Error while writing out message, result = %d, length = %d\n",
+ n, str.length());
+ stopServer();
+ exit(-1);
+ }
+}
+
+}; // namespace gltrace
+}; // namespace android
diff --git a/opengl/libs/GLES_trace/src/gltrace_transport.h b/opengl/libs/GLES_trace/src/gltrace_transport.h
new file mode 100644
index 0000000..a0d89be
--- /dev/null
+++ b/opengl/libs/GLES_trace/src/gltrace_transport.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2011, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __GLTRACE_TRANSPORT_H_
+#define __GLTRACE_TRANSPORT_H_
+
+#include "gltrace.pb.h"
+
+namespace android {
+namespace gltrace {
+
+void startServer(int port);
+void stopServer();
+
+void traceGLMessage(GLMessage *msg);
+
+};
+};
+
+#endif
diff --git a/opengl/libs/GLES_trace/tools/genapi.py b/opengl/libs/GLES_trace/tools/genapi.py
new file mode 100755
index 0000000..3c47a5f
--- /dev/null
+++ b/opengl/libs/GLES_trace/tools/genapi.py
@@ -0,0 +1,386 @@
+#!/usr/bin/env python
+#
+# Copyright (C) 2011 Google Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# ABOUT
+# This script is used to generate the trace implementations of all
+# OpenGL calls. When executed, it reads the specs for the OpenGL calls
+# from the files GLES2/gl2_api.in, GLES2/gl2ext_api.in, GLES_CM/gl_api.in,
+# and GLES_CM/glext_api.in, and generates trace versions for all the
+# defined functions.
+#
+# PREREQUISITES
+# To generate C++ files, this script uses the 'pyratemp' template
+# module. The only reason to use pyratemp is that it is extremly
+# simple to install:
+# $ wget http://www.simple-is-better.org/template/pyratemp-current/pyratemp.py
+# Put the file in the GLES2_trace/tools folder, or update PYTHONPATH
+# to point to wherever it was downloaded.
+#
+# USAGE
+# $ cd GLES2_trace - run the program from GLES2_trace folder
+# $ ./tools/genapi.py - generates a .cpp and .h file
+# $ mv *.cpp *.h src/ - move the generated files into the src folder
+
+import sys
+import re
+import pyratemp
+
+# Constants corresponding to the protobuf DataType.Type
+class DataType:
+ def __init__(self, name):
+ self.name = name
+
+ def __str__(self):
+ if self.name == "pointer": # pointers map to the INT DataType
+ return "INT"
+ return self.name.upper()
+
+ def getProtobufCall(self):
+ if self.name == "void":
+ raise ValueError("Attempt to set void value")
+ elif self.name == "char" or self.name == "byte" \
+ or self.name == "pointer" or self.name == "enum":
+ return "add_intvalue((int)"
+ elif self.name == "int":
+ return "add_intvalue("
+ elif self.name == "float":
+ return "add_floatvalue("
+ elif self.name == "bool":
+ return "add_boolvalue("
+ else:
+ raise ValueError("Unknown value type %s" % self.name)
+
+DataType.VOID = DataType("void")
+DataType.CHAR = DataType("char")
+DataType.BYTE = DataType("byte")
+DataType.ENUM = DataType("enum")
+DataType.BOOL = DataType("bool")
+DataType.INT = DataType("int")
+DataType.FLOAT = DataType("float")
+DataType.POINTER = DataType("pointer")
+
+# mapping of GL types to protobuf DataType
+GL2PROTOBUF_TYPE_MAP = {
+ "GLvoid":DataType.VOID,
+ "void":DataType.VOID,
+ "GLchar":DataType.CHAR,
+ "GLenum":DataType.ENUM,
+ "GLboolean":DataType.BOOL,
+ "GLbitfield":DataType.INT,
+ "GLbyte":DataType.BYTE,
+ "GLshort":DataType.INT,
+ "GLint":DataType.INT,
+ "int":DataType.INT,
+ "GLsizei":DataType.INT,
+ "GLubyte":DataType.BYTE,
+ "GLushort":DataType.INT,
+ "GLuint":DataType.INT,
+ "GLfloat":DataType.FLOAT,
+ "GLclampf":DataType.FLOAT,
+ "GLfixed":DataType.INT,
+ "GLclampx":DataType.INT,
+ "GLsizeiptr":DataType.POINTER,
+ "GLintptr":DataType.POINTER,
+ "GLeglImageOES":DataType.POINTER,
+}
+
+API_SPECS = [
+ ('GL2','../GLES2/gl2_api.in'),
+ ('GL2Ext','../GLES2/gl2ext_api.in'),
+ ('GL1','../GLES_CM/gl_api.in'),
+ ('GL1Ext','../GLES_CM/glext_api.in'),
+]
+
+HEADER_TEXT = """/*
+ * Copyright 2011, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * THIS FILE WAS GENERATED BY A SCRIPT. DO NOT EDIT.
+ */
+
+#include <cutils/log.h>
+#include <GLES2/gl2.h>
+
+#include "gltrace.pb.h"
+#include "gltrace_context.h"
+#include "gltrace_fixup.h"
+#include "gltrace_transport.h"
+
+namespace android {
+namespace gltrace {
+
+"""
+
+FOOTER_TEXT = """
+
+}; // namespace gltrace
+}; // namespace android
+"""
+
+TRACE_CALL_TEMPLATE = pyratemp.Template(
+"""$!retType!$ GLTrace_$!func!$($!inputArgList!$) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_context_id(1);
+ glmsg.set_function(GLMessage::$!func!$);
+<!--(if len(parsedArgs) > 0)-->
+ <!--(for argname, argtype in parsedArgs)-->
+
+ // copy argument $!argname!$
+ GLMessage_DataType *arg_$!argname!$ = glmsg.add_args();
+ arg_$!argname!$->set_isarray(false);
+ arg_$!argname!$->set_type(GLMessage::DataType::$!argtype!$);
+ arg_$!argname!$->$!argtype.getProtobufCall()!$$!argname!$);
+ <!--(end)-->
+<!--(end)-->
+
+ // call function
+<!--(if retType != "void")-->
+ $!retType!$ retValue = glContext->hooks->gl.$!callsite!$;
+<!--(else)-->
+ glContext->hooks->gl.$!callsite!$;
+<!--(end)-->
+<!--(if retType != "void")-->
+
+ // set return value
+ GLMessage_DataType *rt = glmsg.mutable_returnvalue();
+ rt->set_isarray(false);
+ rt->set_type(GLMessage::DataType::$!retDataType!$);
+ rt->$!retDataType.getProtobufCall()!$retValue);
+<!--(end)-->
+
+ fixupGLMessage(&glmsg);
+ traceGLMessage(&glmsg);
+<!--(if retType != "void")-->
+
+ return retValue;
+<!--(end)-->
+}
+""")
+
+def getDataTypeFromKw(kw):
+ """ Get the data type given declaration.
+ All pointer declarations are of type DataType.POINTER
+
+ e.g.: GLvoid -> DataType.VOID"""
+
+ if kw.count('*') > 0:
+ return DataType.POINTER
+ return GL2PROTOBUF_TYPE_MAP.get(kw)
+
+def getNameTypePair(decl):
+ """ Split declaration of a variable to a tuple of (variable name, DataType).
+ e.g. "const GLChar* varName" -> (varName, POINTER) """
+ elements = decl.strip().split(' ')
+ name = None
+ if len(elements) > 1:
+ name = " ".join(elements[-1:]).strip() # last element is the name
+ dataType = " ".join(elements[:-1]).strip() # everything else is the data type
+
+ # if name is a pointer (e.g. "*ptr"), then remove the "*" from the name
+ # and add it to the data type
+ pointersInName = name.count("*")
+ if pointersInName > 0:
+ name = name.replace("*", "")
+ dataType += "*" * pointersInName
+
+ # if name is an array (e.g. "array[10]"), then remove the "[X]" from the name
+ # and make the datatype to be a pointer
+ arraysInName = name.count("[")
+ if arraysInName > 0:
+ name = name.split('[')[0]
+ dataType += "*"
+ else:
+ dataType = elements[0]
+ return (name, getDataTypeFromKw(dataType))
+
+def parseArgs(arglist):
+ """ Parse the argument list into a list of (var name, DataType) tuples """
+ args = arglist.split(',')
+ args = map(lambda x: x.strip(), args) # remove unnecessary whitespaces
+ argtypelist = map(getNameTypePair, args) # split arg into arg type and arg name
+ if len(argtypelist) == 1:
+ (name, argtype) = argtypelist[0]
+ if argtype == DataType.VOID:
+ return []
+
+ return argtypelist
+
+class ApiCall(object):
+ """An ApiCall models all information about a single OpenGL API"""
+
+ # Regex to match API_ENTRY specification:
+ # e.g. void API_ENTRY(glActiveTexture)(GLenum texture) {
+ # the regex uses a non greedy match (?) to match the first closing paren
+ API_ENTRY_REGEX = "(.*)API_ENTRY\(.*?\)\((.*?)\)"
+
+ # Regex to match CALL_GL_API specification:
+ # e.g. CALL_GL_API(glCullFace, mode);
+ # CALL_GL_API_RETURN(glCreateProgram);
+ CALL_GL_API_REGEX = "CALL_GL_API(_RETURN)?\((.*)\);"
+
+ def __init__(self, prefix, apientry, callsite):
+ """Construct an ApiCall from its specification.
+
+ The specification is provided by the two arguments:
+ prefix: prefix to use for function names
+ defn: specification line containing API_ENTRY macro
+ e.g: void API_ENTRY(glActiveTexture)(GLenum texture) {
+ callsite: specification line containing CALL_GL_API macro
+ e.g: CALL_GL_API(glActiveTexture, texture);
+ """
+ self.prefix = prefix
+ self.ret = self.getReturnType(apientry)
+ self.arglist = self.getArgList(apientry)
+
+ # some functions (e.g. __glEGLImageTargetRenderbufferStorageOES), define their
+ # names one way in the API_ENTRY and another way in the CALL_GL_API macros.
+ # so self.func is reassigned based on what is there in the call site
+ self.func = self.getFunc(callsite)
+ self.callsite = self.getCallSite(callsite)
+
+ def getReturnType(self, apientry):
+ '''Extract the return type from the API_ENTRY specification'''
+ m = re.search(self.API_ENTRY_REGEX, apientry)
+ if not m:
+ raise ValueError("%s does not match API_ENTRY specification %s"
+ % (apientry, self.API_ENTRY_REGEX))
+
+ return m.group(1).strip()
+
+ def getArgList(self, apientry):
+ '''Extract the argument list from the API_ENTRY specification'''
+ m = re.search(self.API_ENTRY_REGEX, apientry)
+ if not m:
+ raise ValueError("%s does not match API_ENTRY specification %s"
+ % (apientry, self.API_ENTRY_REGEX))
+
+ return m.group(2).strip()
+
+ def parseCallSite(self, callsite):
+ m = re.search(self.CALL_GL_API_REGEX, callsite)
+ if not m:
+ raise ValueError("%s does not match CALL_GL_API specification (%s)"
+ % (callsite, self.CALL_GL_API_REGEX))
+
+ arglist = m.group(2)
+ args = arglist.split(',')
+ args = map(lambda x: x.strip(), args)
+
+ return args
+
+ def getCallSite(self, callsite):
+ '''Extract the callsite from the CALL_GL_API specification'''
+ args = self.parseCallSite(callsite)
+ return "%s(%s)" % (args[0], ", ".join(args[1:]))
+
+ def getFunc(self, callsite):
+ '''Extract the function name from the CALL_GL_API specification'''
+ args = self.parseCallSite(callsite)
+ return args[0]
+
+ def genDeclaration(self):
+ return "%s GLTrace_%s(%s);" % (self.ret, self.func, self.arglist)
+
+ def genCode(self):
+ return TRACE_CALL_TEMPLATE(func = self.func,
+ retType = self.ret,
+ retDataType = getDataTypeFromKw(self.ret),
+ inputArgList = self.arglist,
+ callsite = self.callsite,
+ parsedArgs = parseArgs(self.arglist),
+ DataType=DataType)
+
+def getApis(apiEntryFile, prefix):
+ '''Get a list of all ApiCalls in provided specification file'''
+ lines = open(apiEntryFile).readlines()
+
+ apis = []
+ for i in range(0, len(lines)/3):
+ apis.append(ApiCall(prefix, lines[i*3], lines[i*3+1]))
+
+ return apis
+
+def parseAllSpecs(specs):
+ apis = []
+ for name, specfile in specs:
+ a = getApis(specfile, name)
+ print 'Parsed %s APIs from %s, # of entries = %d' % (name, specfile, len(a))
+ apis.extend(a)
+ return apis
+
+def removeDuplicates(apis):
+ '''Remove all duplicate function entries.
+
+ The input list contains functions declared in GL1 and GL2 APIs.
+ This will return a list that contains only the first function if there are
+ multiple functions with the same name.'''
+ uniqs = []
+ funcs = set()
+ for api in apis:
+ if api.func not in funcs:
+ uniqs.append(api)
+ funcs.add(api.func)
+
+ return uniqs
+
+def genHeaders(apis, fname):
+ lines = []
+ lines.append(HEADER_TEXT)
+ prefix = ""
+ for api in apis:
+ if prefix != api.prefix:
+ lines.append("\n// Declarations for %s APIs\n\n" % api.prefix)
+ prefix = api.prefix
+ lines.append(api.genDeclaration())
+ lines.append("\n")
+ lines.append(FOOTER_TEXT)
+
+ with open(fname, "w") as f:
+ f.writelines(lines)
+
+def genSrcs(apis, fname):
+ lines = []
+ lines.append(HEADER_TEXT)
+ prefix = ""
+ for api in apis:
+ if prefix != api.prefix:
+ lines.append("\n// Definitions for %s APIs\n\n" % api.prefix)
+ prefix = api.prefix
+ lines.append(api.genCode())
+ lines.append("\n")
+ lines.append(FOOTER_TEXT)
+
+ with open(fname, "w") as f:
+ f.writelines(lines)
+
+if __name__ == '__main__':
+ apis = parseAllSpecs(API_SPECS) # read in all the specfiles
+ apis = removeDuplicates(apis) # remove duplication of functions common to GL1 and GL2
+ genHeaders(apis, 'gltrace_api.h') # generate header file
+ genSrcs(apis, 'gltrace_api.cpp') # generate source file
diff --git a/opengl/libs/GLES_trace/tools/testgenapi.py b/opengl/libs/GLES_trace/tools/testgenapi.py
new file mode 100644
index 0000000..58a12a8
--- /dev/null
+++ b/opengl/libs/GLES_trace/tools/testgenapi.py
@@ -0,0 +1,66 @@
+#!/usr/bin/env python
+#
+# Copyright (C) 2011 Google Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# USAGE
+# $ cd GLES2_trace/tools
+# $ python testgenapi.py
+
+import unittest
+from genapi import DataType, ApiCall, getApis, parseArgs
+
+class TestApiCall(unittest.TestCase):
+ def test_parsing(self):
+ apientry = 'void API_ENTRY(glCopyTexSubImage2D)(GLenum target, GLint level, ' \
+ 'GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, ' \
+ 'GLsizei height) {'
+ callsite = 'CALL_GL_API(glCopyTexImage2D, target, level, internalformat, x, y,' \
+ 'width, height, border);'
+
+ api = ApiCall("GL", apientry, callsite)
+ self.assertEqual(api.func, "glCopyTexImage2D")
+ self.assertEqual(api.callsite, 'glCopyTexImage2D(target, level, internalformat, ' \
+ 'x, y, width, height, border)')
+ self.assertEqual(api.ret, 'void')
+ self.assertEqual(api.arglist, 'GLenum target, GLint level, ' \
+ 'GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, ' \
+ 'GLsizei height')
+
+ def test_num_functions_parsed(self):
+ gl2_apis = getApis('../../GLES2/gl2_api.in', 'GL2')
+ gl2ext_apis = getApis('../../GLES2/gl2ext_api.in', 'GL2Ext')
+ gl_apis = getApis('../../GLES_CM/gl_api.in', "GL1")
+ glext_apis = getApis('../../GLES_CM/glext_api.in', 'GL1Ext')
+
+ self.assertEqual(len(gl2_apis), 142)
+ self.assertEqual(len(gl2ext_apis), 60)
+ self.assertEqual(len(gl_apis), 145)
+ self.assertEqual(len(glext_apis), 126)
+
+ def test_parseArgs(self):
+ args = parseArgs("void")
+ self.assertEqual(len(args), 0)
+
+ args = parseArgs("GLchar a")
+ self.assertEqual(args, [("a", DataType.CHAR)])
+
+ args = parseArgs("GLchar *a")
+ self.assertEqual(args, [("a", DataType.POINTER)])
+
+ args = parseArgs("GLint exponent[16]")
+ self.assertEqual(args, [("exponent", DataType.POINTER)])
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/opengl/libs/glestrace.h b/opengl/libs/glestrace.h
new file mode 100644
index 0000000..5cfacd4
--- /dev/null
+++ b/opengl/libs/glestrace.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2011, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * This file declares the API provided by the glestrace library.
+ */
+
+#ifndef _GLES_TRACE_H_
+#define _GLES_TRACE_H_
+
+#include "hooks.h"
+
+namespace android {
+
+/* Hooks to be called by "interesting" EGL functions. */
+void GLTrace_eglCreateContext(int version, EGLContext c);
+void GLTrace_eglMakeCurrent(unsigned version, gl_hooks_t *hooks);
+void GLTrace_eglReleaseThread();
+void GLTrace_eglSwapBuffers(void*, void*);
+
+/* Start and stop GL Tracing. */
+void GLTrace_start();
+void GLTrace_stop();
+
+/* Obtain the gl_hooks structure filled with the trace implementation for all GL functions. */
+gl_hooks_t *GLTrace_getGLHooks();
+
+};
+
+#endif
diff --git a/opengl/libs/glesv2dbg.h b/opengl/libs/glesv2dbg.h
deleted file mode 100644
index 44bc288..0000000
--- a/opengl/libs/glesv2dbg.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- ** Copyright 2011, The Android Open Source Project
- **
- ** Licensed under the Apache License, Version 2.0 (the "License");
- ** you may not use this file except in compliance with the License.
- ** You may obtain a copy of the License at
- **
- ** http://www.apache.org/licenses/LICENSE-2.0
- **
- ** Unless required by applicable law or agreed to in writing, software
- ** distributed under the License is distributed on an "AS IS" BASIS,
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ** See the License for the specific language governing permissions and
- ** limitations under the License.
- */
-
-#ifndef _GLESV2_DBG_H_
-#define _GLESV2_DBG_H_
-
-#include <pthread.h>
-
-namespace android
-{
-struct DbgContext;
-
-DbgContext* CreateDbgContext(const unsigned version, const gl_hooks_t * const hooks);
-
-void dbgReleaseThread();
-
-// create and bind socket if haven't already, if failed to create socket or
-// forceUseFile, then open /data/local/tmp/dump.gles2dbg, exit when size reached
-void StartDebugServer(const unsigned short port, const bool forceUseFile,
- const unsigned int maxFileSize, const char * const filePath);
-void StopDebugServer(); // close socket if open
-
-}; // namespace android
-
-#endif // #ifndef _GLESV2_DBG_H_
diff --git a/opengl/libs/glesv2dbg_functions.h b/opengl/libs/glesv2dbg_functions.h
deleted file mode 100644
index 2d70032..0000000
--- a/opengl/libs/glesv2dbg_functions.h
+++ /dev/null
@@ -1,381 +0,0 @@
-extern "C"
-{
-GL_ENTRY(void, glActiveTexture, GLenum texture)
-GL_ENTRY(void, glAlphaFunc, GLenum func, GLclampf ref)
-GL_ENTRY(void, glAlphaFuncx, GLenum func, GLclampx ref)
-GL_ENTRY(void, glAlphaFuncxOES, GLenum func, GLclampx ref)
-GL_ENTRY(void, glAttachShader, GLuint program, GLuint shader)
-GL_ENTRY(void, glBeginPerfMonitorAMD, GLuint monitor)
-GL_ENTRY(void, glBindAttribLocation, GLuint program, GLuint index, const GLchar* name)
-GL_ENTRY(void, glBindBuffer, GLenum target, GLuint buffer)
-GL_ENTRY(void, glBindFramebuffer, GLenum target, GLuint framebuffer)
-GL_ENTRY(void, glBindFramebufferOES, GLenum target, GLuint framebuffer)
-GL_ENTRY(void, glBindRenderbuffer, GLenum target, GLuint renderbuffer)
-GL_ENTRY(void, glBindRenderbufferOES, GLenum target, GLuint renderbuffer)
-GL_ENTRY(void, glBindTexture, GLenum target, GLuint texture)
-GL_ENTRY(void, glBindVertexArrayOES, GLuint array)
-GL_ENTRY(void, glBlendColor, GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
-GL_ENTRY(void, glBlendEquation, GLenum mode )
-GL_ENTRY(void, glBlendEquationOES, GLenum mode)
-GL_ENTRY(void, glBlendEquationSeparate, GLenum modeRGB, GLenum modeAlpha)
-GL_ENTRY(void, glBlendEquationSeparateOES, GLenum modeRGB, GLenum modeAlpha)
-GL_ENTRY(void, glBlendFunc, GLenum sfactor, GLenum dfactor)
-GL_ENTRY(void, glBlendFuncSeparate, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
-GL_ENTRY(void, glBlendFuncSeparateOES, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
-GL_ENTRY(void, glBufferData, GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage)
-GL_ENTRY(void, glBufferSubData, GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data)
-GL_ENTRY(GLenum, glCheckFramebufferStatus, GLenum target)
-GL_ENTRY(GLenum, glCheckFramebufferStatusOES, GLenum target)
-GL_ENTRY(void, glClear, GLbitfield mask)
-GL_ENTRY(void, glClearColor, GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
-GL_ENTRY(void, glClearColorx, GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha)
-GL_ENTRY(void, glClearColorxOES, GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha)
-GL_ENTRY(void, glClearDepthf, GLclampf depth)
-GL_ENTRY(void, glClearDepthfOES, GLclampf depth)
-GL_ENTRY(void, glClearDepthx, GLclampx depth)
-GL_ENTRY(void, glClearDepthxOES, GLclampx depth)
-GL_ENTRY(void, glClearStencil, GLint s)
-GL_ENTRY(void, glClientActiveTexture, GLenum texture)
-GL_ENTRY(void, glClipPlanef, GLenum plane, const GLfloat *equation)
-GL_ENTRY(void, glClipPlanefIMG, GLenum p, const GLfloat *eqn)
-GL_ENTRY(void, glClipPlanefOES, GLenum plane, const GLfloat *equation)
-GL_ENTRY(void, glClipPlanex, GLenum plane, const GLfixed *equation)
-GL_ENTRY(void, glClipPlanexIMG, GLenum p, const GLfixed *eqn)
-GL_ENTRY(void, glClipPlanexOES, GLenum plane, const GLfixed *equation)
-GL_ENTRY(void, glColor4f, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
-GL_ENTRY(void, glColor4ub, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
-GL_ENTRY(void, glColor4x, GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)
-GL_ENTRY(void, glColor4xOES, GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)
-GL_ENTRY(void, glColorMask, GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
-GL_ENTRY(void, glColorPointer, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
-GL_ENTRY(void, glCompileShader, GLuint shader)
-GL_ENTRY(void, glCompressedTexImage2D, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data)
-GL_ENTRY(void, glCompressedTexImage3DOES, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data)
-GL_ENTRY(void, glCompressedTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data)
-GL_ENTRY(void, glCompressedTexSubImage3DOES, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data)
-GL_ENTRY(void, glCopyTexImage2D, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
-GL_ENTRY(void, glCopyTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
-GL_ENTRY(void, glCopyTexSubImage3DOES, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
-GL_ENTRY(void, glCoverageMaskNV, GLboolean mask)
-GL_ENTRY(void, glCoverageOperationNV, GLenum operation)
-GL_ENTRY(GLuint, glCreateProgram, void)
-GL_ENTRY(GLuint, glCreateShader, GLenum type)
-GL_ENTRY(void, glCullFace, GLenum mode)
-GL_ENTRY(void, glCurrentPaletteMatrixOES, GLuint matrixpaletteindex)
-GL_ENTRY(void, glDeleteBuffers, GLsizei n, const GLuint *buffers)
-GL_ENTRY(void, glDeleteFencesNV, GLsizei n, const GLuint *fences)
-GL_ENTRY(void, glDeleteFramebuffers, GLsizei n, const GLuint* framebuffers)
-GL_ENTRY(void, glDeleteFramebuffersOES, GLsizei n, const GLuint* framebuffers)
-GL_ENTRY(void, glDeletePerfMonitorsAMD, GLsizei n, GLuint *monitors)
-GL_ENTRY(void, glDeleteProgram, GLuint program)
-GL_ENTRY(void, glDeleteRenderbuffers, GLsizei n, const GLuint* renderbuffers)
-GL_ENTRY(void, glDeleteRenderbuffersOES, GLsizei n, const GLuint* renderbuffers)
-GL_ENTRY(void, glDeleteShader, GLuint shader)
-GL_ENTRY(void, glDeleteTextures, GLsizei n, const GLuint *textures)
-GL_ENTRY(void, glDeleteVertexArraysOES, GLsizei n, const GLuint *arrays)
-GL_ENTRY(void, glDepthFunc, GLenum func)
-GL_ENTRY(void, glDepthMask, GLboolean flag)
-GL_ENTRY(void, glDepthRangef, GLclampf zNear, GLclampf zFar)
-GL_ENTRY(void, glDepthRangefOES, GLclampf zNear, GLclampf zFar)
-GL_ENTRY(void, glDepthRangex, GLclampx zNear, GLclampx zFar)
-GL_ENTRY(void, glDepthRangexOES, GLclampx zNear, GLclampx zFar)
-GL_ENTRY(void, glDetachShader, GLuint program, GLuint shader)
-GL_ENTRY(void, glDisable, GLenum cap)
-GL_ENTRY(void, glDisableClientState, GLenum array)
-GL_ENTRY(void, glDisableDriverControlQCOM, GLuint driverControl)
-GL_ENTRY(void, glDisableVertexAttribArray, GLuint index)
-GL_ENTRY(void, glDiscardFramebufferEXT, GLenum target, GLsizei numAttachments, const GLenum *attachments)
-GL_ENTRY(void, glDrawArrays, GLenum mode, GLint first, GLsizei count)
-GL_ENTRY(void, glDrawElements, GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
-GL_ENTRY(void, glDrawTexfOES, GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height)
-GL_ENTRY(void, glDrawTexfvOES, const GLfloat *coords)
-GL_ENTRY(void, glDrawTexiOES, GLint x, GLint y, GLint z, GLint width, GLint height)
-GL_ENTRY(void, glDrawTexivOES, const GLint *coords)
-GL_ENTRY(void, glDrawTexsOES, GLshort x, GLshort y, GLshort z, GLshort width, GLshort height)
-GL_ENTRY(void, glDrawTexsvOES, const GLshort *coords)
-GL_ENTRY(void, glDrawTexxOES, GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height)
-GL_ENTRY(void, glDrawTexxvOES, const GLfixed *coords)
-GL_ENTRY(void, glEGLImageTargetRenderbufferStorageOES, GLenum target, GLeglImageOES image)
-GL_ENTRY(void, glEGLImageTargetTexture2DOES, GLenum target, GLeglImageOES image)
-GL_ENTRY(void, glEnable, GLenum cap)
-GL_ENTRY(void, glEnableClientState, GLenum array)
-GL_ENTRY(void, glEnableDriverControlQCOM, GLuint driverControl)
-GL_ENTRY(void, glEnableVertexAttribArray, GLuint index)
-GL_ENTRY(void, glEndPerfMonitorAMD, GLuint monitor)
-GL_ENTRY(void, glEndTilingQCOM, GLbitfield preserveMask)
-GL_ENTRY(void, glExtGetBufferPointervQCOM, GLenum target, GLvoid **params)
-GL_ENTRY(void, glExtGetBuffersQCOM, GLuint *buffers, GLint maxBuffers, GLint *numBuffers)
-GL_ENTRY(void, glExtGetFramebuffersQCOM, GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers)
-GL_ENTRY(void, glExtGetProgramBinarySourceQCOM, GLuint program, GLenum shadertype, GLchar *source, GLint *length)
-GL_ENTRY(void, glExtGetProgramsQCOM, GLuint *programs, GLint maxPrograms, GLint *numPrograms)
-GL_ENTRY(void, glExtGetRenderbuffersQCOM, GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers)
-GL_ENTRY(void, glExtGetShadersQCOM, GLuint *shaders, GLint maxShaders, GLint *numShaders)
-GL_ENTRY(void, glExtGetTexLevelParameterivQCOM, GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params)
-GL_ENTRY(void, glExtGetTexSubImageQCOM, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels)
-GL_ENTRY(void, glExtGetTexturesQCOM, GLuint *textures, GLint maxTextures, GLint *numTextures)
-GL_ENTRY(GLboolean, glExtIsProgramBinaryQCOM, GLuint program)
-GL_ENTRY(void, glExtTexObjectStateOverrideiQCOM, GLenum target, GLenum pname, GLint param)
-GL_ENTRY(void, glFinish, void)
-GL_ENTRY(void, glFinishFenceNV, GLuint fence)
-GL_ENTRY(void, glFlush, void)
-GL_ENTRY(void, glFogf, GLenum pname, GLfloat param)
-GL_ENTRY(void, glFogfv, GLenum pname, const GLfloat *params)
-GL_ENTRY(void, glFogx, GLenum pname, GLfixed param)
-GL_ENTRY(void, glFogxOES, GLenum pname, GLfixed param)
-GL_ENTRY(void, glFogxv, GLenum pname, const GLfixed *params)
-GL_ENTRY(void, glFogxvOES, GLenum pname, const GLfixed *params)
-GL_ENTRY(void, glFramebufferRenderbuffer, GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
-GL_ENTRY(void, glFramebufferRenderbufferOES, GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
-GL_ENTRY(void, glFramebufferTexture2D, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
-GL_ENTRY(void, glFramebufferTexture2DMultisampleIMG, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples)
-GL_ENTRY(void, glFramebufferTexture2DOES, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
-GL_ENTRY(void, glFramebufferTexture3DOES, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)
-GL_ENTRY(void, glFrontFace, GLenum mode)
-GL_ENTRY(void, glFrustumf, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)
-GL_ENTRY(void, glFrustumfOES, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)
-GL_ENTRY(void, glFrustumx, GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)
-GL_ENTRY(void, glFrustumxOES, GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)
-GL_ENTRY(void, glGenBuffers, GLsizei n, GLuint *buffers)
-GL_ENTRY(void, glGenFencesNV, GLsizei n, GLuint *fences)
-GL_ENTRY(void, glGenFramebuffers, GLsizei n, GLuint* framebuffers)
-GL_ENTRY(void, glGenFramebuffersOES, GLsizei n, GLuint* framebuffers)
-GL_ENTRY(void, glGenPerfMonitorsAMD, GLsizei n, GLuint *monitors)
-GL_ENTRY(void, glGenRenderbuffers, GLsizei n, GLuint* renderbuffers)
-GL_ENTRY(void, glGenRenderbuffersOES, GLsizei n, GLuint* renderbuffers)
-GL_ENTRY(void, glGenTextures, GLsizei n, GLuint *textures)
-GL_ENTRY(void, glGenVertexArraysOES, GLsizei n, GLuint *arrays)
-GL_ENTRY(void, glGenerateMipmap, GLenum target)
-GL_ENTRY(void, glGenerateMipmapOES, GLenum target)
-GL_ENTRY(void, glGetActiveAttrib, GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name)
-GL_ENTRY(void, glGetActiveUniform, GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name)
-GL_ENTRY(void, glGetAttachedShaders, GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders)
-GL_ENTRY(int, glGetAttribLocation, GLuint program, const GLchar* name)
-GL_ENTRY(void, glGetBooleanv, GLenum pname, GLboolean *params)
-GL_ENTRY(void, glGetBufferParameteriv, GLenum target, GLenum pname, GLint *params)
-GL_ENTRY(void, glGetBufferPointervOES, GLenum target, GLenum pname, GLvoid ** params)
-GL_ENTRY(void, glGetClipPlanef, GLenum pname, GLfloat eqn[4])
-GL_ENTRY(void, glGetClipPlanefOES, GLenum pname, GLfloat eqn[4])
-GL_ENTRY(void, glGetClipPlanex, GLenum pname, GLfixed eqn[4])
-GL_ENTRY(void, glGetClipPlanexOES, GLenum pname, GLfixed eqn[4])
-GL_ENTRY(void, glGetDriverControlStringQCOM, GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString)
-GL_ENTRY(void, glGetDriverControlsQCOM, GLint *num, GLsizei size, GLuint *driverControls)
-GL_ENTRY(GLenum, glGetError, void)
-GL_ENTRY(void, glGetFenceivNV, GLuint fence, GLenum pname, GLint *params)
-GL_ENTRY(void, glGetFixedv, GLenum pname, GLfixed *params)
-GL_ENTRY(void, glGetFixedvOES, GLenum pname, GLfixed *params)
-GL_ENTRY(void, glGetFloatv, GLenum pname, GLfloat *params)
-GL_ENTRY(void, glGetFramebufferAttachmentParameteriv, GLenum target, GLenum attachment, GLenum pname, GLint* params)
-GL_ENTRY(void, glGetFramebufferAttachmentParameterivOES, GLenum target, GLenum attachment, GLenum pname, GLint* params)
-GL_ENTRY(void, glGetIntegerv, GLenum pname, GLint *params)
-GL_ENTRY(void, glGetLightfv, GLenum light, GLenum pname, GLfloat *params)
-GL_ENTRY(void, glGetLightxv, GLenum light, GLenum pname, GLfixed *params)
-GL_ENTRY(void, glGetLightxvOES, GLenum light, GLenum pname, GLfixed *params)
-GL_ENTRY(void, glGetMaterialfv, GLenum face, GLenum pname, GLfloat *params)
-GL_ENTRY(void, glGetMaterialxv, GLenum face, GLenum pname, GLfixed *params)
-GL_ENTRY(void, glGetMaterialxvOES, GLenum face, GLenum pname, GLfixed *params)
-GL_ENTRY(void, glGetPerfMonitorCounterDataAMD, GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten)
-GL_ENTRY(void, glGetPerfMonitorCounterInfoAMD, GLuint group, GLuint counter, GLenum pname, GLvoid *data)
-GL_ENTRY(void, glGetPerfMonitorCounterStringAMD, GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString)
-GL_ENTRY(void, glGetPerfMonitorCountersAMD, GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters)
-GL_ENTRY(void, glGetPerfMonitorGroupStringAMD, GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString)
-GL_ENTRY(void, glGetPerfMonitorGroupsAMD, GLint *numGroups, GLsizei groupsSize, GLuint *groups)
-GL_ENTRY(void, glGetPointerv, GLenum pname, GLvoid **params)
-GL_ENTRY(void, glGetProgramBinaryOES, GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary)
-GL_ENTRY(void, glGetProgramInfoLog, GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog)
-GL_ENTRY(void, glGetProgramiv, GLuint program, GLenum pname, GLint* params)
-GL_ENTRY(void, glGetRenderbufferParameteriv, GLenum target, GLenum pname, GLint* params)
-GL_ENTRY(void, glGetRenderbufferParameterivOES, GLenum target, GLenum pname, GLint* params)
-GL_ENTRY(void, glGetShaderInfoLog, GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog)
-GL_ENTRY(void, glGetShaderPrecisionFormat, GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)
-GL_ENTRY(void, glGetShaderSource, GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source)
-GL_ENTRY(void, glGetShaderiv, GLuint shader, GLenum pname, GLint* params)
-GL_ENTRY(const GLubyte *, glGetString, GLenum name)
-GL_ENTRY(void, glGetTexEnvfv, GLenum env, GLenum pname, GLfloat *params)
-GL_ENTRY(void, glGetTexEnviv, GLenum env, GLenum pname, GLint *params)
-GL_ENTRY(void, glGetTexEnvxv, GLenum env, GLenum pname, GLfixed *params)
-GL_ENTRY(void, glGetTexEnvxvOES, GLenum env, GLenum pname, GLfixed *params)
-GL_ENTRY(void, glGetTexGenfvOES, GLenum coord, GLenum pname, GLfloat *params)
-GL_ENTRY(void, glGetTexGenivOES, GLenum coord, GLenum pname, GLint *params)
-GL_ENTRY(void, glGetTexGenxvOES, GLenum coord, GLenum pname, GLfixed *params)
-GL_ENTRY(void, glGetTexParameterfv, GLenum target, GLenum pname, GLfloat *params)
-GL_ENTRY(void, glGetTexParameteriv, GLenum target, GLenum pname, GLint *params)
-GL_ENTRY(void, glGetTexParameterxv, GLenum target, GLenum pname, GLfixed *params)
-GL_ENTRY(void, glGetTexParameterxvOES, GLenum target, GLenum pname, GLfixed *params)
-GL_ENTRY(int, glGetUniformLocation, GLuint program, const GLchar* name)
-GL_ENTRY(void, glGetUniformfv, GLuint program, GLint location, GLfloat* params)
-GL_ENTRY(void, glGetUniformiv, GLuint program, GLint location, GLint* params)
-GL_ENTRY(void, glGetVertexAttribPointerv, GLuint index, GLenum pname, GLvoid** pointer)
-GL_ENTRY(void, glGetVertexAttribfv, GLuint index, GLenum pname, GLfloat* params)
-GL_ENTRY(void, glGetVertexAttribiv, GLuint index, GLenum pname, GLint* params)
-GL_ENTRY(void, glHint, GLenum target, GLenum mode)
-GL_ENTRY(GLboolean, glIsBuffer, GLuint buffer)
-GL_ENTRY(GLboolean, glIsEnabled, GLenum cap)
-GL_ENTRY(GLboolean, glIsFenceNV, GLuint fence)
-GL_ENTRY(GLboolean, glIsFramebuffer, GLuint framebuffer)
-GL_ENTRY(GLboolean, glIsFramebufferOES, GLuint framebuffer)
-GL_ENTRY(GLboolean, glIsProgram, GLuint program)
-GL_ENTRY(GLboolean, glIsRenderbuffer, GLuint renderbuffer)
-GL_ENTRY(GLboolean, glIsRenderbufferOES, GLuint renderbuffer)
-GL_ENTRY(GLboolean, glIsShader, GLuint shader)
-GL_ENTRY(GLboolean, glIsTexture, GLuint texture)
-GL_ENTRY(GLboolean, glIsVertexArrayOES, GLuint array)
-GL_ENTRY(void, glLightModelf, GLenum pname, GLfloat param)
-GL_ENTRY(void, glLightModelfv, GLenum pname, const GLfloat *params)
-GL_ENTRY(void, glLightModelx, GLenum pname, GLfixed param)
-GL_ENTRY(void, glLightModelxOES, GLenum pname, GLfixed param)
-GL_ENTRY(void, glLightModelxv, GLenum pname, const GLfixed *params)
-GL_ENTRY(void, glLightModelxvOES, GLenum pname, const GLfixed *params)
-GL_ENTRY(void, glLightf, GLenum light, GLenum pname, GLfloat param)
-GL_ENTRY(void, glLightfv, GLenum light, GLenum pname, const GLfloat *params)
-GL_ENTRY(void, glLightx, GLenum light, GLenum pname, GLfixed param)
-GL_ENTRY(void, glLightxOES, GLenum light, GLenum pname, GLfixed param)
-GL_ENTRY(void, glLightxv, GLenum light, GLenum pname, const GLfixed *params)
-GL_ENTRY(void, glLightxvOES, GLenum light, GLenum pname, const GLfixed *params)
-GL_ENTRY(void, glLineWidth, GLfloat width)
-GL_ENTRY(void, glLineWidthx, GLfixed width)
-GL_ENTRY(void, glLineWidthxOES, GLfixed width)
-GL_ENTRY(void, glLinkProgram, GLuint program)
-GL_ENTRY(void, glLoadIdentity, void)
-GL_ENTRY(void, glLoadMatrixf, const GLfloat *m)
-GL_ENTRY(void, glLoadMatrixx, const GLfixed *m)
-GL_ENTRY(void, glLoadMatrixxOES, const GLfixed *m)
-GL_ENTRY(void, glLoadPaletteFromModelViewMatrixOES, void)
-GL_ENTRY(void, glLogicOp, GLenum opcode)
-GL_ENTRY(void*, glMapBufferOES, GLenum target, GLenum access)
-GL_ENTRY(void, glMaterialf, GLenum face, GLenum pname, GLfloat param)
-GL_ENTRY(void, glMaterialfv, GLenum face, GLenum pname, const GLfloat *params)
-GL_ENTRY(void, glMaterialx, GLenum face, GLenum pname, GLfixed param)
-GL_ENTRY(void, glMaterialxOES, GLenum face, GLenum pname, GLfixed param)
-GL_ENTRY(void, glMaterialxv, GLenum face, GLenum pname, const GLfixed *params)
-GL_ENTRY(void, glMaterialxvOES, GLenum face, GLenum pname, const GLfixed *params)
-GL_ENTRY(void, glMatrixIndexPointerOES, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
-GL_ENTRY(void, glMatrixMode, GLenum mode)
-GL_ENTRY(void, glMultMatrixf, const GLfloat *m)
-GL_ENTRY(void, glMultMatrixx, const GLfixed *m)
-GL_ENTRY(void, glMultMatrixxOES, const GLfixed *m)
-GL_ENTRY(void, glMultiDrawArraysEXT, GLenum mode, GLint *first, GLsizei *count, GLsizei primcount)
-GL_ENTRY(void, glMultiDrawElementsEXT, GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount)
-GL_ENTRY(void, glMultiTexCoord4f, GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
-GL_ENTRY(void, glMultiTexCoord4x, GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q)
-GL_ENTRY(void, glMultiTexCoord4xOES, GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q)
-GL_ENTRY(void, glNormal3f, GLfloat nx, GLfloat ny, GLfloat nz)
-GL_ENTRY(void, glNormal3x, GLfixed nx, GLfixed ny, GLfixed nz)
-GL_ENTRY(void, glNormal3xOES, GLfixed nx, GLfixed ny, GLfixed nz)
-GL_ENTRY(void, glNormalPointer, GLenum type, GLsizei stride, const GLvoid *pointer)
-GL_ENTRY(void, glOrthof, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)
-GL_ENTRY(void, glOrthofOES, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)
-GL_ENTRY(void, glOrthox, GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)
-GL_ENTRY(void, glOrthoxOES, GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)
-GL_ENTRY(void, glPixelStorei, GLenum pname, GLint param)
-GL_ENTRY(void, glPointParameterf, GLenum pname, GLfloat param)
-GL_ENTRY(void, glPointParameterfv, GLenum pname, const GLfloat *params)
-GL_ENTRY(void, glPointParameterx, GLenum pname, GLfixed param)
-GL_ENTRY(void, glPointParameterxOES, GLenum pname, GLfixed param)
-GL_ENTRY(void, glPointParameterxv, GLenum pname, const GLfixed *params)
-GL_ENTRY(void, glPointParameterxvOES, GLenum pname, const GLfixed *params)
-GL_ENTRY(void, glPointSize, GLfloat size)
-GL_ENTRY(void, glPointSizePointerOES, GLenum type, GLsizei stride, const GLvoid *pointer)
-GL_ENTRY(void, glPointSizex, GLfixed size)
-GL_ENTRY(void, glPointSizexOES, GLfixed size)
-GL_ENTRY(void, glPolygonOffset, GLfloat factor, GLfloat units)
-GL_ENTRY(void, glPolygonOffsetx, GLfixed factor, GLfixed units)
-GL_ENTRY(void, glPolygonOffsetxOES, GLfixed factor, GLfixed units)
-GL_ENTRY(void, glPopMatrix, void)
-GL_ENTRY(void, glProgramBinaryOES, GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length)
-GL_ENTRY(void, glPushMatrix, void)
-GL_ENTRY(GLbitfield, glQueryMatrixxOES, GLfixed mantissa[16], GLint exponent[16])
-GL_ENTRY(void, glReadPixels, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)
-GL_ENTRY(void, glReleaseShaderCompiler, void)
-GL_ENTRY(void, glRenderbufferStorage, GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
-GL_ENTRY(void, glRenderbufferStorageMultisampleIMG, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
-GL_ENTRY(void, glRenderbufferStorageOES, GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
-GL_ENTRY(void, glRotatef, GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
-GL_ENTRY(void, glRotatex, GLfixed angle, GLfixed x, GLfixed y, GLfixed z)
-GL_ENTRY(void, glRotatexOES, GLfixed angle, GLfixed x, GLfixed y, GLfixed z)
-GL_ENTRY(void, glSampleCoverage, GLclampf value, GLboolean invert)
-GL_ENTRY(void, glSampleCoveragex, GLclampx value, GLboolean invert)
-GL_ENTRY(void, glSampleCoveragexOES, GLclampx value, GLboolean invert)
-GL_ENTRY(void, glScalef, GLfloat x, GLfloat y, GLfloat z)
-GL_ENTRY(void, glScalex, GLfixed x, GLfixed y, GLfixed z)
-GL_ENTRY(void, glScalexOES, GLfixed x, GLfixed y, GLfixed z)
-GL_ENTRY(void, glScissor, GLint x, GLint y, GLsizei width, GLsizei height)
-GL_ENTRY(void, glSelectPerfMonitorCountersAMD, GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList)
-GL_ENTRY(void, glSetFenceNV, GLuint fence, GLenum condition)
-GL_ENTRY(void, glShadeModel, GLenum mode)
-GL_ENTRY(void, glShaderBinary, GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length)
-GL_ENTRY(void, glShaderSource, GLuint shader, GLsizei count, const GLchar** string, const GLint* length)
-GL_ENTRY(void, glStartTilingQCOM, GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask)
-GL_ENTRY(void, glStencilFunc, GLenum func, GLint ref, GLuint mask)
-GL_ENTRY(void, glStencilFuncSeparate, GLenum face, GLenum func, GLint ref, GLuint mask)
-GL_ENTRY(void, glStencilMask, GLuint mask)
-GL_ENTRY(void, glStencilMaskSeparate, GLenum face, GLuint mask)
-GL_ENTRY(void, glStencilOp, GLenum fail, GLenum zfail, GLenum zpass)
-GL_ENTRY(void, glStencilOpSeparate, GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
-GL_ENTRY(GLboolean, glTestFenceNV, GLuint fence)
-GL_ENTRY(void, glTexCoordPointer, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
-GL_ENTRY(void, glTexEnvf, GLenum target, GLenum pname, GLfloat param)
-GL_ENTRY(void, glTexEnvfv, GLenum target, GLenum pname, const GLfloat *params)
-GL_ENTRY(void, glTexEnvi, GLenum target, GLenum pname, GLint param)
-GL_ENTRY(void, glTexEnviv, GLenum target, GLenum pname, const GLint *params)
-GL_ENTRY(void, glTexEnvx, GLenum target, GLenum pname, GLfixed param)
-GL_ENTRY(void, glTexEnvxOES, GLenum target, GLenum pname, GLfixed param)
-GL_ENTRY(void, glTexEnvxv, GLenum target, GLenum pname, const GLfixed *params)
-GL_ENTRY(void, glTexEnvxvOES, GLenum target, GLenum pname, const GLfixed *params)
-GL_ENTRY(void, glTexGenfOES, GLenum coord, GLenum pname, GLfloat param)
-GL_ENTRY(void, glTexGenfvOES, GLenum coord, GLenum pname, const GLfloat *params)
-GL_ENTRY(void, glTexGeniOES, GLenum coord, GLenum pname, GLint param)
-GL_ENTRY(void, glTexGenivOES, GLenum coord, GLenum pname, const GLint *params)
-GL_ENTRY(void, glTexGenxOES, GLenum coord, GLenum pname, GLfixed param)
-GL_ENTRY(void, glTexGenxvOES, GLenum coord, GLenum pname, const GLfixed *params)
-GL_ENTRY(void, glTexImage2D, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
-GL_ENTRY(void, glTexImage3DOES, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels)
-GL_ENTRY(void, glTexParameterf, GLenum target, GLenum pname, GLfloat param)
-GL_ENTRY(void, glTexParameterfv, GLenum target, GLenum pname, const GLfloat *params)
-GL_ENTRY(void, glTexParameteri, GLenum target, GLenum pname, GLint param)
-GL_ENTRY(void, glTexParameteriv, GLenum target, GLenum pname, const GLint *params)
-GL_ENTRY(void, glTexParameterx, GLenum target, GLenum pname, GLfixed param)
-GL_ENTRY(void, glTexParameterxOES, GLenum target, GLenum pname, GLfixed param)
-GL_ENTRY(void, glTexParameterxv, GLenum target, GLenum pname, const GLfixed *params)
-GL_ENTRY(void, glTexParameterxvOES, GLenum target, GLenum pname, const GLfixed *params)
-GL_ENTRY(void, glTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)
-GL_ENTRY(void, glTexSubImage3DOES, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels)
-GL_ENTRY(void, glTranslatef, GLfloat x, GLfloat y, GLfloat z)
-GL_ENTRY(void, glTranslatex, GLfixed x, GLfixed y, GLfixed z)
-GL_ENTRY(void, glTranslatexOES, GLfixed x, GLfixed y, GLfixed z)
-GL_ENTRY(void, glUniform1f, GLint location, GLfloat x)
-GL_ENTRY(void, glUniform1fv, GLint location, GLsizei count, const GLfloat* v)
-GL_ENTRY(void, glUniform1i, GLint location, GLint x)
-GL_ENTRY(void, glUniform1iv, GLint location, GLsizei count, const GLint* v)
-GL_ENTRY(void, glUniform2f, GLint location, GLfloat x, GLfloat y)
-GL_ENTRY(void, glUniform2fv, GLint location, GLsizei count, const GLfloat* v)
-GL_ENTRY(void, glUniform2i, GLint location, GLint x, GLint y)
-GL_ENTRY(void, glUniform2iv, GLint location, GLsizei count, const GLint* v)
-GL_ENTRY(void, glUniform3f, GLint location, GLfloat x, GLfloat y, GLfloat z)
-GL_ENTRY(void, glUniform3fv, GLint location, GLsizei count, const GLfloat* v)
-GL_ENTRY(void, glUniform3i, GLint location, GLint x, GLint y, GLint z)
-GL_ENTRY(void, glUniform3iv, GLint location, GLsizei count, const GLint* v)
-GL_ENTRY(void, glUniform4f, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
-GL_ENTRY(void, glUniform4fv, GLint location, GLsizei count, const GLfloat* v)
-GL_ENTRY(void, glUniform4i, GLint location, GLint x, GLint y, GLint z, GLint w)
-GL_ENTRY(void, glUniform4iv, GLint location, GLsizei count, const GLint* v)
-GL_ENTRY(void, glUniformMatrix2fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
-GL_ENTRY(void, glUniformMatrix3fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
-GL_ENTRY(void, glUniformMatrix4fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
-GL_ENTRY(GLboolean, glUnmapBufferOES, GLenum target)
-GL_ENTRY(void, glUseProgram, GLuint program)
-GL_ENTRY(void, glValidateProgram, GLuint program)
-GL_ENTRY(void, glVertexAttrib1f, GLuint indx, GLfloat x)
-GL_ENTRY(void, glVertexAttrib1fv, GLuint indx, const GLfloat* values)
-GL_ENTRY(void, glVertexAttrib2f, GLuint indx, GLfloat x, GLfloat y)
-GL_ENTRY(void, glVertexAttrib2fv, GLuint indx, const GLfloat* values)
-GL_ENTRY(void, glVertexAttrib3f, GLuint indx, GLfloat x, GLfloat y, GLfloat z)
-GL_ENTRY(void, glVertexAttrib3fv, GLuint indx, const GLfloat* values)
-GL_ENTRY(void, glVertexAttrib4f, GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
-GL_ENTRY(void, glVertexAttrib4fv, GLuint indx, const GLfloat* values)
-GL_ENTRY(void, glVertexAttribPointer, GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr)
-GL_ENTRY(void, glVertexPointer, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
-GL_ENTRY(void, glViewport, GLint x, GLint y, GLsizei width, GLsizei height)
-GL_ENTRY(void, glWeightPointerOES, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
-
-
-}
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java b/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java
index 2dcd80d..2232995 100644
--- a/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java
+++ b/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java
@@ -34,6 +34,7 @@
import android.graphics.Matrix;
import android.graphics.PixelFormat;
import android.graphics.PointF;
+import android.hardware.CameraSound;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Environment;
@@ -49,6 +50,7 @@
import android.view.WindowManager;
import android.view.animation.Interpolator;
import android.widget.ImageView;
+
import com.android.systemui.R;
import java.io.File;
@@ -254,6 +256,8 @@
private float mBgPadding;
private float mBgPaddingScale;
+ private CameraSound mCameraSound;
+
/**
* @param context everything needs a context :(
@@ -303,6 +307,9 @@
// Scale has to account for both sides of the bg
mBgPadding = (float) r.getDimensionPixelSize(R.dimen.global_screenshot_bg_padding);
mBgPaddingScale = mBgPadding / mDisplayMetrics.widthPixels;
+
+ // Setup the Camera shutter sound
+ mCameraSound = new CameraSound();
}
/**
@@ -413,6 +420,9 @@
mScreenshotLayout.post(new Runnable() {
@Override
public void run() {
+ // Play the shutter sound to notify that we've taken a screenshot
+ mCameraSound.playSound(CameraSound.SHUTTER_CLICK);
+
mScreenshotView.setLayerType(View.LAYER_TYPE_HARDWARE, null);
mScreenshotView.buildLayer();
mScreenshotAnimation.start();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
index 694da20..97a1855 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
@@ -20,6 +20,7 @@
import android.animation.AnimatorListenerAdapter;
import android.content.Context;
import android.content.res.Resources;
+import android.graphics.Rect;
import android.os.ServiceManager;
import android.util.AttributeSet;
import android.util.Slog;
@@ -32,6 +33,10 @@
import android.view.WindowManager;
import android.widget.LinearLayout;
+import java.io.FileDescriptor;
+import java.io.PrintWriter;
+import java.lang.StringBuilder;
+
import com.android.internal.statusbar.IStatusBarService;
import com.android.systemui.R;
@@ -237,4 +242,79 @@
Slog.d(TAG, "reorient(): rot=" + mDisplay.getRotation());
}
}
+
+ private String getResourceName(int resId) {
+ if (resId != 0) {
+ final android.content.res.Resources res = mContext.getResources();
+ try {
+ return res.getResourceName(resId);
+ } catch (android.content.res.Resources.NotFoundException ex) {
+ return "(unknown)";
+ }
+ } else {
+ return "(null)";
+ }
+ }
+
+ private static String visibilityToString(int vis) {
+ switch (vis) {
+ case View.INVISIBLE:
+ return "INVISIBLE";
+ case View.GONE:
+ return "GONE";
+ default:
+ return "VISIBLE";
+ }
+ }
+
+ public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
+ pw.println("NavigationBarView {");
+ final Rect r = new Rect();
+
+ pw.println(String.format(" this: " + PhoneStatusBar.viewInfo(this)
+ + " " + visibilityToString(getVisibility())));
+
+ getWindowVisibleDisplayFrame(r);
+ final boolean offscreen = r.right > mDisplay.getRawWidth()
+ || r.bottom > mDisplay.getRawHeight();
+ pw.println(" window: "
+ + r.toShortString()
+ + " " + visibilityToString(getWindowVisibility())
+ + (offscreen ? " OFFSCREEN!" : ""));
+
+ pw.println(String.format(" mCurrentView: id=%s (%dx%d) %s",
+ getResourceName(mCurrentView.getId()),
+ mCurrentView.getWidth(), mCurrentView.getHeight(),
+ visibilityToString(mCurrentView.getVisibility())));
+
+ pw.println(String.format(" disabled=0x%08x vertical=%s hidden=%s low=%s menu=%s",
+ mDisabledFlags,
+ mVertical ? "true" : "false",
+ mHidden ? "true" : "false",
+ mLowProfile ? "true" : "false",
+ mShowMenu ? "true" : "false"));
+
+ final View back = getBackButton();
+ final View home = getHomeButton();
+ final View recent = getRecentsButton();
+ final View menu = getMenuButton();
+
+ pw.println(" back: "
+ + PhoneStatusBar.viewInfo(back)
+ + " " + visibilityToString(back.getVisibility())
+ );
+ pw.println(" home: "
+ + PhoneStatusBar.viewInfo(home)
+ + " " + visibilityToString(home.getVisibility())
+ );
+ pw.println(" rcnt: "
+ + PhoneStatusBar.viewInfo(recent)
+ + " " + visibilityToString(recent.getVisibility())
+ );
+ pw.println(" menu: "
+ + PhoneStatusBar.viewInfo(menu)
+ + " " + visibilityToString(menu.getVisibility())
+ );
+ pw.println(" }");
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index f0093d3..c69a145 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -1735,9 +1735,9 @@
return anim;
}
- public String viewInfo(View v) {
- return "(" + v.getLeft() + "," + v.getTop() + ")(" + v.getRight() + "," + v.getBottom()
- + " " + v.getWidth() + "x" + v.getHeight() + ")";
+ public static String viewInfo(View v) {
+ return "[(" + v.getLeft() + "," + v.getTop() + ")(" + v.getRight() + "," + v.getBottom()
+ + ") " + v.getWidth() + "x" + v.getHeight() + "]";
}
public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
@@ -1768,6 +1768,13 @@
+ " scroll " + mScrollView.getScrollX() + "," + mScrollView.getScrollY());
}
+ pw.print(" mNavigationBarView=");
+ if (mNavigationBarView == null) {
+ pw.println("null");
+ } else {
+ mNavigationBarView.dump(fd, pw, args);
+ }
+
if (DUMPTRUCK) {
synchronized (mNotificationData) {
int N = mNotificationData.size();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/CompatModeButton.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/CompatModeButton.java
index 7fbf734..2d951c2 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/CompatModeButton.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/CompatModeButton.java
@@ -49,6 +49,10 @@
public void refresh() {
int mode = mAM.getFrontActivityScreenCompatMode();
+ if (mode == ActivityManager.COMPAT_MODE_UNKNOWN) {
+ // If in an unknown state, don't change.
+ return;
+ }
final boolean vis = (mode != ActivityManager.COMPAT_MODE_NEVER
&& mode != ActivityManager.COMPAT_MODE_ALWAYS);
if (DEBUG) Slog.d(TAG, "compat mode is " + mode + "; icon will " + (vis ? "show" : "hide"));
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
index 01406bc..757ce0c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
@@ -534,6 +534,7 @@
mCompatModeButton = (CompatModeButton) sb.findViewById(R.id.compatModeButton);
mCompatModeButton.setOnClickListener(mOnClickListener);
+ mCompatModeButton.setVisibility(View.GONE);
// for redirecting errant bar taps to the IME
mFakeSpaceBar = sb.findViewById(R.id.fake_space_bar);
diff --git a/policy/src/com/android/internal/policy/impl/GlobalActions.java b/policy/src/com/android/internal/policy/impl/GlobalActions.java
index f040e87..8052c80 100644
--- a/policy/src/com/android/internal/policy/impl/GlobalActions.java
+++ b/policy/src/com/android/internal/policy/impl/GlobalActions.java
@@ -121,8 +121,8 @@
R.string.global_action_silent_mode_off_status) {
void willCreate() {
- mEnabledIconResId = (Settings.System.getInt(mContext.getContentResolver(),
- Settings.System.VIBRATE_IN_SILENT, 1) == 1)
+ mEnabledIconResId =
+ mAudioManager.getRingerMode() == AudioManager.RINGER_MODE_VIBRATE
? R.drawable.ic_audio_ring_notif_vibrate
: R.drawable.ic_audio_vol_mute;
}
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index a3d04c4..e6b86fc 100755
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -40,12 +40,12 @@
import android.graphics.Rect;
import android.graphics.RectF;
import android.os.BatteryManager;
-import android.os.Binder;
import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
import android.os.IRemoteCallback;
import android.os.LocalPowerManager;
+import android.os.Looper;
import android.os.Message;
import android.os.Messenger;
import android.os.PowerManager;
@@ -62,7 +62,6 @@
import com.android.internal.policy.PolicyManager;
import com.android.internal.statusbar.IStatusBarService;
import com.android.internal.telephony.ITelephony;
-import com.android.internal.view.BaseInputHandler;
import com.android.internal.widget.PointerLocationView;
import android.util.DisplayMetrics;
@@ -72,11 +71,12 @@
import android.util.SparseArray;
import android.view.Gravity;
import android.view.HapticFeedbackConstants;
+import android.view.IApplicationToken;
import android.view.IWindowManager;
import android.view.InputChannel;
import android.view.InputDevice;
-import android.view.InputQueue;
-import android.view.InputHandler;
+import android.view.InputEvent;
+import android.view.InputEventReceiver;
import android.view.KeyCharacterMap;
import android.view.KeyEvent;
import android.view.MotionEvent;
@@ -343,26 +343,34 @@
// The last window we were told about in focusChanged.
WindowState mFocusedWindow;
+ IApplicationToken mFocusedApp;
- private final InputHandler mPointerLocationInputHandler = new BaseInputHandler() {
+ final class PointerLocationInputEventReceiver extends InputEventReceiver {
+ public PointerLocationInputEventReceiver(InputChannel inputChannel, Looper looper) {
+ super(inputChannel, looper);
+ }
+
@Override
- public void handleMotion(MotionEvent event, InputQueue.FinishedCallback finishedCallback) {
+ public void onInputEvent(InputEvent event) {
boolean handled = false;
try {
- if ((event.getSource() & InputDevice.SOURCE_CLASS_POINTER) != 0) {
+ if (event instanceof MotionEvent
+ && (event.getSource() & InputDevice.SOURCE_CLASS_POINTER) != 0) {
+ final MotionEvent motionEvent = (MotionEvent)event;
synchronized (mLock) {
if (mPointerLocationView != null) {
- mPointerLocationView.addPointerEvent(event);
+ mPointerLocationView.addPointerEvent(motionEvent);
handled = true;
}
}
}
} finally {
- finishedCallback.finished(handled);
+ finishInputEvent(event, handled);
}
}
- };
-
+ }
+ PointerLocationInputEventReceiver mPointerLocationInputEventReceiver;
+
// The current size of the screen; really; (ir)regardless of whether the status
// bar can be hidden or not
int mUnrestrictedScreenLeft, mUnrestrictedScreenTop;
@@ -999,9 +1007,10 @@
if (mPointerLocationInputChannel == null) {
try {
mPointerLocationInputChannel =
- mWindowManager.monitorInput("PointerLocationView");
- InputQueue.registerInputChannel(mPointerLocationInputChannel,
- mPointerLocationInputHandler, mHandler.getLooper().getQueue());
+ mWindowManager.monitorInput("PointerLocationView");
+ mPointerLocationInputEventReceiver =
+ new PointerLocationInputEventReceiver(
+ mPointerLocationInputChannel, mHandler.getLooper());
} catch (RemoteException ex) {
Slog.e(TAG, "Could not set up input monitoring channel for PointerLocation.",
ex);
@@ -1009,8 +1018,11 @@
}
}
if (removeView != null) {
+ if (mPointerLocationInputEventReceiver != null) {
+ mPointerLocationInputEventReceiver.dispose();
+ mPointerLocationInputEventReceiver = null;
+ }
if (mPointerLocationInputChannel != null) {
- InputQueue.unregisterInputChannel(mPointerLocationInputChannel);
mPointerLocationInputChannel.dispose();
mPointerLocationInputChannel = null;
}
@@ -1835,13 +1847,19 @@
* to determine when the nav bar should be shown and prevent applications from
* receiving those touches.
*/
- final InputHandler mHideNavInputHandler = new BaseInputHandler() {
+ final class HideNavInputEventReceiver extends InputEventReceiver {
+ public HideNavInputEventReceiver(InputChannel inputChannel, Looper looper) {
+ super(inputChannel, looper);
+ }
+
@Override
- public void handleMotion(MotionEvent event, InputQueue.FinishedCallback finishedCallback) {
+ public void onInputEvent(InputEvent event) {
boolean handled = false;
try {
- if ((event.getSource() & InputDevice.SOURCE_CLASS_POINTER) != 0) {
- if (event.getAction() == MotionEvent.ACTION_DOWN) {
+ if (event instanceof MotionEvent
+ && (event.getSource() & InputDevice.SOURCE_CLASS_POINTER) != 0) {
+ final MotionEvent motionEvent = (MotionEvent)event;
+ if (motionEvent.getAction() == MotionEvent.ACTION_DOWN) {
// When the user taps down, we re-show the nav bar.
boolean changed = false;
synchronized (mLock) {
@@ -1878,9 +1896,17 @@
}
}
} finally {
- finishedCallback.finished(handled);
+ finishInputEvent(event, handled);
}
}
+ }
+ final InputEventReceiver.Factory mHideNavInputEventReceiverFactory =
+ new InputEventReceiver.Factory() {
+ @Override
+ public InputEventReceiver createInputEventReceiver(
+ InputChannel inputChannel, Looper looper) {
+ return new HideNavInputEventReceiver(inputChannel, looper);
+ }
};
@Override
@@ -1944,7 +1970,7 @@
}
} else if (mHideNavFakeWindow == null) {
mHideNavFakeWindow = mWindowManagerFuncs.addFakeWindow(
- mHandler.getLooper(), mHideNavInputHandler,
+ mHandler.getLooper(), mHideNavInputEventReceiverFactory,
"hidden nav", WindowManager.LayoutParams.TYPE_HIDDEN_NAV_CONSUMER,
0, false, false, true);
}
@@ -3816,11 +3842,13 @@
int diff = visibility ^ mLastSystemUiFlags;
final boolean needsMenu = (mFocusedWindow.getAttrs().flags
& WindowManager.LayoutParams.FLAG_NEEDS_MENU_KEY) != 0;
- if (diff == 0 && mLastFocusNeedsMenu == needsMenu) {
+ if (diff == 0 && mLastFocusNeedsMenu == needsMenu
+ && mFocusedApp == mFocusedWindow.getAppToken()) {
return 0;
}
mLastSystemUiFlags = visibility;
mLastFocusNeedsMenu = needsMenu;
+ mFocusedApp = mFocusedWindow.getAppToken();
mHandler.post(new Runnable() {
public void run() {
if (mStatusBarService == null) {
diff --git a/services/java/com/android/server/DeviceStorageMonitorService.java b/services/java/com/android/server/DeviceStorageMonitorService.java
index d34087f..16eeb7ba 100644
--- a/services/java/com/android/server/DeviceStorageMonitorService.java
+++ b/services/java/com/android/server/DeviceStorageMonitorService.java
@@ -163,7 +163,6 @@
} catch (IllegalArgumentException e) {
// ignore; report -1
}
- mCacheFileStats.restat(CACHE_PATH);
EventLog.writeEvent(EventLogTags.FREE_STORAGE_LEFT,
mFreeMem, mFreeSystem, mFreeCache);
}
diff --git a/services/java/com/android/server/NativeDaemonConnector.java b/services/java/com/android/server/NativeDaemonConnector.java
index 1e98f93..cc2bcd9 100644
--- a/services/java/com/android/server/NativeDaemonConnector.java
+++ b/services/java/com/android/server/NativeDaemonConnector.java
@@ -29,6 +29,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
+import java.nio.charset.Charsets;
import java.util.ArrayList;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
@@ -122,13 +123,15 @@
for (int i = 0; i < count; i++) {
if (buffer[i] == 0) {
- final String rawEvent = new String(buffer, start, i - start);
+ final String rawEvent = new String(
+ buffer, start, i - start, Charsets.UTF_8);
if (LOGD) Slog.d(TAG, "RCV <- " + rawEvent);
try {
final NativeDaemonEvent event = NativeDaemonEvent.parseRawEvent(
rawEvent);
if (event.isClassUnsolicited()) {
+ // TODO: migrate to sending NativeDaemonEvent instances
mCallbackHandler.sendMessage(mCallbackHandler.obtainMessage(
event.getCode(), event.getRawEvent()));
} else {
@@ -213,7 +216,7 @@
throw new NativeDaemonConnectorException("missing output stream");
} else {
try {
- mOutputStream.write(builder.toString().getBytes());
+ mOutputStream.write(builder.toString().getBytes(Charsets.UTF_8));
} catch (IOException e) {
throw new NativeDaemonConnectorException("problem sending command", e);
}
@@ -223,9 +226,62 @@
}
/**
- * Issue a command to the native daemon and return the responses.
+ * Issue the given command to the native daemon and return a single expected
+ * response.
+ *
+ * @throws NativeDaemonConnectorException when problem communicating with
+ * native daemon, or if the response matches
+ * {@link NativeDaemonEvent#isClassClientError()} or
+ * {@link NativeDaemonEvent#isClassServerError()}.
*/
- public NativeDaemonEvent[] execute(String cmd, Object... args)
+ public NativeDaemonEvent execute(Command cmd) throws NativeDaemonConnectorException {
+ return execute(cmd.mCmd, cmd.mArguments.toArray());
+ }
+
+ /**
+ * Issue the given command to the native daemon and return a single expected
+ * response.
+ *
+ * @throws NativeDaemonConnectorException when problem communicating with
+ * native daemon, or if the response matches
+ * {@link NativeDaemonEvent#isClassClientError()} or
+ * {@link NativeDaemonEvent#isClassServerError()}.
+ */
+ public NativeDaemonEvent execute(String cmd, Object... args)
+ throws NativeDaemonConnectorException {
+ final NativeDaemonEvent[] events = executeForList(cmd, args);
+ if (events.length != 1) {
+ throw new NativeDaemonConnectorException(
+ "Expected exactly one response, but received " + events.length);
+ }
+ return events[0];
+ }
+
+ /**
+ * Issue the given command to the native daemon and return any
+ * {@link NativeDaemonEvent#isClassContinue()} responses, including the
+ * final terminal response.
+ *
+ * @throws NativeDaemonConnectorException when problem communicating with
+ * native daemon, or if the response matches
+ * {@link NativeDaemonEvent#isClassClientError()} or
+ * {@link NativeDaemonEvent#isClassServerError()}.
+ */
+ public NativeDaemonEvent[] executeForList(Command cmd) throws NativeDaemonConnectorException {
+ return executeForList(cmd.mCmd, cmd.mArguments.toArray());
+ }
+
+ /**
+ * Issue the given command to the native daemon and return any
+ * {@link NativeDaemonEvent#isClassContinue()} responses, including the
+ * final terminal response.
+ *
+ * @throws NativeDaemonConnectorException when problem communicating with
+ * native daemon, or if the response matches
+ * {@link NativeDaemonEvent#isClassClientError()} or
+ * {@link NativeDaemonEvent#isClassServerError()}.
+ */
+ public NativeDaemonEvent[] executeForList(String cmd, Object... args)
throws NativeDaemonConnectorException {
synchronized (mDaemonLock) {
return executeLocked(cmd, args);
@@ -270,7 +326,7 @@
@Deprecated
public ArrayList<String> doCommand(String cmd) throws NativeDaemonConnectorException {
final ArrayList<String> rawEvents = Lists.newArrayList();
- final NativeDaemonEvent[] events = execute(cmd);
+ final NativeDaemonEvent[] events = executeForList(cmd);
for (NativeDaemonEvent event : events) {
rawEvents.add(event.getRawEvent());
}
@@ -281,11 +337,12 @@
* Issues a list command and returns the cooked list of all
* {@link NativeDaemonEvent#getMessage()} which match requested code.
*/
+ @Deprecated
public String[] doListCommand(String cmd, int expectedCode)
throws NativeDaemonConnectorException {
final ArrayList<String> list = Lists.newArrayList();
- final NativeDaemonEvent[] events = execute(cmd);
+ final NativeDaemonEvent[] events = executeForList(cmd);
for (int i = 0; i < events.length - 1; i++) {
final NativeDaemonEvent event = events[i];
final int code = event.getCode();
@@ -351,6 +408,26 @@
}
}
+ /**
+ * Command builder that handles argument list building.
+ */
+ public static class Command {
+ private String mCmd;
+ private ArrayList<Object> mArguments = Lists.newArrayList();
+
+ public Command(String cmd, Object... args) {
+ mCmd = cmd;
+ for (Object arg : args) {
+ appendArg(arg);
+ }
+ }
+
+ public Command appendArg(Object arg) {
+ mArguments.add(arg);
+ return this;
+ }
+ }
+
/** {@inheritDoc} */
public void monitor() {
synchronized (mDaemonLock) { }
diff --git a/services/java/com/android/server/NativeDaemonEvent.java b/services/java/com/android/server/NativeDaemonEvent.java
index b1d0788..62084c0 100644
--- a/services/java/com/android/server/NativeDaemonEvent.java
+++ b/services/java/com/android/server/NativeDaemonEvent.java
@@ -16,6 +16,10 @@
package com.android.server;
+import com.google.android.collect.Lists;
+
+import java.util.ArrayList;
+
/**
* Parsed event from native side of {@link NativeDaemonConnector}.
*/
@@ -89,6 +93,17 @@
}
/**
+ * Verify this event matches the given code.
+ *
+ * @throws IllegalStateException if {@link #getCode()} doesn't match.
+ */
+ public void checkCode(int code) {
+ if (mCode != code) {
+ throw new IllegalStateException("Expected " + code + " but was: " + this);
+ }
+ }
+
+ /**
* Parse the given raw event into {@link NativeDaemonEvent} instance.
*
* @throws IllegalArgumentException when line doesn't match format expected
@@ -110,4 +125,18 @@
final String message = rawEvent.substring(splitIndex + 1);
return new NativeDaemonEvent(code, message, rawEvent);
}
+
+ /**
+ * Filter the given {@link NativeDaemonEvent} list, returning
+ * {@link #getMessage()} for any events matching the requested code.
+ */
+ public static String[] filterMessageList(NativeDaemonEvent[] events, int matchCode) {
+ final ArrayList<String> result = Lists.newArrayList();
+ for (NativeDaemonEvent event : events) {
+ if (event.getCode() == matchCode) {
+ result.add(event.getMessage());
+ }
+ }
+ return result.toArray(new String[result.size()]);
+ }
}
diff --git a/services/java/com/android/server/NetworkManagementService.java b/services/java/com/android/server/NetworkManagementService.java
index 70e3c1f..f7bf8b5 100644
--- a/services/java/com/android/server/NetworkManagementService.java
+++ b/services/java/com/android/server/NetworkManagementService.java
@@ -27,6 +27,16 @@
import static android.net.NetworkStats.UID_ALL;
import static android.net.TrafficStats.UID_TETHERING;
import static android.provider.Settings.Secure.NETSTATS_ENABLED;
+import static com.android.server.NetworkManagementService.NetdResponseCode.InterfaceGetCfgResult;
+import static com.android.server.NetworkManagementService.NetdResponseCode.InterfaceListResult;
+import static com.android.server.NetworkManagementService.NetdResponseCode.InterfaceRxThrottleResult;
+import static com.android.server.NetworkManagementService.NetdResponseCode.InterfaceTxThrottleResult;
+import static com.android.server.NetworkManagementService.NetdResponseCode.IpFwdStatusResult;
+import static com.android.server.NetworkManagementService.NetdResponseCode.TetherDnsFwdTgtListResult;
+import static com.android.server.NetworkManagementService.NetdResponseCode.TetherInterfaceListResult;
+import static com.android.server.NetworkManagementService.NetdResponseCode.TetherStatusResult;
+import static com.android.server.NetworkManagementService.NetdResponseCode.TetheringStatsResult;
+import static com.android.server.NetworkManagementService.NetdResponseCode.TtyListResult;
import static com.android.server.NetworkManagementSocketTagger.PROP_QTAGUID_ENABLED;
import android.content.Context;
@@ -48,6 +58,7 @@
import android.util.SparseBooleanArray;
import com.android.internal.net.NetworkStatsFactory;
+import com.android.server.NativeDaemonConnector.Command;
import com.google.android.collect.Sets;
import java.io.BufferedReader;
@@ -79,8 +90,8 @@
private static final boolean DBG = false;
private static final String NETD_TAG = "NetdConnector";
- private static final int ADD = 1;
- private static final int REMOVE = 2;
+ private static final String ADD = "add";
+ private static final String REMOVE = "remove";
private static final String DEFAULT = "default";
private static final String SECONDARY = "secondary";
@@ -182,7 +193,7 @@
if (hasKernelSupport && shouldEnable) {
Slog.d(TAG, "enabling bandwidth control");
try {
- mConnector.doCommand("bandwidth enable");
+ mConnector.execute("bandwidth", "enable");
mBandwidthControlEnabled = true;
} catch (NativeDaemonConnectorException e) {
Log.wtf(TAG, "problem enabling bandwidth controls", e);
@@ -281,7 +292,6 @@
* Let us know the daemon is connected
*/
protected void onDaemonConnected() {
- if (DBG) Slog.d(TAG, "onConnected");
mConnectedSignal.countDown();
}
@@ -358,54 +368,43 @@
public String[] listInterfaces() {
mContext.enforceCallingOrSelfPermission(ACCESS_NETWORK_STATE, TAG);
try {
- return mConnector.doListCommand("interface list", NetdResponseCode.InterfaceListResult);
+ return NativeDaemonEvent.filterMessageList(
+ mConnector.executeForList("interface", "list"), InterfaceListResult);
} catch (NativeDaemonConnectorException e) {
- throw new IllegalStateException(
- "Cannot communicate with native daemon to list interfaces");
+ throw e.rethrowAsParcelableException();
}
}
@Override
public InterfaceConfiguration getInterfaceConfig(String iface) {
mContext.enforceCallingOrSelfPermission(ACCESS_NETWORK_STATE, TAG);
- String rsp;
- try {
- rsp = mConnector.doCommand("interface getcfg " + iface).get(0);
- } catch (NativeDaemonConnectorException e) {
- throw new IllegalStateException(
- "Cannot communicate with native daemon to get interface config");
- }
- Slog.d(TAG, String.format("rsp <%s>", rsp));
- // Rsp: 213 xx:xx:xx:xx:xx:xx yyy.yyy.yyy.yyy zzz [flag1 flag2 flag3]
- StringTokenizer st = new StringTokenizer(rsp);
+ final NativeDaemonEvent event;
+ try {
+ event = mConnector.execute("interface", "getcfg", iface);
+ } catch (NativeDaemonConnectorException e) {
+ throw e.rethrowAsParcelableException();
+ }
+
+ event.checkCode(InterfaceGetCfgResult);
+
+ // Rsp: 213 xx:xx:xx:xx:xx:xx yyy.yyy.yyy.yyy zzz flag1 flag2 flag3
+ final StringTokenizer st = new StringTokenizer(event.getMessage());
InterfaceConfiguration cfg;
try {
- try {
- int code = Integer.parseInt(st.nextToken(" "));
- if (code != NetdResponseCode.InterfaceGetCfgResult) {
- throw new IllegalStateException(
- String.format("Expected code %d, but got %d",
- NetdResponseCode.InterfaceGetCfgResult, code));
- }
- } catch (NumberFormatException nfe) {
- throw new IllegalStateException(
- String.format("Invalid response from daemon (%s)", rsp));
- }
-
cfg = new InterfaceConfiguration();
cfg.setHardwareAddress(st.nextToken(" "));
InetAddress addr = null;
int prefixLength = 0;
try {
- addr = NetworkUtils.numericToInetAddress(st.nextToken(" "));
+ addr = NetworkUtils.numericToInetAddress(st.nextToken());
} catch (IllegalArgumentException iae) {
Slog.e(TAG, "Failed to parse ipaddr", iae);
}
try {
- prefixLength = Integer.parseInt(st.nextToken(" "));
+ prefixLength = Integer.parseInt(st.nextToken());
} catch (NumberFormatException nfe) {
Slog.e(TAG, "Failed to parse prefixLength", nfe);
}
@@ -415,10 +414,8 @@
cfg.setFlag(st.nextToken());
}
} catch (NoSuchElementException nsee) {
- throw new IllegalStateException(
- String.format("Invalid response from daemon (%s)", rsp));
+ throw new IllegalStateException("Invalid response from daemon: " + event);
}
- Slog.d(TAG, String.format("flags <%s>", cfg.getFlags()));
return cfg;
}
@@ -429,15 +426,18 @@
if (linkAddr == null || linkAddr.getAddress() == null) {
throw new IllegalStateException("Null LinkAddress given");
}
- String cmd = String.format("interface setcfg %s %s %d %s", iface,
+
+ final Command cmd = new Command("interface", "setcfg", iface,
linkAddr.getAddress().getHostAddress(),
- linkAddr.getNetworkPrefixLength(),
- cfg.getFlags());
+ linkAddr.getNetworkPrefixLength());
+ for (String flag : cfg.getFlags()) {
+ cmd.appendArg(flag);
+ }
+
try {
- mConnector.doCommand(cmd);
+ mConnector.execute(cmd);
} catch (NativeDaemonConnectorException e) {
- throw new IllegalStateException(
- "Unable to communicate with native daemon to interface setcfg - " + e);
+ throw e.rethrowAsParcelableException();
}
}
@@ -460,13 +460,11 @@
@Override
public void setInterfaceIpv6PrivacyExtensions(String iface, boolean enable) {
mContext.enforceCallingOrSelfPermission(CHANGE_NETWORK_STATE, TAG);
- String cmd = String.format("interface ipv6privacyextensions %s %s", iface,
- enable ? "enable" : "disable");
try {
- mConnector.doCommand(cmd);
+ mConnector.execute(
+ "interface", "ipv6privacyextensions", iface, enable ? "enable" : "disable");
} catch (NativeDaemonConnectorException e) {
- throw new IllegalStateException(
- "Unable to communicate with native daemon to set ipv6privacyextensions - " + e);
+ throw e.rethrowAsParcelableException();
}
}
@@ -475,12 +473,10 @@
@Override
public void clearInterfaceAddresses(String iface) {
mContext.enforceCallingOrSelfPermission(CHANGE_NETWORK_STATE, TAG);
- String cmd = String.format("interface clearaddrs %s", iface);
try {
- mConnector.doCommand(cmd);
+ mConnector.execute("interface", "clearaddrs", iface);
} catch (NativeDaemonConnectorException e) {
- throw new IllegalStateException(
- "Unable to communicate with native daemon to interface clearallips - " + e);
+ throw e.rethrowAsParcelableException();
}
}
@@ -488,10 +484,9 @@
public void enableIpv6(String iface) {
mContext.enforceCallingOrSelfPermission(CHANGE_NETWORK_STATE, TAG);
try {
- mConnector.doCommand(String.format("interface ipv6 %s enable", iface));
+ mConnector.execute("interface", "ipv6", iface, "enable");
} catch (NativeDaemonConnectorException e) {
- throw new IllegalStateException(
- "Unable to communicate to native daemon for enabling ipv6");
+ throw e.rethrowAsParcelableException();
}
}
@@ -499,10 +494,9 @@
public void disableIpv6(String iface) {
mContext.enforceCallingOrSelfPermission(CHANGE_NETWORK_STATE, TAG);
try {
- mConnector.doCommand(String.format("interface ipv6 %s disable", iface));
+ mConnector.execute("interface", "ipv6", iface, "disable");
} catch (NativeDaemonConnectorException e) {
- throw new IllegalStateException(
- "Unable to communicate to native daemon for disabling ipv6");
+ throw e.rethrowAsParcelableException();
}
}
@@ -530,54 +524,28 @@
modifyRoute(interfaceName, REMOVE, route, SECONDARY);
}
- private void modifyRoute(String interfaceName, int action, RouteInfo route, String type) {
- ArrayList<String> rsp;
-
- StringBuilder cmd;
-
- switch (action) {
- case ADD:
- {
- cmd = new StringBuilder("interface route add " + interfaceName + " " + type);
- break;
- }
- case REMOVE:
- {
- cmd = new StringBuilder("interface route remove " + interfaceName + " " + type);
- break;
- }
- default:
- throw new IllegalStateException("Unknown action type " + action);
- }
+ private void modifyRoute(String interfaceName, String action, RouteInfo route, String type) {
+ final Command cmd = new Command("interface", "route", action, interfaceName, type);
// create triplet: dest-ip-addr prefixlength gateway-ip-addr
- LinkAddress la = route.getDestination();
- cmd.append(' ');
- cmd.append(la.getAddress().getHostAddress());
- cmd.append(' ');
- cmd.append(la.getNetworkPrefixLength());
- cmd.append(' ');
+ final LinkAddress la = route.getDestination();
+ cmd.appendArg(la.getAddress().getHostAddress());
+ cmd.appendArg(la.getNetworkPrefixLength());
+
if (route.getGateway() == null) {
if (la.getAddress() instanceof Inet4Address) {
- cmd.append("0.0.0.0");
+ cmd.appendArg("0.0.0.0");
} else {
- cmd.append ("::0");
+ cmd.appendArg("::0");
}
} else {
- cmd.append(route.getGateway().getHostAddress());
- }
- try {
- rsp = mConnector.doCommand(cmd.toString());
- } catch (NativeDaemonConnectorException e) {
- throw new IllegalStateException(
- "Unable to communicate with native dameon to add routes - "
- + e);
+ cmd.appendArg(route.getGateway().getHostAddress());
}
- if (DBG) {
- for (String line : rsp) {
- Log.v(TAG, "add route response is " + line);
- }
+ try {
+ mConnector.execute(cmd);
+ } catch (NativeDaemonConnectorException e) {
+ throw e.rethrowAsParcelableException();
}
}
@@ -681,7 +649,7 @@
}
}
}
- return (RouteInfo[]) routes.toArray(new RouteInfo[0]);
+ return routes.toArray(new RouteInfo[routes.size()]);
}
@Override
@@ -696,39 +664,25 @@
public boolean getIpForwardingEnabled() throws IllegalStateException{
mContext.enforceCallingOrSelfPermission(ACCESS_NETWORK_STATE, TAG);
- ArrayList<String> rsp;
+ final NativeDaemonEvent event;
try {
- rsp = mConnector.doCommand("ipfwd status");
+ event = mConnector.execute("ipfwd", "status");
} catch (NativeDaemonConnectorException e) {
- throw new IllegalStateException(
- "Unable to communicate with native daemon to ipfwd status");
+ throw e.rethrowAsParcelableException();
}
- for (String line : rsp) {
- String[] tok = line.split(" ");
- if (tok.length < 3) {
- Slog.e(TAG, "Malformed response from native daemon: " + line);
- return false;
- }
-
- int code = Integer.parseInt(tok[0]);
- if (code == NetdResponseCode.IpFwdStatusResult) {
- // 211 Forwarding <enabled/disabled>
- return "enabled".equals(tok[2]);
- } else {
- throw new IllegalStateException(String.format("Unexpected response code %d", code));
- }
- }
- throw new IllegalStateException("Got an empty response");
+ // 211 Forwarding enabled
+ event.checkCode(IpFwdStatusResult);
+ return event.getMessage().endsWith("enabled");
}
@Override
public void setIpForwardingEnabled(boolean enable) {
mContext.enforceCallingOrSelfPermission(CHANGE_NETWORK_STATE, TAG);
try {
- mConnector.doCommand(String.format("ipfwd %sable", (enable ? "en" : "dis")));
+ mConnector.execute("ipfwd", enable ? "enable" : "disable");
} catch (NativeDaemonConnectorException e) {
- e.rethrowAsParcelableException();
+ throw e.rethrowAsParcelableException();
}
}
@@ -737,15 +691,16 @@
mContext.enforceCallingOrSelfPermission(CHANGE_NETWORK_STATE, TAG);
// cmd is "tether start first_start first_stop second_start second_stop ..."
// an odd number of addrs will fail
- String cmd = "tether start";
+
+ final Command cmd = new Command("tether", "start");
for (String d : dhcpRange) {
- cmd += " " + d;
+ cmd.appendArg(d);
}
try {
- mConnector.doCommand(cmd);
+ mConnector.execute(cmd);
} catch (NativeDaemonConnectorException e) {
- throw new IllegalStateException("Unable to communicate to native daemon");
+ throw e.rethrowAsParcelableException();
}
}
@@ -753,9 +708,9 @@
public void stopTethering() {
mContext.enforceCallingOrSelfPermission(CHANGE_NETWORK_STATE, TAG);
try {
- mConnector.doCommand("tether stop");
+ mConnector.execute("tether", "stop");
} catch (NativeDaemonConnectorException e) {
- throw new IllegalStateException("Unable to communicate to native daemon to stop tether");
+ throw e.rethrowAsParcelableException();
}
}
@@ -763,38 +718,25 @@
public boolean isTetheringStarted() {
mContext.enforceCallingOrSelfPermission(ACCESS_NETWORK_STATE, TAG);
- ArrayList<String> rsp;
+ final NativeDaemonEvent event;
try {
- rsp = mConnector.doCommand("tether status");
+ event = mConnector.execute("tether", "status");
} catch (NativeDaemonConnectorException e) {
- throw new IllegalStateException(
- "Unable to communicate to native daemon to get tether status");
+ throw e.rethrowAsParcelableException();
}
- for (String line : rsp) {
- String[] tok = line.split(" ");
- if (tok.length < 3) {
- throw new IllegalStateException("Malformed response for tether status: " + line);
- }
- int code = Integer.parseInt(tok[0]);
- if (code == NetdResponseCode.TetherStatusResult) {
- // XXX: Tethering services <started/stopped> <TBD>...
- return "started".equals(tok[2]);
- } else {
- throw new IllegalStateException(String.format("Unexpected response code %d", code));
- }
- }
- throw new IllegalStateException("Got an empty response");
+ // 210 Tethering services started
+ event.checkCode(TetherStatusResult);
+ return event.getMessage().endsWith("started");
}
@Override
public void tetherInterface(String iface) {
mContext.enforceCallingOrSelfPermission(CHANGE_NETWORK_STATE, TAG);
try {
- mConnector.doCommand("tether interface add " + iface);
+ mConnector.execute("tether", "interface", "add", iface);
} catch (NativeDaemonConnectorException e) {
- throw new IllegalStateException(
- "Unable to communicate to native daemon for adding tether interface");
+ throw e.rethrowAsParcelableException();
}
}
@@ -802,10 +744,9 @@
public void untetherInterface(String iface) {
mContext.enforceCallingOrSelfPermission(CHANGE_NETWORK_STATE, TAG);
try {
- mConnector.doCommand("tether interface remove " + iface);
+ mConnector.execute("tether", "interface", "remove", iface);
} catch (NativeDaemonConnectorException e) {
- throw new IllegalStateException(
- "Unable to communicate to native daemon for removing tether interface");
+ throw e.rethrowAsParcelableException();
}
}
@@ -813,30 +754,27 @@
public String[] listTetheredInterfaces() {
mContext.enforceCallingOrSelfPermission(ACCESS_NETWORK_STATE, TAG);
try {
- return mConnector.doListCommand(
- "tether interface list", NetdResponseCode.TetherInterfaceListResult);
+ return NativeDaemonEvent.filterMessageList(
+ mConnector.executeForList("tether", "interface", "list"),
+ TetherInterfaceListResult);
} catch (NativeDaemonConnectorException e) {
- throw new IllegalStateException(
- "Unable to communicate to native daemon for listing tether interfaces");
+ throw e.rethrowAsParcelableException();
}
}
@Override
public void setDnsForwarders(String[] dns) {
mContext.enforceCallingOrSelfPermission(CHANGE_NETWORK_STATE, TAG);
+
+ final Command cmd = new Command("tether", "dns", "set");
+ for (String s : dns) {
+ cmd.appendArg(NetworkUtils.numericToInetAddress(s).getHostAddress());
+ }
+
try {
- String cmd = "tether dns set";
- for (String s : dns) {
- cmd += " " + NetworkUtils.numericToInetAddress(s).getHostAddress();
- }
- try {
- mConnector.doCommand(cmd);
- } catch (NativeDaemonConnectorException e) {
- throw new IllegalStateException(
- "Unable to communicate to native daemon for setting tether dns");
- }
- } catch (IllegalArgumentException e) {
- throw new IllegalStateException("Error resolving dns name", e);
+ mConnector.execute(cmd);
+ } catch (NativeDaemonConnectorException e) {
+ throw e.rethrowAsParcelableException();
}
}
@@ -844,63 +782,56 @@
public String[] getDnsForwarders() {
mContext.enforceCallingOrSelfPermission(ACCESS_NETWORK_STATE, TAG);
try {
- return mConnector.doListCommand(
- "tether dns list", NetdResponseCode.TetherDnsFwdTgtListResult);
+ return NativeDaemonEvent.filterMessageList(
+ mConnector.executeForList("tether", "dns", "list"), TetherDnsFwdTgtListResult);
} catch (NativeDaemonConnectorException e) {
- throw new IllegalStateException(
- "Unable to communicate to native daemon for listing tether dns");
+ throw e.rethrowAsParcelableException();
}
}
- private void modifyNat(String cmd, String internalInterface, String externalInterface)
+ private void modifyNat(String action, String internalInterface, String externalInterface)
throws SocketException {
- cmd = String.format("nat %s %s %s", cmd, internalInterface, externalInterface);
+ final Command cmd = new Command("nat", action, internalInterface, externalInterface);
- NetworkInterface internalNetworkInterface =
- NetworkInterface.getByName(internalInterface);
+ final NetworkInterface internalNetworkInterface = NetworkInterface.getByName(
+ internalInterface);
if (internalNetworkInterface == null) {
- cmd += " 0";
+ cmd.appendArg("0");
} else {
- Collection<InterfaceAddress>interfaceAddresses =
- internalNetworkInterface.getInterfaceAddresses();
- cmd += " " + interfaceAddresses.size();
+ Collection<InterfaceAddress> interfaceAddresses = internalNetworkInterface
+ .getInterfaceAddresses();
+ cmd.appendArg(interfaceAddresses.size());
for (InterfaceAddress ia : interfaceAddresses) {
- InetAddress addr = NetworkUtils.getNetworkPart(ia.getAddress(),
- ia.getNetworkPrefixLength());
- cmd = cmd + " " + addr.getHostAddress() + "/" + ia.getNetworkPrefixLength();
+ InetAddress addr = NetworkUtils.getNetworkPart(
+ ia.getAddress(), ia.getNetworkPrefixLength());
+ cmd.appendArg(addr.getHostAddress() + "/" + ia.getNetworkPrefixLength());
}
}
try {
- mConnector.doCommand(cmd);
+ mConnector.execute(cmd);
} catch (NativeDaemonConnectorException e) {
- e.rethrowAsParcelableException();
+ throw e.rethrowAsParcelableException();
}
}
@Override
public void enableNat(String internalInterface, String externalInterface) {
mContext.enforceCallingOrSelfPermission(CHANGE_NETWORK_STATE, TAG);
- if (DBG) Log.d(TAG, "enableNat(" + internalInterface + ", " + externalInterface + ")");
try {
modifyNat("enable", internalInterface, externalInterface);
- } catch (Exception e) {
- Log.e(TAG, "enableNat got Exception " + e.toString());
- throw new IllegalStateException(
- "Unable to communicate to native daemon for enabling NAT interface");
+ } catch (SocketException e) {
+ throw new IllegalStateException(e);
}
}
@Override
public void disableNat(String internalInterface, String externalInterface) {
mContext.enforceCallingOrSelfPermission(CHANGE_NETWORK_STATE, TAG);
- if (DBG) Log.d(TAG, "disableNat(" + internalInterface + ", " + externalInterface + ")");
try {
modifyNat("disable", internalInterface, externalInterface);
- } catch (Exception e) {
- Log.e(TAG, "disableNat got Exception " + e.toString());
- throw new IllegalStateException(
- "Unable to communicate to native daemon for disabling NAT interface");
+ } catch (SocketException e) {
+ throw new IllegalStateException(e);
}
}
@@ -908,10 +839,10 @@
public String[] listTtys() {
mContext.enforceCallingOrSelfPermission(ACCESS_NETWORK_STATE, TAG);
try {
- return mConnector.doListCommand("list_ttys", NetdResponseCode.TtyListResult);
+ return NativeDaemonEvent.filterMessageList(
+ mConnector.executeForList("list_ttys"), TtyListResult);
} catch (NativeDaemonConnectorException e) {
- throw new IllegalStateException(
- "Unable to communicate to native daemon for listing TTYs");
+ throw e.rethrowAsParcelableException();
}
}
@@ -920,15 +851,13 @@
String tty, String localAddr, String remoteAddr, String dns1Addr, String dns2Addr) {
mContext.enforceCallingOrSelfPermission(CHANGE_NETWORK_STATE, TAG);
try {
- mConnector.doCommand(String.format("pppd attach %s %s %s %s %s", tty,
+ mConnector.execute("pppd", "attach", tty,
NetworkUtils.numericToInetAddress(localAddr).getHostAddress(),
NetworkUtils.numericToInetAddress(remoteAddr).getHostAddress(),
NetworkUtils.numericToInetAddress(dns1Addr).getHostAddress(),
- NetworkUtils.numericToInetAddress(dns2Addr).getHostAddress()));
- } catch (IllegalArgumentException e) {
- throw new IllegalStateException("Error resolving addr", e);
+ NetworkUtils.numericToInetAddress(dns2Addr).getHostAddress());
} catch (NativeDaemonConnectorException e) {
- throw new IllegalStateException("Error communicating to native daemon to attach pppd", e);
+ throw e.rethrowAsParcelableException();
}
}
@@ -936,9 +865,9 @@
public void detachPppd(String tty) {
mContext.enforceCallingOrSelfPermission(CHANGE_NETWORK_STATE, TAG);
try {
- mConnector.doCommand(String.format("pppd detach %s", tty));
+ mConnector.execute("pppd", "detach", tty);
} catch (NativeDaemonConnectorException e) {
- throw new IllegalStateException("Error communicating to native daemon to detach pppd", e);
+ throw e.rethrowAsParcelableException();
}
}
@@ -949,42 +878,20 @@
mContext.enforceCallingOrSelfPermission(CHANGE_WIFI_STATE, TAG);
try {
wifiFirmwareReload(wlanIface, "AP");
- mConnector.doCommand(String.format("softap start " + wlanIface));
+ mConnector.execute("softap", "start", wlanIface);
if (wifiConfig == null) {
- mConnector.doCommand(String.format("softap set " + wlanIface + " " + softapIface));
+ mConnector.execute("softap", "set", wlanIface, softapIface);
} else {
- /**
- * softap set arg1 arg2 arg3 [arg4 arg5 arg6 arg7 arg8]
- * argv1 - wlan interface
- * argv2 - softap interface
- * argv3 - SSID
- * argv4 - Security
- * argv5 - Key
- * argv6 - Channel
- * argv7 - Preamble
- * argv8 - Max SCB
- */
- String str = String.format("softap set " + wlanIface + " " + softapIface +
- " %s %s %s", convertQuotedString(wifiConfig.SSID),
- getSecurityType(wifiConfig),
- convertQuotedString(wifiConfig.preSharedKey));
- mConnector.doCommand(str);
+ mConnector.execute("softap", "set", wlanIface, softapIface, wifiConfig.SSID,
+ getSecurityType(wifiConfig), wifiConfig.preSharedKey);
}
- mConnector.doCommand(String.format("softap startap"));
+ mConnector.execute("softap", "startap");
} catch (NativeDaemonConnectorException e) {
- throw new IllegalStateException("Error communicating to native daemon to start softap", e);
+ throw e.rethrowAsParcelableException();
}
}
- private String convertQuotedString(String s) {
- if (s == null) {
- return s;
- }
- /* Replace \ with \\, then " with \" and add quotes at end */
- return '"' + s.replaceAll("\\\\","\\\\\\\\").replaceAll("\"","\\\\\"") + '"';
- }
-
- private String getSecurityType(WifiConfiguration wifiConfig) {
+ private static String getSecurityType(WifiConfiguration wifiConfig) {
switch (wifiConfig.getAuthType()) {
case KeyMgmt.WPA_PSK:
return "wpa-psk";
@@ -1001,9 +908,9 @@
mContext.enforceCallingOrSelfPermission(CHANGE_NETWORK_STATE, TAG);
mContext.enforceCallingOrSelfPermission(CHANGE_WIFI_STATE, TAG);
try {
- mConnector.doCommand(String.format("softap fwreload " + wlanIface + " " + mode));
+ mConnector.execute("softap", "fwreload", wlanIface, mode);
} catch (NativeDaemonConnectorException e) {
- throw new IllegalStateException("Error communicating to native daemon ", e);
+ throw e.rethrowAsParcelableException();
}
}
@@ -1012,12 +919,11 @@
mContext.enforceCallingOrSelfPermission(CHANGE_NETWORK_STATE, TAG);
mContext.enforceCallingOrSelfPermission(CHANGE_WIFI_STATE, TAG);
try {
- mConnector.doCommand("softap stopap");
- mConnector.doCommand("softap stop " + wlanIface);
+ mConnector.execute("softap", "stopap");
+ mConnector.execute("softap", "stop", wlanIface);
wifiFirmwareReload(wlanIface, "STA");
} catch (NativeDaemonConnectorException e) {
- throw new IllegalStateException("Error communicating to native daemon to stop soft AP",
- e);
+ throw e.rethrowAsParcelableException();
}
}
@@ -1027,59 +933,16 @@
mContext.enforceCallingOrSelfPermission(CHANGE_WIFI_STATE, TAG);
try {
if (wifiConfig == null) {
- mConnector.doCommand(String.format("softap set " + wlanIface + " " + softapIface));
+ mConnector.execute("softap", "set", wlanIface, softapIface);
} else {
- String str = String.format("softap set " + wlanIface + " " + softapIface
- + " %s %s %s", convertQuotedString(wifiConfig.SSID),
- getSecurityType(wifiConfig),
- convertQuotedString(wifiConfig.preSharedKey));
- mConnector.doCommand(str);
+ mConnector.execute("softap", "set", wlanIface, softapIface, wifiConfig.SSID,
+ getSecurityType(wifiConfig), wifiConfig.preSharedKey);
}
} catch (NativeDaemonConnectorException e) {
- throw new IllegalStateException("Error communicating to native daemon to set soft AP",
- e);
+ throw e.rethrowAsParcelableException();
}
}
- private long getInterfaceCounter(String iface, boolean rx) {
- mContext.enforceCallingOrSelfPermission(ACCESS_NETWORK_STATE, TAG);
- try {
- String rsp;
- try {
- rsp = mConnector.doCommand(
- String.format("interface read%scounter %s", (rx ? "rx" : "tx"), iface)).get(0);
- } catch (NativeDaemonConnectorException e1) {
- Slog.e(TAG, "Error communicating with native daemon", e1);
- return -1;
- }
-
- String[] tok = rsp.split(" ");
- if (tok.length < 2) {
- Slog.e(TAG, String.format("Malformed response for reading %s interface",
- (rx ? "rx" : "tx")));
- return -1;
- }
-
- int code;
- try {
- code = Integer.parseInt(tok[0]);
- } catch (NumberFormatException nfe) {
- Slog.e(TAG, String.format("Error parsing code %s", tok[0]));
- return -1;
- }
- if ((rx && code != NetdResponseCode.InterfaceRxCounterResult) || (
- !rx && code != NetdResponseCode.InterfaceTxCounterResult)) {
- Slog.e(TAG, String.format("Unexpected response code %d", code));
- return -1;
- }
- return Long.parseLong(tok[1]);
- } catch (Exception e) {
- Slog.e(TAG, String.format(
- "Failed to read interface %s counters", (rx ? "rx" : "tx")), e);
- }
- return -1;
- }
-
@Override
public NetworkStats getNetworkStatsSummary() {
mContext.enforceCallingOrSelfPermission(ACCESS_NETWORK_STATE, TAG);
@@ -1105,15 +968,12 @@
throw new IllegalStateException("iface " + iface + " already has quota");
}
- final StringBuilder command = new StringBuilder();
- command.append("bandwidth setiquota ").append(iface).append(" ").append(quotaBytes);
-
try {
// TODO: support quota shared across interfaces
- mConnector.doCommand(command.toString());
+ mConnector.execute("bandwidth", "setiquota", iface, quotaBytes);
mActiveQuotaIfaces.add(iface);
} catch (NativeDaemonConnectorException e) {
- throw new IllegalStateException("Error communicating to native daemon", e);
+ throw e.rethrowAsParcelableException();
}
}
}
@@ -1132,18 +992,14 @@
return;
}
- final StringBuilder command = new StringBuilder();
- command.append("bandwidth removeiquota ").append(iface);
-
mActiveQuotaIfaces.remove(iface);
mActiveAlertIfaces.remove(iface);
try {
// TODO: support quota shared across interfaces
- mConnector.doCommand(command.toString());
+ mConnector.execute("bandwidth", "removeiquota", iface);
} catch (NativeDaemonConnectorException e) {
- // TODO: include current iptables state
- throw new IllegalStateException("Error communicating to native daemon", e);
+ throw e.rethrowAsParcelableException();
}
}
}
@@ -1166,16 +1022,12 @@
throw new IllegalStateException("iface " + iface + " already has alert");
}
- final StringBuilder command = new StringBuilder();
- command.append("bandwidth setinterfacealert ").append(iface).append(" ").append(
- alertBytes);
-
try {
// TODO: support alert shared across interfaces
- mConnector.doCommand(command.toString());
+ mConnector.execute("bandwidth", "setinterfacealert", iface, alertBytes);
mActiveAlertIfaces.add(iface);
} catch (NativeDaemonConnectorException e) {
- throw new IllegalStateException("Error communicating to native daemon", e);
+ throw e.rethrowAsParcelableException();
}
}
}
@@ -1194,15 +1046,12 @@
return;
}
- final StringBuilder command = new StringBuilder();
- command.append("bandwidth removeinterfacealert ").append(iface);
-
try {
// TODO: support alert shared across interfaces
- mConnector.doCommand(command.toString());
+ mConnector.execute("bandwidth", "removeinterfacealert", iface);
mActiveAlertIfaces.remove(iface);
} catch (NativeDaemonConnectorException e) {
- throw new IllegalStateException("Error communicating to native daemon", e);
+ throw e.rethrowAsParcelableException();
}
}
}
@@ -1215,13 +1064,10 @@
// TODO: eventually migrate to be always enabled
if (!mBandwidthControlEnabled) return;
- final StringBuilder command = new StringBuilder();
- command.append("bandwidth setglobalalert ").append(alertBytes);
-
try {
- mConnector.doCommand(command.toString());
+ mConnector.execute("bandwidth", "setglobalalert", alertBytes);
} catch (NativeDaemonConnectorException e) {
- throw new IllegalStateException("Error communicating to native daemon", e);
+ throw e.rethrowAsParcelableException();
}
}
@@ -1240,24 +1086,16 @@
return;
}
- final StringBuilder command = new StringBuilder();
- command.append("bandwidth");
- if (rejectOnQuotaInterfaces) {
- command.append(" addnaughtyapps");
- } else {
- command.append(" removenaughtyapps");
- }
- command.append(" ").append(uid);
-
try {
- mConnector.doCommand(command.toString());
+ mConnector.execute("bandwidth",
+ rejectOnQuotaInterfaces ? "addnaughtyapps" : "removenaughtyapps", uid);
if (rejectOnQuotaInterfaces) {
mUidRejectOnQuota.put(uid, true);
} else {
mUidRejectOnQuota.delete(uid);
}
} catch (NativeDaemonConnectorException e) {
- throw new IllegalStateException("Error communicating to native daemon", e);
+ throw e.rethrowAsParcelableException();
}
}
}
@@ -1297,33 +1135,19 @@
}
private NetworkStats.Entry getNetworkStatsTethering(String ifaceIn, String ifaceOut) {
- final StringBuilder command = new StringBuilder();
- command.append("bandwidth gettetherstats ").append(ifaceIn).append(" ").append(ifaceOut);
-
- final String rsp;
+ final NativeDaemonEvent event;
try {
- rsp = mConnector.doCommand(command.toString()).get(0);
+ event = mConnector.execute("bandwidth", "gettetherstats", ifaceIn, ifaceOut);
} catch (NativeDaemonConnectorException e) {
- throw new IllegalStateException("Error communicating to native daemon", e);
+ throw e.rethrowAsParcelableException();
}
- final String[] tok = rsp.split(" ");
- /* Expecting: "code ifaceIn ifaceOut rx_bytes rx_packets tx_bytes tx_packets" */
- if (tok.length != 7) {
- throw new IllegalStateException("Native daemon returned unexpected result: " + rsp);
- }
+ event.checkCode(TetheringStatsResult);
- final int code;
- try {
- code = Integer.parseInt(tok[0]);
- } catch (NumberFormatException e) {
- throw new IllegalStateException(
- "Failed to parse native daemon return code for " + ifaceIn + " " + ifaceOut);
- }
- if (code != NetdResponseCode.TetheringStatsResult) {
- throw new IllegalStateException(
- "Unexpected return code from native daemon for " + ifaceIn + " " + ifaceOut);
- }
+ // 221 ifaceIn ifaceOut rx_bytes rx_packets tx_bytes tx_packets
+ final StringTokenizer tok = new StringTokenizer(event.getMessage());
+ tok.nextToken();
+ tok.nextToken();
try {
final NetworkStats.Entry entry = new NetworkStats.Entry();
@@ -1331,10 +1155,10 @@
entry.uid = UID_TETHERING;
entry.set = SET_DEFAULT;
entry.tag = TAG_NONE;
- entry.rxBytes = Long.parseLong(tok[3]);
- entry.rxPackets = Long.parseLong(tok[4]);
- entry.txBytes = Long.parseLong(tok[5]);
- entry.txPackets = Long.parseLong(tok[6]);
+ entry.rxBytes = Long.parseLong(tok.nextToken());
+ entry.rxPackets = Long.parseLong(tok.nextToken());
+ entry.txBytes = Long.parseLong(tok.nextToken());
+ entry.txPackets = Long.parseLong(tok.nextToken());
return entry;
} catch (NumberFormatException e) {
throw new IllegalStateException(
@@ -1346,50 +1170,33 @@
public void setInterfaceThrottle(String iface, int rxKbps, int txKbps) {
mContext.enforceCallingOrSelfPermission(CHANGE_NETWORK_STATE, TAG);
try {
- mConnector.doCommand(String.format(
- "interface setthrottle %s %d %d", iface, rxKbps, txKbps));
+ mConnector.execute("interface", "setthrottle", iface, rxKbps, txKbps);
} catch (NativeDaemonConnectorException e) {
- Slog.e(TAG, "Error communicating with native daemon to set throttle", e);
+ throw e.rethrowAsParcelableException();
}
}
private int getInterfaceThrottle(String iface, boolean rx) {
mContext.enforceCallingOrSelfPermission(ACCESS_NETWORK_STATE, TAG);
+
+ final NativeDaemonEvent event;
try {
- String rsp;
- try {
- rsp = mConnector.doCommand(
- String.format("interface getthrottle %s %s", iface,
- (rx ? "rx" : "tx"))).get(0);
- } catch (NativeDaemonConnectorException e) {
- Slog.e(TAG, "Error communicating with native daemon to getthrottle", e);
- return -1;
- }
-
- String[] tok = rsp.split(" ");
- if (tok.length < 2) {
- Slog.e(TAG, "Malformed response to getthrottle command");
- return -1;
- }
-
- int code;
- try {
- code = Integer.parseInt(tok[0]);
- } catch (NumberFormatException nfe) {
- Slog.e(TAG, String.format("Error parsing code %s", tok[0]));
- return -1;
- }
- if ((rx && code != NetdResponseCode.InterfaceRxThrottleResult) || (
- !rx && code != NetdResponseCode.InterfaceTxThrottleResult)) {
- Slog.e(TAG, String.format("Unexpected response code %d", code));
- return -1;
- }
- return Integer.parseInt(tok[1]);
- } catch (Exception e) {
- Slog.e(TAG, String.format(
- "Failed to read interface %s throttle value", (rx ? "rx" : "tx")), e);
+ event = mConnector.execute("interface", "getthrottle", iface, rx ? "rx" : "tx");
+ } catch (NativeDaemonConnectorException e) {
+ throw e.rethrowAsParcelableException();
}
- return -1;
+
+ if (rx) {
+ event.checkCode(InterfaceRxThrottleResult);
+ } else {
+ event.checkCode(InterfaceTxThrottleResult);
+ }
+
+ try {
+ return Integer.parseInt(event.getMessage());
+ } catch (NumberFormatException e) {
+ throw new IllegalStateException("unexpected response:" + event);
+ }
}
@Override
@@ -1406,32 +1213,28 @@
public void setDefaultInterfaceForDns(String iface) {
mContext.enforceCallingOrSelfPermission(CHANGE_NETWORK_STATE, TAG);
try {
- String cmd = "resolver setdefaultif " + iface;
-
- mConnector.doCommand(cmd);
+ mConnector.execute("resolver", "setdefaultif", iface);
} catch (NativeDaemonConnectorException e) {
- throw new IllegalStateException(
- "Error communicating with native daemon to set default interface", e);
+ throw e.rethrowAsParcelableException();
}
}
@Override
public void setDnsServersForInterface(String iface, String[] servers) {
mContext.enforceCallingOrSelfPermission(CHANGE_NETWORK_STATE, TAG);
- try {
- String cmd = "resolver setifdns " + iface;
- for (String s : servers) {
- InetAddress a = NetworkUtils.numericToInetAddress(s);
- if (a.isAnyLocalAddress() == false) {
- cmd += " " + a.getHostAddress();
- }
+
+ final Command cmd = new Command("resolver", "setifdns", iface);
+ for (String s : servers) {
+ InetAddress a = NetworkUtils.numericToInetAddress(s);
+ if (a.isAnyLocalAddress() == false) {
+ cmd.appendArg(a.getHostAddress());
}
- mConnector.doCommand(cmd);
- } catch (IllegalArgumentException e) {
- throw new IllegalStateException("Error setting dnsn for interface", e);
+ }
+
+ try {
+ mConnector.execute(cmd);
} catch (NativeDaemonConnectorException e) {
- throw new IllegalStateException(
- "Error communicating with native daemon to set dns for interface", e);
+ throw e.rethrowAsParcelableException();
}
}
@@ -1439,12 +1242,9 @@
public void flushDefaultDnsCache() {
mContext.enforceCallingOrSelfPermission(CHANGE_NETWORK_STATE, TAG);
try {
- String cmd = "resolver flushdefaultif";
-
- mConnector.doCommand(cmd);
+ mConnector.execute("resolver", "flushdefaultif");
} catch (NativeDaemonConnectorException e) {
- throw new IllegalStateException(
- "Error communicating with native deamon to flush default interface", e);
+ throw e.rethrowAsParcelableException();
}
}
@@ -1452,12 +1252,9 @@
public void flushInterfaceDnsCache(String iface) {
mContext.enforceCallingOrSelfPermission(CHANGE_NETWORK_STATE, TAG);
try {
- String cmd = "resolver flushif " + iface;
-
- mConnector.doCommand(cmd);
+ mConnector.execute("resolver", "flushif", iface);
} catch (NativeDaemonConnectorException e) {
- throw new IllegalStateException(
- "Error communicating with native daemon to flush interface " + iface, e);
+ throw e.rethrowAsParcelableException();
}
}
diff --git a/services/java/com/android/server/TextServicesManagerService.java b/services/java/com/android/server/TextServicesManagerService.java
index d04b440..8384ebc 100644
--- a/services/java/com/android/server/TextServicesManagerService.java
+++ b/services/java/com/android/server/TextServicesManagerService.java
@@ -392,9 +392,16 @@
Slog.d(TAG, "FinishSpellCheckerService");
}
synchronized(mSpellCheckerMap) {
+ final ArrayList<SpellCheckerBindGroup> removeList =
+ new ArrayList<SpellCheckerBindGroup>();
for (SpellCheckerBindGroup group : mSpellCheckerBindGroups.values()) {
if (group == null) continue;
- group.removeListener(listener);
+ // Use removeList to avoid modifying mSpellCheckerBindGroups in this loop.
+ removeList.add(group);
+ }
+ final int removeSize = removeList.size();
+ for (int i = 0; i < removeSize; ++i) {
+ removeList.get(i).removeListener(listener);
}
}
}
@@ -669,6 +676,7 @@
}
}
+ // cleanLocked may remove elements from mSpellCheckerBindGroups
private void cleanLocked() {
if (DBG) {
Slog.d(TAG, "cleanLocked");
diff --git a/services/java/com/android/server/accessibility/AccessibilityManagerService.java b/services/java/com/android/server/accessibility/AccessibilityManagerService.java
index 30c12f9..23fa94a 100644
--- a/services/java/com/android/server/accessibility/AccessibilityManagerService.java
+++ b/services/java/com/android/server/accessibility/AccessibilityManagerService.java
@@ -115,8 +115,8 @@
private final Set<ComponentName> mEnabledServices = new HashSet<ComponentName>();
- private final SparseArray<IAccessibilityInteractionConnection> mWindowIdToInteractionConnectionMap =
- new SparseArray<IAccessibilityInteractionConnection>();
+ private final SparseArray<AccessibilityConnectionWrapper> mWindowIdToInteractionConnectionWrapperMap =
+ new SparseArray<AccessibilityConnectionWrapper>();
private final SparseArray<IBinder> mWindowIdToWindowTokenMap = new SparseArray<IBinder>();
@@ -439,16 +439,11 @@
final IWindow addedWindowToken = windowToken;
final IAccessibilityInteractionConnection addedConnection = connection;
final int windowId = sNextWindowId++;
- addedConnection.asBinder().linkToDeath(new DeathRecipient() {
- public void binderDied() {
- synchronized (mLock) {
- addedConnection.asBinder().unlinkToDeath(this, 0);
- removeAccessibilityInteractionConnection(addedWindowToken);
- }
- }
- }, 0);
+ AccessibilityConnectionWrapper wrapper = new AccessibilityConnectionWrapper(windowId,
+ connection);
+ wrapper.linkToDeath();
mWindowIdToWindowTokenMap.put(windowId, addedWindowToken.asBinder());
- mWindowIdToInteractionConnectionMap.put(windowId, connection);
+ mWindowIdToInteractionConnectionWrapperMap.put(windowId, wrapper);
if (DEBUG) {
Slog.i(LOG_TAG, "Adding interaction connection to windowId: " + windowId);
}
@@ -462,18 +457,17 @@
for (int i = 0; i < count; i++) {
if (mWindowIdToWindowTokenMap.valueAt(i) == windowToken.asBinder()) {
final int windowId = mWindowIdToWindowTokenMap.keyAt(i);
- mWindowIdToWindowTokenMap.remove(windowId);
- mWindowIdToInteractionConnectionMap.remove(windowId);
- if (DEBUG) {
- Slog.i(LOG_TAG, "Removing interaction connection to windowId: " + windowId);
- }
+ AccessibilityConnectionWrapper wrapper =
+ mWindowIdToInteractionConnectionWrapperMap.get(windowId);
+ wrapper.unlinkToDeath();
+ removeAccessibilityInteractionConnectionLocked(windowId);
return;
}
}
}
}
- public IAccessibilityServiceConnection registerEventListener(IEventListener listener) {
+ public void registerEventListener(IEventListener listener) {
mSecurityPolicy.enforceCallingPermission(Manifest.permission.RETRIEVE_WINDOW_CONTENT,
FUNCTION_REGISTER_EVENT_LISTENER);
ComponentName componentName = new ComponentName("foo.bar",
@@ -501,7 +495,19 @@
accessibilityServiceInfo.feedbackType = AccessibilityServiceInfo.FEEDBACK_GENERIC;
Service service = new Service(componentName, accessibilityServiceInfo, true);
service.onServiceConnected(componentName, listener.asBinder());
- return service;
+ }
+
+ /**
+ * Removes an AccessibilityInteractionConnection.
+ *
+ * @param windowId The id of the window to which the connection is targeted.
+ */
+ private void removeAccessibilityInteractionConnectionLocked(int windowId) {
+ mWindowIdToWindowTokenMap.remove(windowId);
+ mWindowIdToInteractionConnectionWrapperMap.remove(windowId);
+ if (DEBUG) {
+ Slog.i(LOG_TAG, "Removing interaction connection to windowId: " + windowId);
+ }
}
/**
@@ -594,6 +600,13 @@
*/
private void notifyEventListenerLocked(Service service, int eventType) {
IEventListener listener = service.mServiceInterface;
+
+ // If the service died/was disabled while the message for dispatching
+ // the accessibility event was propagating the listener may be null.
+ if (listener == null) {
+ return;
+ }
+
AccessibilityEvent event = service.mPendingEvents.get(eventType);
// Check for null here because there is a concurrent scenario in which this
@@ -618,7 +631,7 @@
service.mPendingEvents.remove(eventType);
try {
if (mSecurityPolicy.canRetrieveWindowContent(service)) {
- event.setConnection(service);
+ event.setConnectionId(service.mId);
} else {
event.setSource(null);
}
@@ -666,6 +679,7 @@
mComponentNameToServiceMap.remove(service.mComponentName);
mHandler.removeMessages(service.mId);
service.unlinkToOwnDeath();
+ service.dispose();
updateInputFilterLocked();
return removed;
}
@@ -895,6 +909,33 @@
sendStateToClientsLocked();
}
+ private class AccessibilityConnectionWrapper implements DeathRecipient {
+ private final int mWindowId;
+ private final IAccessibilityInteractionConnection mConnection;
+
+ public AccessibilityConnectionWrapper(int windowId,
+ IAccessibilityInteractionConnection connection) {
+ mWindowId = windowId;
+ mConnection = connection;
+ }
+
+ public void linkToDeath() throws RemoteException {
+ mConnection.asBinder().linkToDeath(this, 0);
+ }
+
+ public void unlinkToDeath() {
+ mConnection.asBinder().unlinkToDeath(this, 0);
+ }
+
+ @Override
+ public void binderDied() {
+ unlinkToDeath();
+ synchronized (mLock) {
+ removeAccessibilityInteractionConnectionLocked(mWindowId);
+ }
+ }
+ }
+
/**
* This class represents an accessibility service. It stores all per service
* data required for the service management, provides API for starting/stopping the
@@ -997,7 +1038,6 @@
if (!mIsAutomation) {
mContext.unbindService(this);
}
- mService = null;
return true;
}
return false;
@@ -1021,7 +1061,7 @@
mService = service;
mServiceInterface = IEventListener.Stub.asInterface(service);
try {
- mServiceInterface.setConnection(this);
+ mServiceInterface.setConnection(this, mId);
synchronized (mLock) {
tryAddServiceLocked(this);
}
@@ -1123,14 +1163,16 @@
if (!permissionGranted) {
return 0;
} else {
- connection = mWindowIdToInteractionConnectionMap.get(accessibilityWindowId);
- if (connection == null) {
+ AccessibilityConnectionWrapper wrapper =
+ mWindowIdToInteractionConnectionWrapperMap.get(accessibilityWindowId);
+ if (wrapper == null) {
if (DEBUG) {
Slog.e(LOG_TAG, "No interaction connection to window: "
+ accessibilityWindowId);
}
return 0;
}
+ connection = wrapper.mConnection;
}
}
final int interrogatingPid = Binder.getCallingPid();
@@ -1159,14 +1201,16 @@
if (!permissionGranted) {
return false;
} else {
- connection = mWindowIdToInteractionConnectionMap.get(accessibilityWindowId);
- if (connection == null) {
+ AccessibilityConnectionWrapper wrapper =
+ mWindowIdToInteractionConnectionWrapperMap.get(accessibilityWindowId);
+ if (wrapper == null) {
if (DEBUG) {
Slog.e(LOG_TAG, "No interaction connection to window: "
+ accessibilityWindowId);
}
return false;
}
+ connection = wrapper.mConnection;
}
}
final int interrogatingPid = Binder.getCallingPid();
@@ -1197,9 +1241,21 @@
mService.unlinkToDeath(this, 0);
}
+ public void dispose() {
+ try {
+ // Clear the proxy in the other process so this
+ // IAccessibilityServiceConnection can be garbage collected.
+ mServiceInterface.setConnection(null, mId);
+ } catch (RemoteException re) {
+ /* ignore */
+ }
+ mService = null;
+ mServiceInterface = null;
+ }
+
public void binderDied() {
synchronized (mLock) {
- mService.unlinkToDeath(this, 0);
+ unlinkToOwnDeath();
tryRemoveServiceLocked(this);
// We no longer have an automation service, so restore
// the state based on values in the settings database.
@@ -1214,7 +1270,9 @@
if (DEBUG) {
Slog.i(LOG_TAG, "Trying to get interaction connection to windowId: " + windowId);
}
- return mWindowIdToInteractionConnectionMap.get(windowId);
+ AccessibilityConnectionWrapper wrapper =
+ mWindowIdToInteractionConnectionWrapperMap.get(windowId);
+ return (wrapper != null) ? wrapper.mConnection : null;
}
private float getCompatibilityScale(int windowId) {
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index b36ba3a..a4d321d 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -414,7 +414,12 @@
* is in a different process from the one they are currently in.
*/
ProcessRecord mPreviousProcess;
-
+
+ /**
+ * The time at which the previous process was last visible.
+ */
+ long mPreviousProcessVisibleTime;
+
/**
* Packages that the user has asked to have run in screen size
* compatibility mode instead of filling the screen.
@@ -8361,6 +8366,12 @@
pw.println();
pw.println(" mHomeProcess: " + mHomeProcess);
pw.println(" mPreviousProcess: " + mPreviousProcess);
+ if (dumpAll) {
+ StringBuilder sb = new StringBuilder(128);
+ sb.append(" mPreviousProcessVisibleTime: ");
+ TimeUtils.formatDuration(mPreviousProcessVisibleTime, sb);
+ pw.println(sb);
+ }
if (mHeavyWeightProcess != null) {
pw.println(" mHeavyWeightProcess: " + mHeavyWeightProcess);
}
diff --git a/services/java/com/android/server/am/ActivityRecord.java b/services/java/com/android/server/am/ActivityRecord.java
index 951a946..c819114 100644
--- a/services/java/com/android/server/am/ActivityRecord.java
+++ b/services/java/com/android/server/am/ActivityRecord.java
@@ -80,6 +80,7 @@
ThumbnailHolder thumbHolder; // where our thumbnails should go.
long launchTime; // when we starting launching this activity
long startTime; // last time this activity was started
+ long lastVisibleTime; // last time this activity became visible
long cpuTimeAtResume; // the cpu time of host process at the time of resuming activity
Configuration configuration; // configuration activity was last running in
CompatibilityInfo compat;// last used compatibility mode
@@ -188,6 +189,10 @@
TimeUtils.formatDuration(launchTime, pw); pw.print(" startTime=");
TimeUtils.formatDuration(startTime, pw); pw.println("");
}
+ if (lastVisibleTime != 0) {
+ pw.print(prefix); pw.print("lastVisibleTime=");
+ TimeUtils.formatDuration(lastVisibleTime, pw); pw.println("");
+ }
if (waitingVisible || nowVisible) {
pw.print(prefix); pw.print("waitingVisible="); pw.print(waitingVisible);
pw.print(" nowVisible="); pw.println(nowVisible);
@@ -632,6 +637,7 @@
ActivityManagerService.TAG, "windowsVisible(): " + this);
if (!nowVisible) {
nowVisible = true;
+ lastVisibleTime = SystemClock.uptimeMillis();
if (!idle) {
// Instead of doing the full stop routine here, let's just
// hide any activities we now can, and let them stop when
diff --git a/services/java/com/android/server/am/ActivityStack.java b/services/java/com/android/server/am/ActivityStack.java
index c7ce3c3..b5edc0a 100644
--- a/services/java/com/android/server/am/ActivityStack.java
+++ b/services/java/com/android/server/am/ActivityStack.java
@@ -949,6 +949,22 @@
if (r.configDestroy) {
destroyActivityLocked(r, true, false, "stop-config");
resumeTopActivityLocked(null);
+ } else {
+ // Now that this process has stopped, we may want to consider
+ // it to be the previous app to try to keep around in case
+ // the user wants to return to it.
+ ProcessRecord fgApp = null;
+ if (mResumedActivity != null) {
+ fgApp = mResumedActivity.app;
+ } else if (mPausingActivity != null) {
+ fgApp = mPausingActivity.app;
+ }
+ if (r.app != null && fgApp != null && r.app != fgApp
+ && r.lastVisibleTime > mService.mPreviousProcessVisibleTime
+ && r.app != mService.mHomeProcess) {
+ mService.mPreviousProcess = r.app;
+ mService.mPreviousProcessVisibleTime = r.lastVisibleTime;
+ }
}
}
}
@@ -1363,14 +1379,6 @@
+ ", nowVisible=" + next.nowVisible);
}
}
-
- if (!prev.finishing && prev.app != null && prev.app != next.app
- && prev.app != mService.mHomeProcess) {
- // We are switching to a new activity that is in a different
- // process than the previous one. Note the previous process,
- // so we can try to keep it around.
- mService.mPreviousProcess = prev.app;
- }
}
// Launching this app's activity, make sure the app is no longer
diff --git a/services/java/com/android/server/wm/DragState.java b/services/java/com/android/server/wm/DragState.java
index 73cd64e..a19035a 100644
--- a/services/java/com/android/server/wm/DragState.java
+++ b/services/java/com/android/server/wm/DragState.java
@@ -16,6 +16,7 @@
package com.android.server.wm;
+import com.android.server.wm.WindowManagerService.DragInputEventReceiver;
import com.android.server.wm.WindowManagerService.H;
import android.content.ClipData;
@@ -28,7 +29,6 @@
import android.util.Slog;
import android.view.DragEvent;
import android.view.InputChannel;
-import android.view.InputQueue;
import android.view.Surface;
import android.view.View;
import android.view.WindowManager;
@@ -50,6 +50,7 @@
float mCurrentX, mCurrentY;
float mThumbOffsetX, mThumbOffsetY;
InputChannel mServerChannel, mClientChannel;
+ DragInputEventReceiver mInputEventReceiver;
InputApplicationHandle mDragApplicationHandle;
InputWindowHandle mDragWindowHandle;
WindowState mTargetWindow;
@@ -90,8 +91,8 @@
mServerChannel = channels[0];
mClientChannel = channels[1];
mService.mInputManager.registerInputChannel(mServerChannel, null);
- InputQueue.registerInputChannel(mClientChannel, mService.mDragInputHandler,
- mService.mH.getLooper().getQueue());
+ mInputEventReceiver = mService.new DragInputEventReceiver(mClientChannel,
+ mService.mH.getLooper());
mDragApplicationHandle = new InputApplicationHandle(null);
mDragApplicationHandle.name = "drag";
@@ -139,7 +140,8 @@
Slog.e(WindowManagerService.TAG, "Unregister of nonexistent drag input channel");
} else {
mService.mInputManager.unregisterInputChannel(mServerChannel);
- InputQueue.unregisterInputChannel(mClientChannel);
+ mInputEventReceiver.dispose();
+ mInputEventReceiver = null;
mClientChannel.dispose();
mServerChannel.dispose();
mClientChannel = null;
diff --git a/services/java/com/android/server/wm/FakeWindowImpl.java b/services/java/com/android/server/wm/FakeWindowImpl.java
index 0e72f7d..121ce18 100644
--- a/services/java/com/android/server/wm/FakeWindowImpl.java
+++ b/services/java/com/android/server/wm/FakeWindowImpl.java
@@ -20,7 +20,7 @@
import android.os.Process;
import android.util.Slog;
import android.view.InputChannel;
-import android.view.InputHandler;
+import android.view.InputEventReceiver;
import android.view.InputQueue;
import android.view.WindowManagerPolicy;
@@ -29,11 +29,13 @@
final InputChannel mServerChannel, mClientChannel;
final InputApplicationHandle mApplicationHandle;
final InputWindowHandle mWindowHandle;
+ final InputEventReceiver mInputEventReceiver;
final int mWindowLayer;
boolean mTouchFullscreen;
- public FakeWindowImpl(WindowManagerService service, Looper looper, InputHandler inputHandler,
+ public FakeWindowImpl(WindowManagerService service,
+ Looper looper, InputEventReceiver.Factory inputEventReceiverFactory,
String name, int windowType, int layoutParamsFlags, boolean canReceiveKeys,
boolean hasFocus, boolean touchFullscreen) {
mService = service;
@@ -42,7 +44,9 @@
mServerChannel = channels[0];
mClientChannel = channels[1];
mService.mInputManager.registerInputChannel(mServerChannel, null);
- InputQueue.registerInputChannel(mClientChannel, inputHandler, looper.getQueue());
+
+ mInputEventReceiver = inputEventReceiverFactory.createInputEventReceiver(
+ mClientChannel, looper);
mApplicationHandle = new InputApplicationHandle(null);
mApplicationHandle.name = name;
@@ -87,8 +91,8 @@
public void dismiss() {
synchronized (mService.mWindowMap) {
if (mService.removeFakeWindowLocked(this)) {
+ mInputEventReceiver.dispose();
mService.mInputManager.unregisterInputChannel(mServerChannel);
- InputQueue.unregisterInputChannel(mClientChannel);
mClientChannel.dispose();
mServerChannel.dispose();
}
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java
index f5c2de9..75ace4f 100644
--- a/services/java/com/android/server/wm/WindowManagerService.java
+++ b/services/java/com/android/server/wm/WindowManagerService.java
@@ -36,7 +36,6 @@
import com.android.internal.app.IBatteryStats;
import com.android.internal.policy.PolicyManager;
import com.android.internal.policy.impl.PhoneWindowManager;
-import com.android.internal.view.BaseInputHandler;
import com.android.internal.view.IInputContext;
import com.android.internal.view.IInputMethodClient;
import com.android.internal.view.IInputMethodManager;
@@ -107,8 +106,7 @@
import android.view.InputChannel;
import android.view.InputDevice;
import android.view.InputEvent;
-import android.view.InputHandler;
-import android.view.InputQueue;
+import android.view.InputEventReceiver;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.Surface;
@@ -571,18 +569,25 @@
boolean mTurnOnScreen;
DragState mDragState = null;
- final InputHandler mDragInputHandler = new BaseInputHandler() {
+
+ final class DragInputEventReceiver extends InputEventReceiver {
+ public DragInputEventReceiver(InputChannel inputChannel, Looper looper) {
+ super(inputChannel, looper);
+ }
+
@Override
- public void handleMotion(MotionEvent event, InputQueue.FinishedCallback finishedCallback) {
+ public void onInputEvent(InputEvent event) {
boolean handled = false;
try {
- if ((event.getSource() & InputDevice.SOURCE_CLASS_POINTER) != 0
+ if (event instanceof MotionEvent
+ && (event.getSource() & InputDevice.SOURCE_CLASS_POINTER) != 0
&& mDragState != null) {
+ final MotionEvent motionEvent = (MotionEvent)event;
boolean endDrag = false;
- final float newX = event.getRawX();
- final float newY = event.getRawY();
+ final float newX = motionEvent.getRawX();
+ final float newY = motionEvent.getRawY();
- switch (event.getAction()) {
+ switch (motionEvent.getAction()) {
case MotionEvent.ACTION_DOWN: {
if (DEBUG_DRAG) {
Slog.w(TAG, "Unexpected ACTION_DOWN in drag layer");
@@ -623,10 +628,10 @@
} catch (Exception e) {
Slog.e(TAG, "Exception caught by drag handleMotion", e);
} finally {
- finishedCallback.finished(handled);
+ finishInputEvent(event, handled);
}
}
- };
+ }
/**
* Whether the UI is currently running in touch mode (not showing
@@ -9378,11 +9383,13 @@
}
@Override
- public FakeWindow addFakeWindow(Looper looper, InputHandler inputHandler,
+ public FakeWindow addFakeWindow(Looper looper,
+ InputEventReceiver.Factory inputEventReceiverFactory,
String name, int windowType, int layoutParamsFlags, boolean canReceiveKeys,
boolean hasFocus, boolean touchFullscreen) {
synchronized (mWindowMap) {
- FakeWindowImpl fw = new FakeWindowImpl(this, looper, inputHandler, name, windowType,
+ FakeWindowImpl fw = new FakeWindowImpl(this, looper, inputEventReceiverFactory,
+ name, windowType,
layoutParamsFlags, canReceiveKeys, hasFocus, touchFullscreen);
int i=0;
while (i<mFakeWindows.size()) {
diff --git a/telephony/java/com/android/internal/telephony/DataConnection.java b/telephony/java/com/android/internal/telephony/DataConnection.java
index 636646e..4619899 100644
--- a/telephony/java/com/android/internal/telephony/DataConnection.java
+++ b/telephony/java/com/android/internal/telephony/DataConnection.java
@@ -699,8 +699,10 @@
break;
case EVENT_DISCONNECT:
- if (DBG) log("DcDefaultState: msg.what=EVENT_DISCONNECT");
- notifyDisconnectCompleted((DisconnectParams) msg.obj);
+ if (DBG) {
+ log("DcDefaultState deferring msg.what=EVENT_DISCONNECT" + mRefCount);
+ }
+ deferMessage(msg);
break;
case EVENT_RIL_CONNECTED:
@@ -807,6 +809,12 @@
retVal = HANDLED;
break;
+ case EVENT_DISCONNECT:
+ if (DBG) log("DcInactiveState: msg.what=EVENT_DISCONNECT");
+ notifyDisconnectCompleted((DisconnectParams)msg.obj);
+ retVal = HANDLED;
+ break;
+
default:
if (VDBG) {
log("DcInactiveState nothandled msg.what=0x" +
@@ -831,13 +839,6 @@
ConnectionParams cp;
switch (msg.what) {
- case EVENT_DISCONNECT:
- if (DBG) log("DcActivatingState deferring msg.what=EVENT_DISCONNECT"
- + mRefCount);
- deferMessage(msg);
- retVal = HANDLED;
- break;
-
case EVENT_CONNECT:
if (DBG) log("DcActivatingState deferring msg.what=EVENT_CONNECT refCount = "
+ mRefCount);