Merge "Unlock effect chains in the middle of two if's"
diff --git a/include/binder/CursorWindow.h b/include/binder/CursorWindow.h
deleted file mode 100644
index 8a2979a..0000000
--- a/include/binder/CursorWindow.h
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * Copyright (C) 2006 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 _ANDROID__DATABASE_WINDOW_H
-#define _ANDROID__DATABASE_WINDOW_H
-
-#include <cutils/log.h>
-#include <stddef.h>
-#include <stdint.h>
-
-#include <binder/Parcel.h>
-#include <utils/String8.h>
-
-#if LOG_NDEBUG
-
-#define IF_LOG_WINDOW() if (false)
-#define LOG_WINDOW(...)
-
-#else
-
-#define IF_LOG_WINDOW() IF_ALOG(LOG_DEBUG, "CursorWindow")
-#define LOG_WINDOW(...) ALOG(LOG_DEBUG, "CursorWindow", __VA_ARGS__)
-
-#endif
-
-namespace android {
-
-/**
- * This class stores a set of rows from a database in a buffer. The begining of the
- * window has first chunk of RowSlots, which are offsets to the row directory, followed by
- * an offset to the next chunk in a linked-list of additional chunk of RowSlots in case
- * the pre-allocated chunk isn't big enough to refer to all rows. Each row directory has a
- * FieldSlot per column, which has the size, offset, and type of the data for that field.
- * Note that the data types come from sqlite3.h.
- *
- * Strings are stored in UTF-8.
- */
-class CursorWindow {
- CursorWindow(const String8& name, int ashmemFd,
- void* data, size_t size, bool readOnly);
-
-public:
- /* Field types. */
- enum {
- FIELD_TYPE_NULL = 0,
- FIELD_TYPE_INTEGER = 1,
- FIELD_TYPE_FLOAT = 2,
- FIELD_TYPE_STRING = 3,
- FIELD_TYPE_BLOB = 4,
- };
-
- /* Opaque type that describes a field slot. */
- struct FieldSlot {
- private:
- int32_t type;
- union {
- double d;
- int64_t l;
- struct {
- uint32_t offset;
- uint32_t size;
- } buffer;
- } data;
-
- friend class CursorWindow;
- } __attribute((packed));
-
- ~CursorWindow();
-
- static status_t create(const String8& name, size_t size, CursorWindow** outCursorWindow);
- static status_t createFromParcel(Parcel* parcel, CursorWindow** outCursorWindow);
-
- status_t writeToParcel(Parcel* parcel);
-
- inline String8 name() { return mName; }
- inline size_t size() { return mSize; }
- inline size_t freeSpace() { return mSize - mHeader->freeOffset; }
- inline uint32_t getNumRows() { return mHeader->numRows; }
- inline uint32_t getNumColumns() { return mHeader->numColumns; }
-
- status_t clear();
- status_t setNumColumns(uint32_t numColumns);
-
- /**
- * Allocate a row slot and its directory.
- * The row is initialized will null entries for each field.
- */
- status_t allocRow();
- status_t freeLastRow();
-
- status_t putBlob(uint32_t row, uint32_t column, const void* value, size_t size);
- status_t putString(uint32_t row, uint32_t column, const char* value, size_t sizeIncludingNull);
- status_t putLong(uint32_t row, uint32_t column, int64_t value);
- status_t putDouble(uint32_t row, uint32_t column, double value);
- status_t putNull(uint32_t row, uint32_t column);
-
- /**
- * Gets the field slot at the specified row and column.
- * Returns null if the requested row or column is not in the window.
- */
- FieldSlot* getFieldSlot(uint32_t row, uint32_t column);
-
- inline int32_t getFieldSlotType(FieldSlot* fieldSlot) {
- return fieldSlot->type;
- }
-
- inline int64_t getFieldSlotValueLong(FieldSlot* fieldSlot) {
- return fieldSlot->data.l;
- }
-
- inline double getFieldSlotValueDouble(FieldSlot* fieldSlot) {
- return fieldSlot->data.d;
- }
-
- inline const char* getFieldSlotValueString(FieldSlot* fieldSlot,
- size_t* outSizeIncludingNull) {
- *outSizeIncludingNull = fieldSlot->data.buffer.size;
- return static_cast<char*>(offsetToPtr(fieldSlot->data.buffer.offset));
- }
-
- inline const void* getFieldSlotValueBlob(FieldSlot* fieldSlot, size_t* outSize) {
- *outSize = fieldSlot->data.buffer.size;
- return offsetToPtr(fieldSlot->data.buffer.offset);
- }
-
-private:
- static const size_t ROW_SLOT_CHUNK_NUM_ROWS = 100;
-
- struct Header {
- // Offset of the lowest unused byte in the window.
- uint32_t freeOffset;
-
- // Offset of the first row slot chunk.
- uint32_t firstChunkOffset;
-
- uint32_t numRows;
- uint32_t numColumns;
- };
-
- struct RowSlot {
- uint32_t offset;
- };
-
- struct RowSlotChunk {
- RowSlot slots[ROW_SLOT_CHUNK_NUM_ROWS];
- uint32_t nextChunkOffset;
- };
-
- String8 mName;
- int mAshmemFd;
- void* mData;
- size_t mSize;
- bool mReadOnly;
- Header* mHeader;
-
- inline void* offsetToPtr(uint32_t offset) {
- return static_cast<uint8_t*>(mData) + offset;
- }
-
- inline uint32_t offsetFromPtr(void* ptr) {
- return static_cast<uint8_t*>(ptr) - static_cast<uint8_t*>(mData);
- }
-
- /**
- * Allocate a portion of the window. Returns the offset
- * of the allocation, or 0 if there isn't enough space.
- * If aligned is true, the allocation gets 4 byte alignment.
- */
- uint32_t alloc(size_t size, bool aligned = false);
-
- RowSlot* getRowSlot(uint32_t row);
- RowSlot* allocRowSlot();
-
- status_t putBlobOrString(uint32_t row, uint32_t column,
- const void* value, size_t size, int32_t type);
-};
-
-}; // namespace android
-
-#endif
diff --git a/include/gui/BufferQueue.h b/include/gui/BufferQueue.h
index ae99160..8c21a28 100644
--- a/include/gui/BufferQueue.h
+++ b/include/gui/BufferQueue.h
@@ -19,9 +19,9 @@
#include <EGL/egl.h>
+#include <gui/IGraphicBufferAlloc.h>
#include <gui/ISurfaceTexture.h>
-#include <surfaceflinger/IGraphicBufferAlloc.h>
#include <ui/GraphicBuffer.h>
#include <utils/String8.h>
@@ -40,6 +40,7 @@
};
enum { NUM_BUFFER_SLOTS = 32 };
enum { NO_CONNECTED_API = 0 };
+ enum { INVALID_BUFFER_SLOT = -1 };
struct FrameAvailableListener : public virtual RefBase {
// onFrameAvailable() is called from queueBuffer() each time an
@@ -119,8 +120,91 @@
// connected to the specified client API.
virtual status_t disconnect(int api);
-protected:
+ // dump our state in a String
+ virtual void dump(String8& result) const;
+ virtual void dump(String8& result, const char* prefix, char* buffer, size_t SIZE) const;
+ // public facing structure for BufferSlot
+ struct BufferItem {
+
+ BufferItem()
+ :
+ mTransform(0),
+ mScalingMode(NATIVE_WINDOW_SCALING_MODE_FREEZE),
+ mTimestamp(0),
+ mFrameNumber(0),
+ mBuf(INVALID_BUFFER_SLOT) {
+ mCrop.makeInvalid();
+ }
+ // mGraphicBuffer points to the buffer allocated for this slot or is NULL
+ // if no buffer has been allocated.
+ sp<GraphicBuffer> mGraphicBuffer;
+
+ // mCrop is the current crop rectangle for this buffer slot. This gets
+ // set to mNextCrop each time queueBuffer gets called for this buffer.
+ Rect mCrop;
+
+ // mTransform is the current transform flags for this buffer slot. This
+ // gets set to mNextTransform each time queueBuffer gets called for this
+ // slot.
+ uint32_t mTransform;
+
+ // mScalingMode is the current scaling mode for this buffer slot. This
+ // gets set to mNextScalingMode each time queueBuffer gets called for
+ // this slot.
+ uint32_t mScalingMode;
+
+ // mTimestamp is the current timestamp for this buffer slot. This gets
+ // to set by queueBuffer each time this slot is queued.
+ int64_t mTimestamp;
+
+ // mFrameNumber is the number of the queued frame for this slot.
+ uint64_t mFrameNumber;
+
+ // buf is the slot index of this buffer
+ int mBuf;
+
+ };
+
+ // The following public functions is the consumer facing interface
+
+ // acquire consumes a buffer by transferring its ownership to a consumer.
+ // buffer contains the GraphicBuffer and its corresponding information.
+ // buffer.mGraphicsBuffer will be NULL when the buffer has been already
+ // acquired by the consumer.
+
+ status_t acquire(BufferItem *buffer);
+
+ // releaseBuffer releases a buffer slot from the consumer back to the
+ // BufferQueue pending a fence sync.
+ status_t releaseBuffer(int buf, EGLDisplay display, EGLSyncKHR fence);
+
+ // consumerDisconnect disconnects a consumer from the BufferQueue. All
+ // buffers will be freed.
+ status_t consumerDisconnect();
+
+ // setDefaultBufferSize is used to set the size of buffers returned by
+ // requestBuffers when a with and height of zero is requested.
+ status_t setDefaultBufferSize(uint32_t w, uint32_t h);
+
+ // setBufferCountServer set the buffer count. If the client has requested
+ // a buffer count using setBufferCount, the server-buffer count will
+ // take effect once the client sets the count back to zero.
+ status_t setBufferCountServer(int bufferCount);
+
+ // isSynchronousMode returns whether the SurfaceTexture is currently in
+ // synchronous mode.
+ bool isSynchronousMode() const;
+
+ // setConsumerName sets the name used in logging
+ void setConsumerName(const String8& name);
+
+ // setFrameAvailableListener sets the listener object that will be notified
+ // when a new frame becomes available.
+ void setFrameAvailableListener(const sp<FrameAvailableListener>& listener);
+
+
+private:
// freeBufferLocked frees the resources (both GraphicBuffer and EGLImage)
// for the given slot.
void freeBufferLocked(int index);
@@ -145,20 +229,18 @@
status_t setBufferCountServerLocked(int bufferCount);
- enum { INVALID_BUFFER_SLOT = -1 };
-
struct BufferSlot {
BufferSlot()
- : mEglImage(EGL_NO_IMAGE_KHR),
- mEglDisplay(EGL_NO_DISPLAY),
+ : mEglDisplay(EGL_NO_DISPLAY),
mBufferState(BufferSlot::FREE),
mRequestBufferCalled(false),
mTransform(0),
mScalingMode(NATIVE_WINDOW_SCALING_MODE_FREEZE),
mTimestamp(0),
mFrameNumber(0),
- mFence(EGL_NO_SYNC_KHR) {
+ mFence(EGL_NO_SYNC_KHR),
+ mAcquireCalled(false) {
mCrop.makeInvalid();
}
@@ -166,9 +248,6 @@
// if no buffer has been allocated.
sp<GraphicBuffer> mGraphicBuffer;
- // mEglImage is the EGLImage created from mGraphicBuffer.
- EGLImageKHR mEglImage;
-
// mEglDisplay is the EGLDisplay used to create mEglImage.
EGLDisplay mEglDisplay;
@@ -178,6 +257,7 @@
// FREE indicates that the buffer is not currently being used and
// will not be used in the future until it gets dequeued and
// subsequently queued by the client.
+ // aka "owned by BufferQueue, ready to be dequeued"
FREE = 0,
// DEQUEUED indicates that the buffer has been dequeued by the
@@ -190,6 +270,7 @@
// dequeued by the client. That means that the current buffer can
// be in either the DEQUEUED or QUEUED state. In asynchronous mode,
// however, the current buffer is always in the QUEUED state.
+ // aka "owned by producer, ready to be queued"
DEQUEUED = 1,
// QUEUED indicates that the buffer has been queued by the client,
@@ -199,7 +280,11 @@
// the current buffer may be dequeued by the client under some
// circumstances. See the note about the current buffer in the
// documentation for DEQUEUED.
+ // aka "owned by BufferQueue, ready to be acquired"
QUEUED = 2,
+
+ // aka "owned by consumer, ready to be released"
+ ACQUIRED = 3
};
// mBufferState is the current state of this buffer slot.
@@ -236,6 +321,9 @@
// to EGL_NO_SYNC_KHR when the buffer is created and (optionally, based
// on a compile-time option) set to a new sync object in updateTexImage.
EGLSyncKHR mFence;
+
+ // Indicates whether this buffer has been seen by a consumer yet
+ bool mAcquireCalled;
};
// mSlots is the array of buffer slots that must be mirrored on the client
@@ -245,7 +333,6 @@
// for a slot when requestBuffer is called with that slot's index.
BufferSlot mSlots[NUM_BUFFER_SLOTS];
-
// mDefaultWidth holds the default width of allocated buffers. It is used
// in requestBuffers() if a width and height of zero is specified.
uint32_t mDefaultWidth;
@@ -271,14 +358,6 @@
// mServerBufferCount buffer count requested by the server-side
int mServerBufferCount;
- // mCurrentTexture is the buffer slot index of the buffer that is currently
- // bound to the OpenGL texture. It is initialized to INVALID_BUFFER_SLOT,
- // indicating that no buffer slot is currently bound to the texture. Note,
- // however, that a value of INVALID_BUFFER_SLOT does not necessarily mean
- // that no buffer is bound to the texture. A call to setBufferCount will
- // reset mCurrentTexture to INVALID_BUFFER_SLOT.
- int mCurrentTexture;
-
// mNextCrop is the crop rectangle that will be used for the next buffer
// that gets queued. It is set by calling setCrop.
Rect mNextCrop;
@@ -327,7 +406,7 @@
// mName is a string used to identify the BufferQueue in log messages.
// It is set by the setName method.
- String8 mName;
+ String8 mConsumerName;
// mMutex is the mutex used to prevent concurrent access to the member
// variables of BufferQueue objects. It must be locked whenever the
@@ -337,6 +416,8 @@
// mFrameCounter is the free running counter, incremented for every buffer queued
// with the surface Texture.
uint64_t mFrameCounter;
+
+ bool mBufferHasBeenQueued;
};
// ----------------------------------------------------------------------------
diff --git a/include/surfaceflinger/IGraphicBufferAlloc.h b/include/gui/IGraphicBufferAlloc.h
similarity index 90%
rename from include/surfaceflinger/IGraphicBufferAlloc.h
rename to include/gui/IGraphicBufferAlloc.h
index d3b2062..cee41d9 100644
--- a/include/surfaceflinger/IGraphicBufferAlloc.h
+++ b/include/gui/IGraphicBufferAlloc.h
@@ -14,15 +14,15 @@
* limitations under the License.
*/
-#ifndef ANDROID_SF_IGRAPHIC_BUFFER_ALLOC_H
-#define ANDROID_SF_IGRAPHIC_BUFFER_ALLOC_H
+#ifndef ANDROID_GUI_IGRAPHIC_BUFFER_ALLOC_H
+#define ANDROID_GUI_IGRAPHIC_BUFFER_ALLOC_H
#include <stdint.h>
#include <sys/types.h>
-#include <utils/RefBase.h>
-
#include <binder/IInterface.h>
+#include <ui/PixelFormat.h>
+#include <utils/RefBase.h>
namespace android {
// ----------------------------------------------------------------------------
@@ -55,4 +55,4 @@
}; // namespace android
-#endif // ANDROID_SF_IGRAPHIC_BUFFER_ALLOC_H
+#endif // ANDROID_GUI_IGRAPHIC_BUFFER_ALLOC_H
diff --git a/include/surfaceflinger/ISurface.h b/include/gui/ISurface.h
similarity index 93%
rename from include/surfaceflinger/ISurface.h
rename to include/gui/ISurface.h
index 5fdf234..c0ff9fc 100644
--- a/include/surfaceflinger/ISurface.h
+++ b/include/gui/ISurface.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ANDROID_SF_ISURFACE_H
-#define ANDROID_SF_ISURFACE_H
+#ifndef ANDROID_GUI_ISURFACE_H
+#define ANDROID_GUI_ISURFACE_H
#include <stdint.h>
#include <sys/types.h>
@@ -61,4 +61,4 @@
}; // namespace android
-#endif // ANDROID_SF_ISURFACE_H
+#endif // ANDROID_GUI_ISURFACE_H
diff --git a/include/surfaceflinger/ISurfaceComposer.h b/include/gui/ISurfaceComposer.h
similarity index 95%
rename from include/surfaceflinger/ISurfaceComposer.h
rename to include/gui/ISurfaceComposer.h
index 58fd89d..f3c0ecb 100644
--- a/include/surfaceflinger/ISurfaceComposer.h
+++ b/include/gui/ISurfaceComposer.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ANDROID_SF_ISURFACE_COMPOSER_H
-#define ANDROID_SF_ISURFACE_COMPOSER_H
+#ifndef ANDROID_GUI_ISURFACE_COMPOSER_H
+#define ANDROID_GUI_ISURFACE_COMPOSER_H
#include <stdint.h>
#include <sys/types.h>
@@ -27,8 +27,8 @@
#include <ui/PixelFormat.h>
-#include <surfaceflinger/ISurfaceComposerClient.h>
-#include <surfaceflinger/IGraphicBufferAlloc.h>
+#include <gui/IGraphicBufferAlloc.h>
+#include <gui/ISurfaceComposerClient.h>
namespace android {
// ----------------------------------------------------------------------------
@@ -171,4 +171,4 @@
}; // namespace android
-#endif // ANDROID_SF_ISURFACE_COMPOSER_H
+#endif // ANDROID_GUI_ISURFACE_COMPOSER_H
diff --git a/include/surfaceflinger/ISurfaceComposerClient.h b/include/gui/ISurfaceComposerClient.h
similarity index 92%
rename from include/surfaceflinger/ISurfaceComposerClient.h
rename to include/gui/ISurfaceComposerClient.h
index 02cabc1..c793933 100644
--- a/include/surfaceflinger/ISurfaceComposerClient.h
+++ b/include/gui/ISurfaceComposerClient.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ANDROID_SF_ISURFACE_COMPOSER_CLIENT_H
-#define ANDROID_SF_ISURFACE_COMPOSER_CLIENT_H
+#ifndef ANDROID_GUI_ISURFACE_COMPOSER_CLIENT_H
+#define ANDROID_GUI_ISURFACE_COMPOSER_CLIENT_H
#include <stdint.h>
#include <sys/types.h>
@@ -27,7 +27,7 @@
#include <ui/PixelFormat.h>
-#include <surfaceflinger/ISurface.h>
+#include <gui/ISurface.h>
namespace android {
@@ -81,4 +81,4 @@
}; // namespace android
-#endif // ANDROID_SF_ISURFACE_COMPOSER_CLIENT_H
+#endif // ANDROID_GUI_ISURFACE_COMPOSER_CLIENT_H
diff --git a/include/surfaceflinger/Surface.h b/include/gui/Surface.h
similarity index 95%
rename from include/surfaceflinger/Surface.h
rename to include/gui/Surface.h
index 0460bbd..1f90c59 100644
--- a/include/surfaceflinger/Surface.h
+++ b/include/gui/Surface.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ANDROID_SF_SURFACE_H
-#define ANDROID_SF_SURFACE_H
+#ifndef ANDROID_GUI_SURFACE_H
+#define ANDROID_GUI_SURFACE_H
#include <stdint.h>
#include <sys/types.h>
@@ -26,12 +26,10 @@
#include <ui/PixelFormat.h>
#include <ui/Region.h>
-#include <ui/egl/android_natives.h>
#include <gui/SurfaceTextureClient.h>
-
-#include <surfaceflinger/ISurface.h>
-#include <surfaceflinger/ISurfaceComposerClient.h>
+#include <gui/ISurface.h>
+#include <gui/ISurfaceComposerClient.h>
#define ANDROID_VIEW_SURFACE_JNI_ID "mNativeSurface"
@@ -174,4 +172,4 @@
}; // namespace android
-#endif // ANDROID_SF_SURFACE_H
+#endif // ANDROID_GUI_SURFACE_H
diff --git a/include/surfaceflinger/SurfaceComposerClient.h b/include/gui/SurfaceComposerClient.h
similarity index 96%
rename from include/surfaceflinger/SurfaceComposerClient.h
rename to include/gui/SurfaceComposerClient.h
index 99affda..d971031 100644
--- a/include/surfaceflinger/SurfaceComposerClient.h
+++ b/include/gui/SurfaceComposerClient.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ANDROID_SF_SURFACE_COMPOSER_CLIENT_H
-#define ANDROID_SF_SURFACE_COMPOSER_CLIENT_H
+#ifndef ANDROID_GUI_SURFACE_COMPOSER_CLIENT_H
+#define ANDROID_GUI_SURFACE_COMPOSER_CLIENT_H
#include <stdint.h>
#include <sys/types.h>
@@ -29,7 +29,7 @@
#include <ui/PixelFormat.h>
-#include <surfaceflinger/Surface.h>
+#include <gui/Surface.h>
namespace android {
@@ -174,4 +174,4 @@
// ---------------------------------------------------------------------------
}; // namespace android
-#endif // ANDROID_SF_SURFACE_COMPOSER_CLIENT_H
+#endif // ANDROID_GUI_SURFACE_COMPOSER_CLIENT_H
diff --git a/include/gui/SurfaceTexture.h b/include/gui/SurfaceTexture.h
index dcab049..5531e53 100644
--- a/include/gui/SurfaceTexture.h
+++ b/include/gui/SurfaceTexture.h
@@ -153,8 +153,8 @@
void setName(const String8& name);
// dump our state in a String
- void dump(String8& result) const;
- void dump(String8& result, const char* prefix, char* buffer, size_t SIZE) const;
+ virtual void dump(String8& result) const;
+ virtual void dump(String8& result, const char* prefix, char* buffer, size_t SIZE) const;
protected:
@@ -217,6 +217,56 @@
// browser's tile cache exceeds.
const GLenum mTexTarget;
+ // SurfaceTexture maintains EGL information about GraphicBuffers that corresponds
+ // directly with BufferQueue's buffers
+ struct EGLSlot {
+ EGLSlot()
+ : mEglImage(EGL_NO_IMAGE_KHR),
+ mEglDisplay(EGL_NO_DISPLAY),
+ mFence(EGL_NO_SYNC_KHR) {
+ }
+
+ sp<GraphicBuffer> mGraphicBuffer;
+
+ // mEglImage is the EGLImage created from mGraphicBuffer.
+ EGLImageKHR mEglImage;
+
+ // mEglDisplay is the EGLDisplay used to create mEglImage.
+ EGLDisplay mEglDisplay;
+
+ // mFence is the EGL sync object that must signal before the buffer
+ // associated with this buffer slot may be dequeued. It is initialized
+ // to EGL_NO_SYNC_KHR when the buffer is created and (optionally, based
+ // on a compile-time option) set to a new sync object in updateTexImage.
+ EGLSyncKHR mFence;
+ };
+
+ EGLSlot mEGLSlots[NUM_BUFFER_SLOTS];
+
+ // mAbandoned indicates that the BufferQueue will no longer be used to
+ // consume images buffers pushed to it using the ISurfaceTexture interface.
+ // It is initialized to false, and set to true in the abandon method. A
+ // BufferQueue that has been abandoned will return the NO_INIT error from
+ // all ISurfaceTexture methods capable of returning an error.
+ bool mAbandoned;
+
+ // mName is a string used to identify the SurfaceTexture in log messages.
+ // It can be set by the setName method.
+ String8 mName;
+
+ // mMutex is the mutex used to prevent concurrent access to the member
+ // variables of SurfaceTexture objects. It must be locked whenever the
+ // member variables are accessed.
+ mutable Mutex mMutex;
+
+ // mCurrentTexture is the buffer slot index of the buffer that is currently
+ // bound to the OpenGL texture. It is initialized to INVALID_BUFFER_SLOT,
+ // indicating that no buffer slot is currently bound to the texture. Note,
+ // however, that a value of INVALID_BUFFER_SLOT does not necessarily mean
+ // that no buffer is bound to the texture. A call to setBufferCount will
+ // reset mCurrentTexture to INVALID_BUFFER_SLOT.
+ int mCurrentTexture;
+
};
// ----------------------------------------------------------------------------
diff --git a/include/gui/SurfaceTextureClient.h b/include/gui/SurfaceTextureClient.h
index 971a1b8..aa7fe48 100644
--- a/include/gui/SurfaceTextureClient.h
+++ b/include/gui/SurfaceTextureClient.h
@@ -20,7 +20,7 @@
#include <gui/ISurfaceTexture.h>
#include <gui/SurfaceTexture.h>
-#include <ui/egl/android_natives.h>
+#include <ui/ANativeObjectBase.h>
#include <ui/Region.h>
#include <utils/RefBase.h>
@@ -31,7 +31,7 @@
class Surface;
class SurfaceTextureClient
- : public EGLNativeBase<ANativeWindow, SurfaceTextureClient, RefBase>
+ : public ANativeObjectBase<ANativeWindow, SurfaceTextureClient, RefBase>
{
public:
SurfaceTextureClient(const sp<ISurfaceTexture>& surfaceTexture);
diff --git a/include/private/surfaceflinger/LayerState.h b/include/private/gui/LayerState.h
similarity index 97%
rename from include/private/surfaceflinger/LayerState.h
rename to include/private/gui/LayerState.h
index 3eb5c99..ca277e0 100644
--- a/include/private/surfaceflinger/LayerState.h
+++ b/include/private/gui/LayerState.h
@@ -23,8 +23,7 @@
#include <utils/Errors.h>
#include <ui/Region.h>
-
-#include <surfaceflinger/ISurface.h>
+#include <gui/ISurface.h>
namespace android {
diff --git a/include/private/surfaceflinger/SharedBufferStack.h b/include/private/gui/SharedBufferStack.h
similarity index 100%
rename from include/private/surfaceflinger/SharedBufferStack.h
rename to include/private/gui/SharedBufferStack.h
diff --git a/include/private/opengles/gl_context.h b/include/private/opengles/gl_context.h
deleted file mode 100644
index 6b1fa77..0000000
--- a/include/private/opengles/gl_context.h
+++ /dev/null
@@ -1,640 +0,0 @@
-/*
- * Copyright (C) 2006 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 ANDROID_OPENGLES_CONTEXT_H
-#define ANDROID_OPENGLES_CONTEXT_H
-
-#include <stdint.h>
-#include <stddef.h>
-#include <sys/types.h>
-#include <pthread.h>
-#ifdef HAVE_ANDROID_OS
-#include <bionic_tls.h>
-#endif
-
-#include <private/pixelflinger/ggl_context.h>
-#include <hardware/gralloc.h>
-
-#include <GLES/gl.h>
-#include <GLES/glext.h>
-
-namespace android {
-
-
-const unsigned int OGLES_NUM_COMPRESSED_TEXTURE_FORMATS = 10
-#ifdef GL_OES_compressed_ETC1_RGB8_texture
- + 1
-#endif
- ;
-
-class EGLTextureObject;
-class EGLSurfaceManager;
-class EGLBufferObjectManager;
-
-namespace gl {
-
-struct ogles_context_t;
-struct matrixx_t;
-struct transform_t;
-struct buffer_t;
-
-ogles_context_t* getGlContext();
-
-template<typename T>
-static inline void swap(T& a, T& b) {
- T t(a); a = b; b = t;
-}
-template<typename T>
-inline T max(T a, T b) {
- return a<b ? b : a;
-}
-template<typename T>
-inline T max(T a, T b, T c) {
- return max(a, max(b, c));
-}
-template<typename T>
-inline T min(T a, T b) {
- return a<b ? a : b;
-}
-template<typename T>
-inline T min(T a, T b, T c) {
- return min(a, min(b, c));
-}
-template<typename T>
-inline T min(T a, T b, T c, T d) {
- return min(min(a,b), min(c,d));
-}
-
-// ----------------------------------------------------------------------------
-// vertices
-// ----------------------------------------------------------------------------
-
-struct vec3_t {
- union {
- struct { GLfixed x, y, z; };
- struct { GLfixed r, g, b; };
- struct { GLfixed S, T, R; };
- GLfixed v[3];
- };
-};
-
-struct vec4_t {
- union {
- struct { GLfixed x, y, z, w; };
- struct { GLfixed r, g, b, a; };
- struct { GLfixed S, T, R, Q; };
- GLfixed v[4];
- };
-};
-
-struct vertex_t {
- enum {
- // these constant matter for our clipping
- CLIP_L = 0x0001, // clipping flags
- CLIP_R = 0x0002,
- CLIP_B = 0x0004,
- CLIP_T = 0x0008,
- CLIP_N = 0x0010,
- CLIP_F = 0x0020,
-
- EYE = 0x0040,
- RESERVED = 0x0080,
-
- USER_CLIP_0 = 0x0100, // user clipping flags
- USER_CLIP_1 = 0x0200,
- USER_CLIP_2 = 0x0400,
- USER_CLIP_3 = 0x0800,
- USER_CLIP_4 = 0x1000,
- USER_CLIP_5 = 0x2000,
-
- LIT = 0x4000, // lighting has been applied
- TT = 0x8000, // texture coords transformed
-
- FRUSTUM_CLIP_ALL= 0x003F,
- USER_CLIP_ALL = 0x3F00,
- CLIP_ALL = 0x3F3F,
- };
-
- // the fields below are arranged to minimize d-cache usage
- // we group together, by cache-line, the fields most likely to be used
-
- union {
- vec4_t obj;
- vec4_t eye;
- };
- vec4_t clip;
-
- uint32_t flags;
- size_t index; // cache tag, and vertex index
- GLfixed fog;
- uint8_t locked;
- uint8_t mru;
- uint8_t reserved[2];
- vec4_t window;
-
- vec4_t color;
- vec4_t texture[GGL_TEXTURE_UNIT_COUNT];
- uint32_t reserved1[4];
-
- inline void clear() {
- flags = index = locked = mru = 0;
- }
-};
-
-struct point_size_t {
- GGLcoord size;
- GLboolean smooth;
-};
-
-struct line_width_t {
- GGLcoord width;
- GLboolean smooth;
-};
-
-struct polygon_offset_t {
- GLfixed factor;
- GLfixed units;
- GLboolean enable;
-};
-
-// ----------------------------------------------------------------------------
-// arrays
-// ----------------------------------------------------------------------------
-
-struct array_t {
- typedef void (*fetcher_t)(ogles_context_t*, GLfixed*, const GLvoid*);
- fetcher_t fetch;
- GLvoid const* physical_pointer;
- GLint size;
- GLsizei stride;
- GLvoid const* pointer;
- buffer_t const* bo;
- uint16_t type;
- GLboolean enable;
- GLboolean pad;
- GLsizei bounds;
- void init(GLint, GLenum, GLsizei, const GLvoid *, const buffer_t*, GLsizei);
- inline void resolve();
- inline const GLubyte* element(GLint i) const {
- return (const GLubyte*)physical_pointer + i * stride;
- }
-};
-
-struct array_machine_t {
- array_t vertex;
- array_t normal;
- array_t color;
- array_t texture[GGL_TEXTURE_UNIT_COUNT];
- uint8_t activeTexture;
- uint8_t tmu;
- uint16_t cull;
- uint32_t flags;
- GLenum indicesType;
- buffer_t const* array_buffer;
- buffer_t const* element_array_buffer;
-
- void (*compileElements)(ogles_context_t*, vertex_t*, GLint, GLsizei);
- void (*compileElement)(ogles_context_t*, vertex_t*, GLint);
-
- void (*mvp_transform)(transform_t const*, vec4_t*, vec4_t const*);
- void (*mv_transform)(transform_t const*, vec4_t*, vec4_t const*);
- void (*tex_transform[2])(transform_t const*, vec4_t*, vec4_t const*);
- void (*perspective)(ogles_context_t*c, vertex_t* v);
- void (*clipVertex)(ogles_context_t* c, vertex_t* nv,
- GGLfixed t, const vertex_t* s, const vertex_t* p);
- void (*clipEye)(ogles_context_t* c, vertex_t* nv,
- GGLfixed t, const vertex_t* s, const vertex_t* p);
-};
-
-struct vertex_cache_t {
- enum {
- // must be at least 4
- // 3 vertice for triangles
- // or 2 + 2 for indexed triangles w/ cache contention
- VERTEX_BUFFER_SIZE = 8,
- // must be a power of two and at least 3
- VERTEX_CACHE_SIZE = 64, // 8 KB
-
- INDEX_BITS = 16,
- INDEX_MASK = ((1LU<<INDEX_BITS)-1),
- INDEX_SEQ = 1LU<<INDEX_BITS,
- };
- vertex_t* vBuffer;
- vertex_t* vCache;
- uint32_t sequence;
- void* base;
- uint32_t total;
- uint32_t misses;
- int64_t startTime;
- void init();
- void uninit();
- void clear();
- void dump_stats(GLenum mode);
-};
-
-// ----------------------------------------------------------------------------
-// fog
-// ----------------------------------------------------------------------------
-
-struct fog_t {
- GLfixed density;
- GLfixed start;
- GLfixed end;
- GLfixed invEndMinusStart;
- GLenum mode;
- GLfixed (*fog)(ogles_context_t* c, GLfixed z);
-};
-
-// ----------------------------------------------------------------------------
-// user clip planes
-// ----------------------------------------------------------------------------
-
-const unsigned int OGLES_MAX_CLIP_PLANES = 6;
-
-struct clip_plane_t {
- vec4_t equation;
-};
-
-struct user_clip_planes_t {
- clip_plane_t plane[OGLES_MAX_CLIP_PLANES];
- uint32_t enable;
-};
-
-// ----------------------------------------------------------------------------
-// lighting
-// ----------------------------------------------------------------------------
-
-const unsigned int OGLES_MAX_LIGHTS = 8;
-
-struct light_t {
- vec4_t ambient;
- vec4_t diffuse;
- vec4_t specular;
- vec4_t implicitAmbient;
- vec4_t implicitDiffuse;
- vec4_t implicitSpecular;
- vec4_t position; // position in eye space
- vec4_t objPosition;
- vec4_t normalizedObjPosition;
- vec4_t spotDir;
- vec4_t normalizedSpotDir;
- GLfixed spotExp;
- GLfixed spotCutoff;
- GLfixed spotCutoffCosine;
- GLfixed attenuation[3];
- GLfixed rConstAttenuation;
- GLboolean enable;
-};
-
-struct material_t {
- vec4_t ambient;
- vec4_t diffuse;
- vec4_t specular;
- vec4_t emission;
- GLfixed shininess;
-};
-
-struct light_model_t {
- vec4_t ambient;
- GLboolean twoSide;
-};
-
-struct color_material_t {
- GLenum face;
- GLenum mode;
- GLboolean enable;
-};
-
-struct lighting_t {
- light_t lights[OGLES_MAX_LIGHTS];
- material_t front;
- light_model_t lightModel;
- color_material_t colorMaterial;
- vec4_t implicitSceneEmissionAndAmbient;
- vec4_t objViewer;
- uint32_t enabledLights;
- GLboolean enable;
- GLenum shadeModel;
- typedef void (*light_fct_t)(ogles_context_t*, vertex_t*);
- void (*lightVertex)(ogles_context_t* c, vertex_t* v);
- void (*lightTriangle)(ogles_context_t* c,
- vertex_t* v0, vertex_t* v1, vertex_t* v2);
-};
-
-struct culling_t {
- GLenum cullFace;
- GLenum frontFace;
- GLboolean enable;
-};
-
-// ----------------------------------------------------------------------------
-// textures
-// ----------------------------------------------------------------------------
-
-struct texture_unit_t {
- GLuint name;
- EGLTextureObject* texture;
- uint8_t dirty;
-};
-
-struct texture_state_t
-{
- texture_unit_t tmu[GGL_TEXTURE_UNIT_COUNT];
- int active; // active tmu
- EGLTextureObject* defaultTexture;
- GGLContext* ggl;
- uint8_t packAlignment;
- uint8_t unpackAlignment;
-};
-
-// ----------------------------------------------------------------------------
-// transformation and matrices
-// ----------------------------------------------------------------------------
-
-struct matrixf_t;
-
-struct matrixx_t {
- GLfixed m[16];
- void load(const matrixf_t& rhs);
-};
-
-struct matrix_stack_t;
-
-
-struct matrixf_t {
- void loadIdentity();
- void load(const matrixf_t& rhs);
-
- inline GLfloat* editElements() { return m; }
- inline GLfloat const* elements() const { return m; }
-
- void set(const GLfixed* rhs);
- void set(const GLfloat* rhs);
-
- static void multiply(matrixf_t& r,
- const matrixf_t& lhs, const matrixf_t& rhs);
-
- void dump(const char* what);
-
-private:
- friend struct matrix_stack_t;
- GLfloat m[16];
- void load(const GLfixed* rhs);
- void load(const GLfloat* rhs);
- void multiply(const matrixf_t& rhs);
- void translate(GLfloat x, GLfloat y, GLfloat z);
- void scale(GLfloat x, GLfloat y, GLfloat z);
- void rotate(GLfloat a, GLfloat x, GLfloat y, GLfloat z);
-};
-
-enum {
- OP_IDENTITY = 0x00,
- OP_TRANSLATE = 0x01,
- OP_UNIFORM_SCALE = 0x02,
- OP_SCALE = 0x05,
- OP_ROTATE = 0x08,
- OP_SKEW = 0x10,
- OP_ALL = 0x1F
-};
-
-struct transform_t {
- enum {
- FLAGS_2D_PROJECTION = 0x1
- };
- matrixx_t matrix;
- uint32_t flags;
- uint32_t ops;
-
- union {
- struct {
- void (*point2)(transform_t const* t, vec4_t*, vec4_t const*);
- void (*point3)(transform_t const* t, vec4_t*, vec4_t const*);
- void (*point4)(transform_t const* t, vec4_t*, vec4_t const*);
- };
- void (*pointv[3])(transform_t const* t, vec4_t*, vec4_t const*);
- };
-
- void loadIdentity();
- void picker();
- void dump(const char* what);
-};
-
-struct mvui_transform_t : public transform_t
-{
- void picker();
-};
-
-struct matrix_stack_t {
- enum {
- DO_PICKER = 0x1,
- DO_FLOAT_TO_FIXED = 0x2
- };
- transform_t transform;
- uint8_t maxDepth;
- uint8_t depth;
- uint8_t dirty;
- uint8_t reserved;
- matrixf_t *stack;
- uint8_t *ops;
- void init(int depth);
- void uninit();
- void loadIdentity();
- void load(const GLfixed* rhs);
- void load(const GLfloat* rhs);
- void multiply(const matrixf_t& rhs);
- void translate(GLfloat x, GLfloat y, GLfloat z);
- void scale(GLfloat x, GLfloat y, GLfloat z);
- void rotate(GLfloat a, GLfloat x, GLfloat y, GLfloat z);
- GLint push();
- GLint pop();
- void validate();
- matrixf_t& top() { return stack[depth]; }
- const matrixf_t& top() const { return stack[depth]; }
- uint32_t top_ops() const { return ops[depth]; }
- inline bool isRigidBody() const {
- return !(ops[depth] & ~(OP_TRANSLATE|OP_UNIFORM_SCALE|OP_ROTATE));
- }
-};
-
-struct vp_transform_t {
- transform_t transform;
- matrixf_t matrix;
- GLfloat zNear;
- GLfloat zFar;
- void loadIdentity();
-};
-
-struct transform_state_t {
- enum {
- MODELVIEW = 0x01,
- PROJECTION = 0x02,
- VIEWPORT = 0x04,
- TEXTURE = 0x08,
- MVUI = 0x10,
- MVIT = 0x20,
- MVP = 0x40,
- };
- matrix_stack_t *current;
- matrix_stack_t modelview;
- matrix_stack_t projection;
- matrix_stack_t texture[GGL_TEXTURE_UNIT_COUNT];
-
- // modelview * projection
- transform_t mvp __attribute__((aligned(32)));
- // viewport transformation
- vp_transform_t vpt __attribute__((aligned(32)));
- // same for 4-D vertices
- transform_t mvp4;
- // full modelview inverse transpose
- transform_t mvit4;
- // upper 3x3 of mv-inverse-transpose (for normals)
- mvui_transform_t mvui;
-
- GLenum matrixMode;
- GLenum rescaleNormals;
- uint32_t dirty;
- void invalidate();
- void update_mvp();
- void update_mvit();
- void update_mvui();
-};
-
-struct viewport_t {
- GLint x;
- GLint y;
- GLsizei w;
- GLsizei h;
- struct {
- GLint x;
- GLint y;
- } surfaceport;
- struct {
- GLint x;
- GLint y;
- GLsizei w;
- GLsizei h;
- } scissor;
-};
-
-// ----------------------------------------------------------------------------
-// Lerping
-// ----------------------------------------------------------------------------
-
-struct compute_iterators_t
-{
- void initTriangle(
- vertex_t const* v0,
- vertex_t const* v1,
- vertex_t const* v2);
-
- void initLine(
- vertex_t const* v0,
- vertex_t const* v1);
-
- inline void initLerp(vertex_t const* v0, uint32_t enables);
-
- int iteratorsScale(int32_t it[3],
- int32_t c0, int32_t c1, int32_t c2) const;
-
- void iterators1616(GGLfixed it[3],
- GGLfixed c0, GGLfixed c1, GGLfixed c2) const;
-
- void iterators0032(int32_t it[3],
- int32_t c0, int32_t c1, int32_t c2) const;
-
- void iterators0032(int64_t it[3],
- int32_t c0, int32_t c1, int32_t c2) const;
-
- GGLcoord area() const { return m_area; }
-
-private:
- // don't change order of members here -- used by iterators.S
- GGLcoord m_dx01, m_dy10, m_dx20, m_dy02;
- GGLcoord m_x0, m_y0;
- GGLcoord m_area;
- uint8_t m_scale;
- uint8_t m_area_scale;
- uint8_t m_reserved[2];
-
-};
-
-// ----------------------------------------------------------------------------
-// state
-// ----------------------------------------------------------------------------
-
-#ifdef HAVE_ANDROID_OS
- // We have a dedicated TLS slot in bionic
- inline void setGlThreadSpecific(ogles_context_t *value) {
- ((uint32_t *)__get_tls())[TLS_SLOT_OPENGL] = (uint32_t)value;
- }
- inline ogles_context_t* getGlThreadSpecific() {
- return (ogles_context_t *)(((unsigned *)__get_tls())[TLS_SLOT_OPENGL]);
- }
-#else
- extern pthread_key_t gGLKey;
- inline void setGlThreadSpecific(ogles_context_t *value) {
- pthread_setspecific(gGLKey, value);
- }
- inline ogles_context_t* getGlThreadSpecific() {
- return static_cast<ogles_context_t*>(pthread_getspecific(gGLKey));
- }
-#endif
-
-
-struct prims_t {
- typedef ogles_context_t* GL;
- void (*renderPoint)(GL, vertex_t*);
- void (*renderLine)(GL, vertex_t*, vertex_t*);
- void (*renderTriangle)(GL, vertex_t*, vertex_t*, vertex_t*);
-};
-
-struct ogles_context_t {
- context_t rasterizer;
- array_machine_t arrays __attribute__((aligned(32)));
- texture_state_t textures;
- transform_state_t transforms;
- vertex_cache_t vc;
- prims_t prims;
- culling_t cull;
- lighting_t lighting;
- user_clip_planes_t clipPlanes;
- compute_iterators_t lerp; __attribute__((aligned(32)));
- vertex_t current;
- vec4_t currentColorClamped;
- vec3_t currentNormal;
- viewport_t viewport;
- point_size_t point;
- line_width_t line;
- polygon_offset_t polygonOffset;
- fog_t fog;
- uint32_t perspective : 1;
- uint32_t transformTextures : 1;
- EGLSurfaceManager* surfaceManager;
- EGLBufferObjectManager* bufferObjectManager;
-
- GLenum error;
-
- static inline ogles_context_t* get() {
- return getGlThreadSpecific();
- }
-
-};
-
-}; // namespace gl
-}; // namespace android
-
-#endif // ANDROID_OPENGLES_CONTEXT_H
-
diff --git a/include/private/ui/android_natives_priv.h b/include/private/ui/android_natives_priv.h
deleted file mode 100644
index 6b9f524..0000000
--- a/include/private/ui/android_natives_priv.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Copyright (C) 2009 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 <ui/android_native_buffer.h>
diff --git a/include/ui/egl/android_natives.h b/include/ui/ANativeObjectBase.h
similarity index 84%
rename from include/ui/egl/android_natives.h
rename to include/ui/ANativeObjectBase.h
index 9ac50a5..76e850f 100644
--- a/include/ui/egl/android_natives.h
+++ b/include/ui/ANativeObjectBase.h
@@ -22,8 +22,7 @@
#include <hardware/gralloc.h>
#include <system/window.h>
-// FIXME: remove this header, it's for legacy use. native_window is pulled from frameworks/base/native/include/android/
-#include <android/native_window.h>
+
// ---------------------------------------------------------------------------
/* FIXME: this is legacy for pixmaps */
@@ -52,11 +51,11 @@
namespace android {
/*
- * This helper class turns an EGL android_native_xxx type into a C++
+ * This helper class turns a ANativeXXX object type into a C++
* reference-counted object; with proper type conversions.
*/
template <typename NATIVE_TYPE, typename TYPE, typename REF>
-class EGLNativeBase : public NATIVE_TYPE, public REF
+class ANativeObjectBase : public NATIVE_TYPE, public REF
{
public:
// Disambiguate between the incStrong in REF and NATIVE_TYPE
@@ -68,8 +67,8 @@
}
protected:
- typedef EGLNativeBase<NATIVE_TYPE, TYPE, REF> BASE;
- EGLNativeBase() : NATIVE_TYPE(), REF() {
+ typedef ANativeObjectBase<NATIVE_TYPE, TYPE, REF> BASE;
+ ANativeObjectBase() : NATIVE_TYPE(), REF() {
NATIVE_TYPE::common.incRef = incRef;
NATIVE_TYPE::common.decRef = decRef;
}
@@ -86,11 +85,11 @@
return getSelf(reinterpret_cast<NATIVE_TYPE const*>(base));
}
static void incRef(android_native_base_t* base) {
- EGLNativeBase* self = getSelf(base);
+ ANativeObjectBase* self = getSelf(base);
self->incStrong(self);
}
static void decRef(android_native_base_t* base) {
- EGLNativeBase* self = getSelf(base);
+ ANativeObjectBase* self = getSelf(base);
self->decStrong(self);
}
};
diff --git a/include/ui/EGLNativeSurface.h b/include/ui/EGLNativeSurface.h
deleted file mode 100644
index 7964e7c..0000000
--- a/include/ui/EGLNativeSurface.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 2007 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 ANDROID_EGL_NATIVE_SURFACE_H
-#define ANDROID_EGL_NATIVE_SURFACE_H
-
-#include <stdint.h>
-#include <sys/types.h>
-
-#include <cutils/atomic.h>
-#include <utils/RefBase.h>
-
-#include <EGL/eglnatives.h>
-
-// ---------------------------------------------------------------------------
-namespace android {
-// ---------------------------------------------------------------------------
-
-template <class TYPE>
-class EGLNativeSurface : public egl_native_window_t, public LightRefBase<TYPE>
-{
-public:
- EGLNativeSurface() {
- memset(egl_native_window_t::reserved, 0,
- sizeof(egl_native_window_t::reserved));
- memset(egl_native_window_t::reserved_proc, 0,
- sizeof(egl_native_window_t::reserved_proc));
- memset(egl_native_window_t::oem, 0,
- sizeof(egl_native_window_t::oem));
- }
-protected:
- EGLNativeSurface& operator = (const EGLNativeSurface& rhs);
- EGLNativeSurface(const EGLNativeSurface& rhs);
- inline ~EGLNativeSurface() { };
-};
-
-// ---------------------------------------------------------------------------
-}; // namespace android
-// ---------------------------------------------------------------------------
-
-#endif // ANDROID_EGL_SURFACE_H
-
diff --git a/include/ui/EGLUtils.h b/include/ui/EGLUtils.h
deleted file mode 100644
index a5bff81..0000000
--- a/include/ui/EGLUtils.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2009 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 ANDROID_UI_EGLUTILS_H
-#define ANDROID_UI_EGLUTILS_H
-
-#include <utils/Errors.h>
-#include <ui/PixelFormat.h>
-#include <EGL/egl.h>
-
-
-// ----------------------------------------------------------------------------
-namespace android {
-// ----------------------------------------------------------------------------
-
-class EGLUtils
-{
-public:
-
- static const char *strerror(EGLint err);
-
- static status_t selectConfigForPixelFormat(
- EGLDisplay dpy,
- EGLint const* attrs,
- PixelFormat format,
- EGLConfig* outConfig);
-
- static status_t selectConfigForNativeWindow(
- EGLDisplay dpy,
- EGLint const* attrs,
- EGLNativeWindowType window,
- EGLConfig* outConfig);
-};
-
-// ----------------------------------------------------------------------------
-}; // namespace android
-// ----------------------------------------------------------------------------
-
-#endif /* ANDROID_UI_EGLUTILS_H */
diff --git a/include/ui/FramebufferNativeWindow.h b/include/ui/FramebufferNativeWindow.h
index 302d012..b202b95 100644
--- a/include/ui/FramebufferNativeWindow.h
+++ b/include/ui/FramebufferNativeWindow.h
@@ -24,12 +24,10 @@
#include <utils/threads.h>
#include <utils/String8.h>
+
+#include <ui/ANativeObjectBase.h>
#include <ui/Rect.h>
-#include <pixelflinger/pixelflinger.h>
-
-#include <ui/egl/android_natives.h>
-
#define NUM_FRAME_BUFFERS 2
extern "C" EGLNativeWindowType android_createDisplaySurface(void);
@@ -44,7 +42,7 @@
// ---------------------------------------------------------------------------
class FramebufferNativeWindow
- : public EGLNativeBase<
+ : public ANativeObjectBase<
ANativeWindow,
FramebufferNativeWindow,
LightRefBase<FramebufferNativeWindow> >
diff --git a/include/ui/GraphicBuffer.h b/include/ui/GraphicBuffer.h
index 6ab01f4..f318cd8 100644
--- a/include/ui/GraphicBuffer.h
+++ b/include/ui/GraphicBuffer.h
@@ -20,11 +20,11 @@
#include <stdint.h>
#include <sys/types.h>
-#include <ui/android_native_buffer.h>
+#include <ui/ANativeObjectBase.h>
#include <ui/PixelFormat.h>
#include <ui/Rect.h>
#include <utils/Flattenable.h>
-#include <pixelflinger/pixelflinger.h>
+
struct ANativeWindowBuffer;
@@ -37,7 +37,7 @@
// ===========================================================================
class GraphicBuffer
- : public EGLNativeBase<
+ : public ANativeObjectBase<
ANativeWindowBuffer,
GraphicBuffer,
LightRefBase<GraphicBuffer> >, public Flattenable
@@ -93,7 +93,6 @@
status_t lock(uint32_t usage, void** vaddr);
status_t lock(uint32_t usage, const Rect& rect, void** vaddr);
- status_t lock(GGLSurface* surface, uint32_t usage);
status_t unlock();
ANativeWindowBuffer* getNativeBuffer() const;
diff --git a/include/ui/PixelFormat.h b/include/ui/PixelFormat.h
index fc260c4..9f3e267 100644
--- a/include/ui/PixelFormat.h
+++ b/include/ui/PixelFormat.h
@@ -64,9 +64,6 @@
PIXEL_FORMAT_RGBA_5551 = HAL_PIXEL_FORMAT_RGBA_5551, // 16-bit ARGB
PIXEL_FORMAT_RGBA_4444 = HAL_PIXEL_FORMAT_RGBA_4444, // 16-bit ARGB
PIXEL_FORMAT_A_8 = 8, // 8-bit A
-
- // New formats can be added if they're also defined in
- // pixelflinger/format.h
};
typedef int32_t PixelFormat;
@@ -80,10 +77,12 @@
};
enum { // components
- ALPHA = 1,
- RGB = 2,
- RGBA = 3,
- OTHER = 0xFF
+ ALPHA = 1,
+ RGB = 2,
+ RGBA = 3,
+ L = 4,
+ LA = 5,
+ OTHER = 0xFF
};
struct szinfo {
diff --git a/include/ui/android_native_buffer.h b/include/ui/android_native_buffer.h
deleted file mode 100644
index b6e1db4..0000000
--- a/include/ui/android_native_buffer.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright (C) 2009 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 ANDROID_ANDROID_NATIVES_PRIV_H
-#define ANDROID_ANDROID_NATIVES_PRIV_H
-
-#include <ui/egl/android_natives.h>
-
-#endif /* ANDROID_ANDROID_NATIVES_PRIV_H */
diff --git a/include/utils/AndroidThreads.h b/include/utils/AndroidThreads.h
new file mode 100644
index 0000000..f9f7aa4
--- /dev/null
+++ b/include/utils/AndroidThreads.h
@@ -0,0 +1,136 @@
+/*
+ * Copyright (C) 2007 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 _LIBS_UTILS_ANDROID_THREADS_H
+#define _LIBS_UTILS_ANDROID_THREADS_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#if defined(HAVE_PTHREADS)
+# include <pthread.h>
+#endif
+
+#include <utils/ThreadDefs.h>
+
+// ---------------------------------------------------------------------------
+// C API
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// Create and run a new thread.
+extern int androidCreateThread(android_thread_func_t, void *);
+
+// Create thread with lots of parameters
+extern int androidCreateThreadEtc(android_thread_func_t entryFunction,
+ void *userData,
+ const char* threadName,
+ int32_t threadPriority,
+ size_t threadStackSize,
+ android_thread_id_t *threadId);
+
+// Get some sort of unique identifier for the current thread.
+extern android_thread_id_t androidGetThreadId();
+
+// Low-level thread creation -- never creates threads that can
+// interact with the Java VM.
+extern int androidCreateRawThreadEtc(android_thread_func_t entryFunction,
+ void *userData,
+ const char* threadName,
+ int32_t threadPriority,
+ size_t threadStackSize,
+ android_thread_id_t *threadId);
+
+// Used by the Java Runtime to control how threads are created, so that
+// they can be proper and lovely Java threads.
+typedef int (*android_create_thread_fn)(android_thread_func_t entryFunction,
+ void *userData,
+ const char* threadName,
+ int32_t threadPriority,
+ size_t threadStackSize,
+ android_thread_id_t *threadId);
+
+extern void androidSetCreateThreadFunc(android_create_thread_fn func);
+
+// ------------------------------------------------------------------
+// Extra functions working with raw pids.
+
+// Get pid for the current thread.
+extern pid_t androidGetTid();
+
+// Change the scheduling group of a particular thread. The group
+// should be one of the ANDROID_TGROUP constants. Returns BAD_VALUE if
+// grp is out of range, else another non-zero value with errno set if
+// the operation failed. Thread ID zero means current thread.
+extern int androidSetThreadSchedulingGroup(pid_t tid, int grp);
+
+// Change the priority AND scheduling group of a particular thread. The priority
+// should be one of the ANDROID_PRIORITY constants. Returns INVALID_OPERATION
+// if the priority set failed, else another value if just the group set failed;
+// in either case errno is set. Thread ID zero means current thread.
+extern int androidSetThreadPriority(pid_t tid, int prio);
+
+// Get the current priority of a particular thread. Returns one of the
+// ANDROID_PRIORITY constants or a negative result in case of error.
+extern int androidGetThreadPriority(pid_t tid);
+
+// Get the current scheduling group of a particular thread. Normally returns
+// one of the ANDROID_TGROUP constants other than ANDROID_TGROUP_DEFAULT.
+// Returns ANDROID_TGROUP_DEFAULT if no pthread support (e.g. on host) or if
+// scheduling groups are disabled. Returns INVALID_OPERATION if unexpected error.
+// Thread ID zero means current thread.
+extern int androidGetThreadSchedulingGroup(pid_t tid);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+// ----------------------------------------------------------------------------
+// C++ API
+#ifdef __cplusplus
+namespace android {
+// ----------------------------------------------------------------------------
+
+// Create and run a new thread.
+inline bool createThread(thread_func_t f, void *a) {
+ return androidCreateThread(f, a) ? true : false;
+}
+
+// Create thread with lots of parameters
+inline bool createThreadEtc(thread_func_t entryFunction,
+ void *userData,
+ const char* threadName = "android:unnamed_thread",
+ int32_t threadPriority = PRIORITY_DEFAULT,
+ size_t threadStackSize = 0,
+ thread_id_t *threadId = 0)
+{
+ return androidCreateThreadEtc(entryFunction, userData, threadName,
+ threadPriority, threadStackSize, threadId) ? true : false;
+}
+
+// Get some sort of unique identifier for the current thread.
+inline thread_id_t getThreadId() {
+ return androidGetThreadId();
+}
+
+// ----------------------------------------------------------------------------
+}; // namespace android
+#endif // __cplusplus
+// ----------------------------------------------------------------------------
+
+#endif // _LIBS_UTILS_ANDROID_THREADS_H
diff --git a/include/utils/Condition.h b/include/utils/Condition.h
new file mode 100644
index 0000000..8852d53
--- /dev/null
+++ b/include/utils/Condition.h
@@ -0,0 +1,134 @@
+/*
+ * Copyright (C) 2007 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 _LIBS_UTILS_CONDITION_H
+#define _LIBS_UTILS_CONDITION_H
+
+#include <stdint.h>
+#include <sys/types.h>
+#include <time.h>
+
+#if defined(HAVE_PTHREADS)
+# include <pthread.h>
+#endif
+
+#include <utils/Errors.h>
+#include <utils/Mutex.h>
+#include <utils/Timers.h>
+
+// ---------------------------------------------------------------------------
+namespace android {
+// ---------------------------------------------------------------------------
+
+/*
+ * Condition variable class. The implementation is system-dependent.
+ *
+ * Condition variables are paired up with mutexes. Lock the mutex,
+ * call wait(), then either re-wait() if things aren't quite what you want,
+ * or unlock the mutex and continue. All threads calling wait() must
+ * use the same mutex for a given Condition.
+ */
+class Condition {
+public:
+ enum {
+ PRIVATE = 0,
+ SHARED = 1
+ };
+
+ Condition();
+ Condition(int type);
+ ~Condition();
+ // Wait on the condition variable. Lock the mutex before calling.
+ status_t wait(Mutex& mutex);
+ // same with relative timeout
+ status_t waitRelative(Mutex& mutex, nsecs_t reltime);
+ // Signal the condition variable, allowing one thread to continue.
+ void signal();
+ // Signal the condition variable, allowing all threads to continue.
+ void broadcast();
+
+private:
+#if defined(HAVE_PTHREADS)
+ pthread_cond_t mCond;
+#else
+ void* mState;
+#endif
+};
+
+// ---------------------------------------------------------------------------
+
+#if defined(HAVE_PTHREADS)
+
+inline Condition::Condition() {
+ pthread_cond_init(&mCond, NULL);
+}
+inline Condition::Condition(int type) {
+ if (type == SHARED) {
+ pthread_condattr_t attr;
+ pthread_condattr_init(&attr);
+ pthread_condattr_setpshared(&attr, PTHREAD_PROCESS_SHARED);
+ pthread_cond_init(&mCond, &attr);
+ pthread_condattr_destroy(&attr);
+ } else {
+ pthread_cond_init(&mCond, NULL);
+ }
+}
+inline Condition::~Condition() {
+ pthread_cond_destroy(&mCond);
+}
+inline status_t Condition::wait(Mutex& mutex) {
+ return -pthread_cond_wait(&mCond, &mutex.mMutex);
+}
+inline status_t Condition::waitRelative(Mutex& mutex, nsecs_t reltime) {
+#if defined(HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE)
+ struct timespec ts;
+ ts.tv_sec = reltime/1000000000;
+ ts.tv_nsec = reltime%1000000000;
+ return -pthread_cond_timedwait_relative_np(&mCond, &mutex.mMutex, &ts);
+#else // HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE
+ struct timespec ts;
+#if defined(HAVE_POSIX_CLOCKS)
+ clock_gettime(CLOCK_REALTIME, &ts);
+#else // HAVE_POSIX_CLOCKS
+ // we don't support the clocks here.
+ struct timeval t;
+ gettimeofday(&t, NULL);
+ ts.tv_sec = t.tv_sec;
+ ts.tv_nsec= t.tv_usec*1000;
+#endif // HAVE_POSIX_CLOCKS
+ ts.tv_sec += reltime/1000000000;
+ ts.tv_nsec+= reltime%1000000000;
+ if (ts.tv_nsec >= 1000000000) {
+ ts.tv_nsec -= 1000000000;
+ ts.tv_sec += 1;
+ }
+ return -pthread_cond_timedwait(&mCond, &mutex.mMutex, &ts);
+#endif // HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE
+}
+inline void Condition::signal() {
+ pthread_cond_signal(&mCond);
+}
+inline void Condition::broadcast() {
+ pthread_cond_broadcast(&mCond);
+}
+
+#endif // HAVE_PTHREADS
+
+// ---------------------------------------------------------------------------
+}; // namespace android
+// ---------------------------------------------------------------------------
+
+#endif // _LIBS_UTILS_CONDITON_H
diff --git a/include/utils/KeyedVector.h b/include/utils/KeyedVector.h
index fcc3bcf..85535bd 100644
--- a/include/utils/KeyedVector.h
+++ b/include/utils/KeyedVector.h
@@ -122,7 +122,7 @@
template<typename KEY, typename VALUE> inline
const VALUE& KeyedVector<KEY,VALUE>::valueFor(const KEY& key) const {
- ssize_t i = indexOfKey(key);
+ ssize_t i = this->indexOfKey(key);
assert(i>=0);
return mVector.itemAt(i).value;
}
@@ -139,7 +139,7 @@
template<typename KEY, typename VALUE> inline
VALUE& KeyedVector<KEY,VALUE>::editValueFor(const KEY& key) {
- ssize_t i = indexOfKey(key);
+ ssize_t i = this->indexOfKey(key);
assert(i>=0);
return mVector.editItemAt(i).value;
}
@@ -190,7 +190,7 @@
template<typename KEY, typename VALUE> inline
const VALUE& DefaultKeyedVector<KEY,VALUE>::valueFor(const KEY& key) const {
- ssize_t i = indexOfKey(key);
+ ssize_t i = this->indexOfKey(key);
return i >= 0 ? KeyedVector<KEY,VALUE>::valueAt(i) : mDefault;
}
diff --git a/include/utils/Mutex.h b/include/utils/Mutex.h
new file mode 100644
index 0000000..de6fb39
--- /dev/null
+++ b/include/utils/Mutex.h
@@ -0,0 +1,137 @@
+/*
+ * Copyright (C) 2007 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 _LIBS_UTILS_MUTEX_H
+#define _LIBS_UTILS_MUTEX_H
+
+#include <stdint.h>
+#include <sys/types.h>
+#include <time.h>
+
+#if defined(HAVE_PTHREADS)
+# include <pthread.h>
+#endif
+
+#include <utils/Errors.h>
+
+// ---------------------------------------------------------------------------
+namespace android {
+// ---------------------------------------------------------------------------
+
+class Condition;
+
+/*
+ * Simple mutex class. The implementation is system-dependent.
+ *
+ * The mutex must be unlocked by the thread that locked it. They are not
+ * recursive, i.e. the same thread can't lock it multiple times.
+ */
+class Mutex {
+public:
+ enum {
+ PRIVATE = 0,
+ SHARED = 1
+ };
+
+ Mutex();
+ Mutex(const char* name);
+ Mutex(int type, const char* name = NULL);
+ ~Mutex();
+
+ // lock or unlock the mutex
+ status_t lock();
+ void unlock();
+
+ // lock if possible; returns 0 on success, error otherwise
+ status_t tryLock();
+
+ // Manages the mutex automatically. It'll be locked when Autolock is
+ // constructed and released when Autolock goes out of scope.
+ class Autolock {
+ public:
+ inline Autolock(Mutex& mutex) : mLock(mutex) { mLock.lock(); }
+ inline Autolock(Mutex* mutex) : mLock(*mutex) { mLock.lock(); }
+ inline ~Autolock() { mLock.unlock(); }
+ private:
+ Mutex& mLock;
+ };
+
+private:
+ friend class Condition;
+
+ // A mutex cannot be copied
+ Mutex(const Mutex&);
+ Mutex& operator = (const Mutex&);
+
+#if defined(HAVE_PTHREADS)
+ pthread_mutex_t mMutex;
+#else
+ void _init();
+ void* mState;
+#endif
+};
+
+// ---------------------------------------------------------------------------
+
+#if defined(HAVE_PTHREADS)
+
+inline Mutex::Mutex() {
+ pthread_mutex_init(&mMutex, NULL);
+}
+inline Mutex::Mutex(const char* name) {
+ pthread_mutex_init(&mMutex, NULL);
+}
+inline Mutex::Mutex(int type, const char* name) {
+ if (type == SHARED) {
+ pthread_mutexattr_t attr;
+ pthread_mutexattr_init(&attr);
+ pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_SHARED);
+ pthread_mutex_init(&mMutex, &attr);
+ pthread_mutexattr_destroy(&attr);
+ } else {
+ pthread_mutex_init(&mMutex, NULL);
+ }
+}
+inline Mutex::~Mutex() {
+ pthread_mutex_destroy(&mMutex);
+}
+inline status_t Mutex::lock() {
+ return -pthread_mutex_lock(&mMutex);
+}
+inline void Mutex::unlock() {
+ pthread_mutex_unlock(&mMutex);
+}
+inline status_t Mutex::tryLock() {
+ return -pthread_mutex_trylock(&mMutex);
+}
+
+#endif // HAVE_PTHREADS
+
+// ---------------------------------------------------------------------------
+
+/*
+ * Automatic mutex. Declare one of these at the top of a function.
+ * When the function returns, it will go out of scope, and release the
+ * mutex.
+ */
+
+typedef Mutex::Autolock AutoMutex;
+
+// ---------------------------------------------------------------------------
+}; // namespace android
+// ---------------------------------------------------------------------------
+
+#endif // _LIBS_UTILS_MUTEX_H
diff --git a/include/utils/RWLock.h b/include/utils/RWLock.h
new file mode 100644
index 0000000..a5abea2
--- /dev/null
+++ b/include/utils/RWLock.h
@@ -0,0 +1,126 @@
+/*
+ * Copyright (C) 2007 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 _LIBS_UTILS_RWLOCK_H
+#define _LIBS_UTILS_RWLOCK_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#if defined(HAVE_PTHREADS)
+# include <pthread.h>
+#endif
+
+#include <utils/Errors.h>
+#include <utils/ThreadDefs.h>
+
+// ---------------------------------------------------------------------------
+namespace android {
+// ---------------------------------------------------------------------------
+
+#if defined(HAVE_PTHREADS)
+
+/*
+ * Simple mutex class. The implementation is system-dependent.
+ *
+ * The mutex must be unlocked by the thread that locked it. They are not
+ * recursive, i.e. the same thread can't lock it multiple times.
+ */
+class RWLock {
+public:
+ enum {
+ PRIVATE = 0,
+ SHARED = 1
+ };
+
+ RWLock();
+ RWLock(const char* name);
+ RWLock(int type, const char* name = NULL);
+ ~RWLock();
+
+ status_t readLock();
+ status_t tryReadLock();
+ status_t writeLock();
+ status_t tryWriteLock();
+ void unlock();
+
+ class AutoRLock {
+ public:
+ inline AutoRLock(RWLock& rwlock) : mLock(rwlock) { mLock.readLock(); }
+ inline ~AutoRLock() { mLock.unlock(); }
+ private:
+ RWLock& mLock;
+ };
+
+ class AutoWLock {
+ public:
+ inline AutoWLock(RWLock& rwlock) : mLock(rwlock) { mLock.writeLock(); }
+ inline ~AutoWLock() { mLock.unlock(); }
+ private:
+ RWLock& mLock;
+ };
+
+private:
+ // A RWLock cannot be copied
+ RWLock(const RWLock&);
+ RWLock& operator = (const RWLock&);
+
+ pthread_rwlock_t mRWLock;
+};
+
+inline RWLock::RWLock() {
+ pthread_rwlock_init(&mRWLock, NULL);
+}
+inline RWLock::RWLock(const char* name) {
+ pthread_rwlock_init(&mRWLock, NULL);
+}
+inline RWLock::RWLock(int type, const char* name) {
+ if (type == SHARED) {
+ pthread_rwlockattr_t attr;
+ pthread_rwlockattr_init(&attr);
+ pthread_rwlockattr_setpshared(&attr, PTHREAD_PROCESS_SHARED);
+ pthread_rwlock_init(&mRWLock, &attr);
+ pthread_rwlockattr_destroy(&attr);
+ } else {
+ pthread_rwlock_init(&mRWLock, NULL);
+ }
+}
+inline RWLock::~RWLock() {
+ pthread_rwlock_destroy(&mRWLock);
+}
+inline status_t RWLock::readLock() {
+ return -pthread_rwlock_rdlock(&mRWLock);
+}
+inline status_t RWLock::tryReadLock() {
+ return -pthread_rwlock_tryrdlock(&mRWLock);
+}
+inline status_t RWLock::writeLock() {
+ return -pthread_rwlock_wrlock(&mRWLock);
+}
+inline status_t RWLock::tryWriteLock() {
+ return -pthread_rwlock_trywrlock(&mRWLock);
+}
+inline void RWLock::unlock() {
+ pthread_rwlock_unlock(&mRWLock);
+}
+
+#endif // HAVE_PTHREADS
+
+// ---------------------------------------------------------------------------
+}; // namespace android
+// ---------------------------------------------------------------------------
+
+#endif // _LIBS_UTILS_RWLOCK_H
diff --git a/include/utils/Thread.h b/include/utils/Thread.h
new file mode 100644
index 0000000..4a34abd
--- /dev/null
+++ b/include/utils/Thread.h
@@ -0,0 +1,113 @@
+/*
+ * Copyright (C) 2007 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 _LIBS_UTILS_THREAD_H
+#define _LIBS_UTILS_THREAD_H
+
+#include <stdint.h>
+#include <sys/types.h>
+#include <time.h>
+
+#if defined(HAVE_PTHREADS)
+# include <pthread.h>
+#endif
+
+#include <utils/Condition.h>
+#include <utils/Errors.h>
+#include <utils/Mutex.h>
+#include <utils/RefBase.h>
+#include <utils/Timers.h>
+#include <utils/ThreadDefs.h>
+
+// ---------------------------------------------------------------------------
+namespace android {
+// ---------------------------------------------------------------------------
+
+class Thread : virtual public RefBase
+{
+public:
+ // Create a Thread object, but doesn't create or start the associated
+ // thread. See the run() method.
+ Thread(bool canCallJava = true);
+ virtual ~Thread();
+
+ // Start the thread in threadLoop() which needs to be implemented.
+ virtual status_t run( const char* name = 0,
+ int32_t priority = PRIORITY_DEFAULT,
+ size_t stack = 0);
+
+ // Ask this object's thread to exit. This function is asynchronous, when the
+ // function returns the thread might still be running. Of course, this
+ // function can be called from a different thread.
+ virtual void requestExit();
+
+ // Good place to do one-time initializations
+ virtual status_t readyToRun();
+
+ // Call requestExit() and wait until this object's thread exits.
+ // BE VERY CAREFUL of deadlocks. In particular, it would be silly to call
+ // this function from this object's thread. Will return WOULD_BLOCK in
+ // that case.
+ status_t requestExitAndWait();
+
+ // Wait until this object's thread exits. Returns immediately if not yet running.
+ // Do not call from this object's thread; will return WOULD_BLOCK in that case.
+ status_t join();
+
+#ifdef HAVE_ANDROID_OS
+ // Return the thread's kernel ID, same as the thread itself calling gettid() or
+ // androidGetTid(), or -1 if the thread is not running.
+ pid_t getTid() const;
+#endif
+
+protected:
+ // exitPending() returns true if requestExit() has been called.
+ bool exitPending() const;
+
+private:
+ // Derived class must implement threadLoop(). The thread starts its life
+ // here. There are two ways of using the Thread object:
+ // 1) loop: if threadLoop() returns true, it will be called again if
+ // requestExit() wasn't called.
+ // 2) once: if threadLoop() returns false, the thread will exit upon return.
+ virtual bool threadLoop() = 0;
+
+private:
+ Thread& operator=(const Thread&);
+ static int _threadLoop(void* user);
+ const bool mCanCallJava;
+ // always hold mLock when reading or writing
+ thread_id_t mThread;
+ mutable Mutex mLock;
+ Condition mThreadExitedCondition;
+ status_t mStatus;
+ // note that all accesses of mExitPending and mRunning need to hold mLock
+ volatile bool mExitPending;
+ volatile bool mRunning;
+ sp<Thread> mHoldSelf;
+#ifdef HAVE_ANDROID_OS
+ // legacy for debugging, not used by getTid() as it is set by the child thread
+ // and so is not initialized until the child reaches that point
+ pid_t mTid;
+#endif
+};
+
+
+}; // namespace android
+
+// ---------------------------------------------------------------------------
+#endif // _LIBS_UTILS_THREAD_H
+// ---------------------------------------------------------------------------
diff --git a/include/utils/ThreadDefs.h b/include/utils/ThreadDefs.h
new file mode 100644
index 0000000..3e56373
--- /dev/null
+++ b/include/utils/ThreadDefs.h
@@ -0,0 +1,123 @@
+/*
+ * Copyright (C) 2007 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 _LIBS_UTILS_THREAD_DEFS_H
+#define _LIBS_UTILS_THREAD_DEFS_H
+
+#include <stdint.h>
+#include <sys/types.h>
+#include <system/graphics.h>
+
+// ---------------------------------------------------------------------------
+// C API
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef void* android_thread_id_t;
+
+typedef int (*android_thread_func_t)(void*);
+
+enum {
+ /*
+ * ***********************************************
+ * ** Keep in sync with android.os.Process.java **
+ * ***********************************************
+ *
+ * This maps directly to the "nice" priorities we use in Android.
+ * A thread priority should be chosen inverse-proportionally to
+ * the amount of work the thread is expected to do. The more work
+ * a thread will do, the less favorable priority it should get so that
+ * it doesn't starve the system. Threads not behaving properly might
+ * be "punished" by the kernel.
+ * Use the levels below when appropriate. Intermediate values are
+ * acceptable, preferably use the {MORE|LESS}_FAVORABLE constants below.
+ */
+ ANDROID_PRIORITY_LOWEST = 19,
+
+ /* use for background tasks */
+ ANDROID_PRIORITY_BACKGROUND = 10,
+
+ /* most threads run at normal priority */
+ ANDROID_PRIORITY_NORMAL = 0,
+
+ /* threads currently running a UI that the user is interacting with */
+ ANDROID_PRIORITY_FOREGROUND = -2,
+
+ /* the main UI thread has a slightly more favorable priority */
+ ANDROID_PRIORITY_DISPLAY = -4,
+
+ /* ui service treads might want to run at a urgent display (uncommon) */
+ ANDROID_PRIORITY_URGENT_DISPLAY = HAL_PRIORITY_URGENT_DISPLAY,
+
+ /* all normal audio threads */
+ ANDROID_PRIORITY_AUDIO = -16,
+
+ /* service audio threads (uncommon) */
+ ANDROID_PRIORITY_URGENT_AUDIO = -19,
+
+ /* should never be used in practice. regular process might not
+ * be allowed to use this level */
+ ANDROID_PRIORITY_HIGHEST = -20,
+
+ ANDROID_PRIORITY_DEFAULT = ANDROID_PRIORITY_NORMAL,
+ ANDROID_PRIORITY_MORE_FAVORABLE = -1,
+ ANDROID_PRIORITY_LESS_FAVORABLE = +1,
+};
+
+enum {
+ ANDROID_TGROUP_DEFAULT = 0,
+ ANDROID_TGROUP_BG_NONINTERACT = 1,
+ ANDROID_TGROUP_FG_BOOST = 2,
+ ANDROID_TGROUP_MAX = ANDROID_TGROUP_FG_BOOST,
+};
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+// ---------------------------------------------------------------------------
+// C++ API
+#ifdef __cplusplus
+namespace android {
+// ---------------------------------------------------------------------------
+
+typedef android_thread_id_t thread_id_t;
+typedef android_thread_func_t thread_func_t;
+
+enum {
+ PRIORITY_LOWEST = ANDROID_PRIORITY_LOWEST,
+ PRIORITY_BACKGROUND = ANDROID_PRIORITY_BACKGROUND,
+ PRIORITY_NORMAL = ANDROID_PRIORITY_NORMAL,
+ PRIORITY_FOREGROUND = ANDROID_PRIORITY_FOREGROUND,
+ PRIORITY_DISPLAY = ANDROID_PRIORITY_DISPLAY,
+ PRIORITY_URGENT_DISPLAY = ANDROID_PRIORITY_URGENT_DISPLAY,
+ PRIORITY_AUDIO = ANDROID_PRIORITY_AUDIO,
+ PRIORITY_URGENT_AUDIO = ANDROID_PRIORITY_URGENT_AUDIO,
+ PRIORITY_HIGHEST = ANDROID_PRIORITY_HIGHEST,
+ PRIORITY_DEFAULT = ANDROID_PRIORITY_DEFAULT,
+ PRIORITY_MORE_FAVORABLE = ANDROID_PRIORITY_MORE_FAVORABLE,
+ PRIORITY_LESS_FAVORABLE = ANDROID_PRIORITY_LESS_FAVORABLE,
+};
+
+// ---------------------------------------------------------------------------
+}; // namespace android
+#endif // __cplusplus
+// ---------------------------------------------------------------------------
+
+
+#endif // _LIBS_UTILS_THREAD_DEFS_H
diff --git a/include/utils/Trace.h b/include/utils/Trace.h
new file mode 100644
index 0000000..f33ddf6
--- /dev/null
+++ b/include/utils/Trace.h
@@ -0,0 +1,166 @@
+/*
+ * Copyright (C) 2012 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 ANDROID_TRACE_H
+#define ANDROID_TRACE_H
+
+#include <fcntl.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include <cutils/compiler.h>
+#include <utils/threads.h>
+
+// The ATRACE_TAG macro can be defined before including this header to trace
+// using one of the tags defined below. It must be defined to one of the
+// following ATRACE_TAG_* macros. The trace tag is used to filter tracing in
+// userland to avoid some of the runtime cost of tracing when it is not desired.
+//
+// Defining ATRACE_TAG to be ATRACE_TAG_ALWAYS will result in the tracing always
+// being enabled - this should ONLY be done for debug code, as userland tracing
+// has a performance cost even when the trace is not being recorded. Defining
+// ATRACE_TAG to be ATRACE_TAG_NEVER or leaving ATRACE_TAG undefined will result
+// in the tracing always being disabled.
+#define ATRACE_TAG_NEVER 0 // The "never" tag is never enabled.
+#define ATRACE_TAG_ALWAYS (1<<0) // The "always" tag is always enabled.
+#define ATRACE_TAG_GRAPHICS (1<<1)
+#define ATRACE_TAG_LAST (1<<1)
+
+#define ATRACE_TAG_INVALID (~((ATRACE_TAG_LAST - 1) | ATRACE_TAG_LAST))
+
+#ifndef ATRACE_TAG
+#define ATRACE_TAG ATRACE_TAG_NEVER
+#elif ATRACE_TAG > ATRACE_TAG_LAST
+#error ATRACE_TAG must be defined to be one of the tags defined in utils/Trace.h
+#endif
+
+// ATRACE_CALL traces the beginning and end of the current function. To trace
+// the correct start and end times this macro should be the first line of the
+// function body.
+#define ATRACE_CALL() android::ScopedTrace ___tracer(ATRACE_TAG, __FUNCTION__)
+
+// ATRACE_INT traces a named integer value. This can be used to track how the
+// value changes over time in a trace.
+#define ATRACE_INT(name, value) android::Tracer::traceCounter(ATRACE_TAG, name, value)
+
+namespace android {
+
+class Tracer {
+
+public:
+
+ static inline void traceCounter(uint64_t tag, const char* name,
+ int32_t value) {
+ if (!android_atomic_acquire_load(&sIsReady)) {
+ init();
+ }
+ int traceFD = sTraceFD;
+ if (CC_UNLIKELY(tagEnabled(tag) && traceFD != -1)) {
+ char buf[1024];
+ snprintf(buf, 1024, "C|%d|%s|%d", getpid(), name, value);
+ write(traceFD, buf, strlen(buf));
+ }
+ }
+
+ static inline void traceBegin(uint64_t tag, const char* name) {
+ if (CC_UNLIKELY(!android_atomic_acquire_load(&sIsReady))) {
+ init();
+ }
+ int traceFD = sTraceFD;
+ if (CC_UNLIKELY(tagEnabled(tag) && (traceFD != -1))) {
+ char buf[1024];
+ size_t len = snprintf(buf, 1024, "B|%d|%s", getpid(), name);
+ write(traceFD, buf, len);
+ }
+ }
+
+ static inline void traceEnd(uint64_t tag) {
+ if (CC_UNLIKELY(!android_atomic_acquire_load(&sIsReady))) {
+ init();
+ }
+ int traceFD = sTraceFD;
+ if (CC_UNLIKELY(tagEnabled(tag) && (traceFD != -1))) {
+ char buf = 'E';
+ write(traceFD, &buf, 1);
+ }
+ }
+
+private:
+
+ static inline bool tagEnabled(uint64_t tag) {
+ return !(tag & ATRACE_TAG_INVALID) && (tag & sEnabledTags);
+ }
+
+ // init opens the trace marker file for writing and reads the
+ // atrace.tags.enableflags system property. It does this only the first
+ // time it is run, using sMutex for synchronization.
+ static void init();
+
+ // sIsReady is a boolean value indicating whether a call to init() has
+ // completed in this process. It is initialized to 0 and set to 1 when the
+ // first init() call completes. It is set to 1 even if a failure occurred
+ // in init (e.g. the trace marker file couldn't be opened).
+ //
+ // This should be checked by all tracing functions using an atomic acquire
+ // load operation before calling init(). This check avoids the need to lock
+ // a mutex each time a trace function gets called.
+ static volatile int32_t sIsReady;
+
+ // sTraceFD is the file descriptor used to write to the kernel's trace
+ // buffer. It is initialized to -1 and set to an open file descriptor in
+ // init() while a lock on sMutex is held.
+ //
+ // This should only be used by a trace function after init() has
+ // successfully completed.
+ static int sTraceFD;
+
+ // sEnabledTags is the set of tag bits for which tracing is currently
+ // enabled. It is initialized to 0 and set based on the
+ // atrace.tags.enableflags system property in init() while a lock on sMutex
+ // is held.
+ //
+ // This should only be used by a trace function after init() has
+ // successfully completed.
+ static uint64_t sEnabledTags;
+
+ // sMutex is used to protect the execution of init().
+ static Mutex sMutex;
+};
+
+class ScopedTrace {
+
+public:
+ inline ScopedTrace(uint64_t tag, const char* name) :
+ mTag(tag) {
+ Tracer::traceBegin(mTag, name);
+ }
+
+ inline ~ScopedTrace() {
+ Tracer::traceEnd(mTag);
+ }
+
+private:
+
+ uint64_t mTag;
+};
+
+}; // namespace android
+
+#endif // ANDROID_TRACE_H
diff --git a/include/utils/threads.h b/include/utils/threads.h
index b4a8b7c..9de3382 100644
--- a/include/utils/threads.h
+++ b/include/utils/threads.h
@@ -17,556 +17,22 @@
#ifndef _LIBS_UTILS_THREADS_H
#define _LIBS_UTILS_THREADS_H
-#include <stdint.h>
-#include <sys/types.h>
-#include <time.h>
-#include <system/graphics.h>
+/*
+ * Please, DO NOT USE!
+ *
+ * This file is here only for legacy reasons. Instead, include directly
+ * the headers you need below.
+ *
+ */
-#if defined(HAVE_PTHREADS)
-# include <pthread.h>
-#endif
-
-// ------------------------------------------------------------------
-// C API
+#include <utils/AndroidThreads.h>
#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef void* android_thread_id_t;
-
-typedef int (*android_thread_func_t)(void*);
-
-enum {
- /*
- * ***********************************************
- * ** Keep in sync with android.os.Process.java **
- * ***********************************************
- *
- * This maps directly to the "nice" priorities we use in Android.
- * A thread priority should be chosen inverse-proportionally to
- * the amount of work the thread is expected to do. The more work
- * a thread will do, the less favorable priority it should get so that
- * it doesn't starve the system. Threads not behaving properly might
- * be "punished" by the kernel.
- * Use the levels below when appropriate. Intermediate values are
- * acceptable, preferably use the {MORE|LESS}_FAVORABLE constants below.
- */
- ANDROID_PRIORITY_LOWEST = 19,
-
- /* use for background tasks */
- ANDROID_PRIORITY_BACKGROUND = 10,
-
- /* most threads run at normal priority */
- ANDROID_PRIORITY_NORMAL = 0,
-
- /* threads currently running a UI that the user is interacting with */
- ANDROID_PRIORITY_FOREGROUND = -2,
-
- /* the main UI thread has a slightly more favorable priority */
- ANDROID_PRIORITY_DISPLAY = -4,
-
- /* ui service treads might want to run at a urgent display (uncommon) */
- ANDROID_PRIORITY_URGENT_DISPLAY = HAL_PRIORITY_URGENT_DISPLAY,
-
- /* all normal audio threads */
- ANDROID_PRIORITY_AUDIO = -16,
-
- /* service audio threads (uncommon) */
- ANDROID_PRIORITY_URGENT_AUDIO = -19,
-
- /* should never be used in practice. regular process might not
- * be allowed to use this level */
- ANDROID_PRIORITY_HIGHEST = -20,
-
- ANDROID_PRIORITY_DEFAULT = ANDROID_PRIORITY_NORMAL,
- ANDROID_PRIORITY_MORE_FAVORABLE = -1,
- ANDROID_PRIORITY_LESS_FAVORABLE = +1,
-};
-
-enum {
- ANDROID_TGROUP_DEFAULT = 0,
- ANDROID_TGROUP_BG_NONINTERACT = 1,
- ANDROID_TGROUP_FG_BOOST = 2,
- ANDROID_TGROUP_MAX = ANDROID_TGROUP_FG_BOOST,
-};
-
-// Create and run a new thread.
-extern int androidCreateThread(android_thread_func_t, void *);
-
-// Create thread with lots of parameters
-extern int androidCreateThreadEtc(android_thread_func_t entryFunction,
- void *userData,
- const char* threadName,
- int32_t threadPriority,
- size_t threadStackSize,
- android_thread_id_t *threadId);
-
-// Get some sort of unique identifier for the current thread.
-extern android_thread_id_t androidGetThreadId();
-
-// Low-level thread creation -- never creates threads that can
-// interact with the Java VM.
-extern int androidCreateRawThreadEtc(android_thread_func_t entryFunction,
- void *userData,
- const char* threadName,
- int32_t threadPriority,
- size_t threadStackSize,
- android_thread_id_t *threadId);
-
-// Used by the Java Runtime to control how threads are created, so that
-// they can be proper and lovely Java threads.
-typedef int (*android_create_thread_fn)(android_thread_func_t entryFunction,
- void *userData,
- const char* threadName,
- int32_t threadPriority,
- size_t threadStackSize,
- android_thread_id_t *threadId);
-
-extern void androidSetCreateThreadFunc(android_create_thread_fn func);
-
-// ------------------------------------------------------------------
-// Extra functions working with raw pids.
-
-// Get pid for the current thread.
-extern pid_t androidGetTid();
-
-// Change the scheduling group of a particular thread. The group
-// should be one of the ANDROID_TGROUP constants. Returns BAD_VALUE if
-// grp is out of range, else another non-zero value with errno set if
-// the operation failed. Thread ID zero means current thread.
-extern int androidSetThreadSchedulingGroup(pid_t tid, int grp);
-
-// Change the priority AND scheduling group of a particular thread. The priority
-// should be one of the ANDROID_PRIORITY constants. Returns INVALID_OPERATION
-// if the priority set failed, else another value if just the group set failed;
-// in either case errno is set. Thread ID zero means current thread.
-extern int androidSetThreadPriority(pid_t tid, int prio);
-
-// Get the current priority of a particular thread. Returns one of the
-// ANDROID_PRIORITY constants or a negative result in case of error.
-extern int androidGetThreadPriority(pid_t tid);
-
-// Get the current scheduling group of a particular thread. Normally returns
-// one of the ANDROID_TGROUP constants other than ANDROID_TGROUP_DEFAULT.
-// Returns ANDROID_TGROUP_DEFAULT if no pthread support (e.g. on host) or if
-// scheduling groups are disabled. Returns INVALID_OPERATION if unexpected error.
-// Thread ID zero means current thread.
-extern int androidGetThreadSchedulingGroup(pid_t tid);
-
-#ifdef __cplusplus
-}
-#endif
-
-// ------------------------------------------------------------------
-// C++ API
-
-#ifdef __cplusplus
-
+#include <utils/Condition.h>
#include <utils/Errors.h>
-#include <utils/RefBase.h>
-#include <utils/Timers.h>
-
-namespace android {
-
-typedef android_thread_id_t thread_id_t;
-
-typedef android_thread_func_t thread_func_t;
-
-enum {
- PRIORITY_LOWEST = ANDROID_PRIORITY_LOWEST,
- PRIORITY_BACKGROUND = ANDROID_PRIORITY_BACKGROUND,
- PRIORITY_NORMAL = ANDROID_PRIORITY_NORMAL,
- PRIORITY_FOREGROUND = ANDROID_PRIORITY_FOREGROUND,
- PRIORITY_DISPLAY = ANDROID_PRIORITY_DISPLAY,
- PRIORITY_URGENT_DISPLAY = ANDROID_PRIORITY_URGENT_DISPLAY,
- PRIORITY_AUDIO = ANDROID_PRIORITY_AUDIO,
- PRIORITY_URGENT_AUDIO = ANDROID_PRIORITY_URGENT_AUDIO,
- PRIORITY_HIGHEST = ANDROID_PRIORITY_HIGHEST,
- PRIORITY_DEFAULT = ANDROID_PRIORITY_DEFAULT,
- PRIORITY_MORE_FAVORABLE = ANDROID_PRIORITY_MORE_FAVORABLE,
- PRIORITY_LESS_FAVORABLE = ANDROID_PRIORITY_LESS_FAVORABLE,
-};
-
-// Create and run a new thread.
-inline bool createThread(thread_func_t f, void *a) {
- return androidCreateThread(f, a) ? true : false;
-}
-
-// Create thread with lots of parameters
-inline bool createThreadEtc(thread_func_t entryFunction,
- void *userData,
- const char* threadName = "android:unnamed_thread",
- int32_t threadPriority = PRIORITY_DEFAULT,
- size_t threadStackSize = 0,
- thread_id_t *threadId = 0)
-{
- return androidCreateThreadEtc(entryFunction, userData, threadName,
- threadPriority, threadStackSize, threadId) ? true : false;
-}
-
-// Get some sort of unique identifier for the current thread.
-inline thread_id_t getThreadId() {
- return androidGetThreadId();
-}
-
-/*****************************************************************************/
-
-/*
- * Simple mutex class. The implementation is system-dependent.
- *
- * The mutex must be unlocked by the thread that locked it. They are not
- * recursive, i.e. the same thread can't lock it multiple times.
- */
-class Mutex {
-public:
- enum {
- PRIVATE = 0,
- SHARED = 1
- };
-
- Mutex();
- Mutex(const char* name);
- Mutex(int type, const char* name = NULL);
- ~Mutex();
-
- // lock or unlock the mutex
- status_t lock();
- void unlock();
-
- // lock if possible; returns 0 on success, error otherwise
- status_t tryLock();
-
- // Manages the mutex automatically. It'll be locked when Autolock is
- // constructed and released when Autolock goes out of scope.
- class Autolock {
- public:
- inline Autolock(Mutex& mutex) : mLock(mutex) { mLock.lock(); }
- inline Autolock(Mutex* mutex) : mLock(*mutex) { mLock.lock(); }
- inline ~Autolock() { mLock.unlock(); }
- private:
- Mutex& mLock;
- };
-
-private:
- friend class Condition;
-
- // A mutex cannot be copied
- Mutex(const Mutex&);
- Mutex& operator = (const Mutex&);
-
-#if defined(HAVE_PTHREADS)
- pthread_mutex_t mMutex;
-#else
- void _init();
- void* mState;
+#include <utils/Mutex.h>
+#include <utils/RWLock.h>
+#include <utils/Thread.h>
#endif
-};
-
-#if defined(HAVE_PTHREADS)
-
-inline Mutex::Mutex() {
- pthread_mutex_init(&mMutex, NULL);
-}
-inline Mutex::Mutex(const char* name) {
- pthread_mutex_init(&mMutex, NULL);
-}
-inline Mutex::Mutex(int type, const char* name) {
- if (type == SHARED) {
- pthread_mutexattr_t attr;
- pthread_mutexattr_init(&attr);
- pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_SHARED);
- pthread_mutex_init(&mMutex, &attr);
- pthread_mutexattr_destroy(&attr);
- } else {
- pthread_mutex_init(&mMutex, NULL);
- }
-}
-inline Mutex::~Mutex() {
- pthread_mutex_destroy(&mMutex);
-}
-inline status_t Mutex::lock() {
- return -pthread_mutex_lock(&mMutex);
-}
-inline void Mutex::unlock() {
- pthread_mutex_unlock(&mMutex);
-}
-inline status_t Mutex::tryLock() {
- return -pthread_mutex_trylock(&mMutex);
-}
-
-#endif // HAVE_PTHREADS
-
-/*
- * Automatic mutex. Declare one of these at the top of a function.
- * When the function returns, it will go out of scope, and release the
- * mutex.
- */
-
-typedef Mutex::Autolock AutoMutex;
-
-/*****************************************************************************/
-
-#if defined(HAVE_PTHREADS)
-
-/*
- * Simple mutex class. The implementation is system-dependent.
- *
- * The mutex must be unlocked by the thread that locked it. They are not
- * recursive, i.e. the same thread can't lock it multiple times.
- */
-class RWLock {
-public:
- enum {
- PRIVATE = 0,
- SHARED = 1
- };
-
- RWLock();
- RWLock(const char* name);
- RWLock(int type, const char* name = NULL);
- ~RWLock();
-
- status_t readLock();
- status_t tryReadLock();
- status_t writeLock();
- status_t tryWriteLock();
- void unlock();
-
- class AutoRLock {
- public:
- inline AutoRLock(RWLock& rwlock) : mLock(rwlock) { mLock.readLock(); }
- inline ~AutoRLock() { mLock.unlock(); }
- private:
- RWLock& mLock;
- };
-
- class AutoWLock {
- public:
- inline AutoWLock(RWLock& rwlock) : mLock(rwlock) { mLock.writeLock(); }
- inline ~AutoWLock() { mLock.unlock(); }
- private:
- RWLock& mLock;
- };
-
-private:
- // A RWLock cannot be copied
- RWLock(const RWLock&);
- RWLock& operator = (const RWLock&);
-
- pthread_rwlock_t mRWLock;
-};
-
-inline RWLock::RWLock() {
- pthread_rwlock_init(&mRWLock, NULL);
-}
-inline RWLock::RWLock(const char* name) {
- pthread_rwlock_init(&mRWLock, NULL);
-}
-inline RWLock::RWLock(int type, const char* name) {
- if (type == SHARED) {
- pthread_rwlockattr_t attr;
- pthread_rwlockattr_init(&attr);
- pthread_rwlockattr_setpshared(&attr, PTHREAD_PROCESS_SHARED);
- pthread_rwlock_init(&mRWLock, &attr);
- pthread_rwlockattr_destroy(&attr);
- } else {
- pthread_rwlock_init(&mRWLock, NULL);
- }
-}
-inline RWLock::~RWLock() {
- pthread_rwlock_destroy(&mRWLock);
-}
-inline status_t RWLock::readLock() {
- return -pthread_rwlock_rdlock(&mRWLock);
-}
-inline status_t RWLock::tryReadLock() {
- return -pthread_rwlock_tryrdlock(&mRWLock);
-}
-inline status_t RWLock::writeLock() {
- return -pthread_rwlock_wrlock(&mRWLock);
-}
-inline status_t RWLock::tryWriteLock() {
- return -pthread_rwlock_trywrlock(&mRWLock);
-}
-inline void RWLock::unlock() {
- pthread_rwlock_unlock(&mRWLock);
-}
-
-#endif // HAVE_PTHREADS
-
-/*****************************************************************************/
-
-/*
- * Condition variable class. The implementation is system-dependent.
- *
- * Condition variables are paired up with mutexes. Lock the mutex,
- * call wait(), then either re-wait() if things aren't quite what you want,
- * or unlock the mutex and continue. All threads calling wait() must
- * use the same mutex for a given Condition.
- */
-class Condition {
-public:
- enum {
- PRIVATE = 0,
- SHARED = 1
- };
-
- Condition();
- Condition(int type);
- ~Condition();
- // Wait on the condition variable. Lock the mutex before calling.
- status_t wait(Mutex& mutex);
- // same with relative timeout
- status_t waitRelative(Mutex& mutex, nsecs_t reltime);
- // Signal the condition variable, allowing one thread to continue.
- void signal();
- // Signal the condition variable, allowing all threads to continue.
- void broadcast();
-
-private:
-#if defined(HAVE_PTHREADS)
- pthread_cond_t mCond;
-#else
- void* mState;
-#endif
-};
-
-#if defined(HAVE_PTHREADS)
-
-inline Condition::Condition() {
- pthread_cond_init(&mCond, NULL);
-}
-inline Condition::Condition(int type) {
- if (type == SHARED) {
- pthread_condattr_t attr;
- pthread_condattr_init(&attr);
- pthread_condattr_setpshared(&attr, PTHREAD_PROCESS_SHARED);
- pthread_cond_init(&mCond, &attr);
- pthread_condattr_destroy(&attr);
- } else {
- pthread_cond_init(&mCond, NULL);
- }
-}
-inline Condition::~Condition() {
- pthread_cond_destroy(&mCond);
-}
-inline status_t Condition::wait(Mutex& mutex) {
- return -pthread_cond_wait(&mCond, &mutex.mMutex);
-}
-inline status_t Condition::waitRelative(Mutex& mutex, nsecs_t reltime) {
-#if defined(HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE)
- struct timespec ts;
- ts.tv_sec = reltime/1000000000;
- ts.tv_nsec = reltime%1000000000;
- return -pthread_cond_timedwait_relative_np(&mCond, &mutex.mMutex, &ts);
-#else // HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE
- struct timespec ts;
-#if defined(HAVE_POSIX_CLOCKS)
- clock_gettime(CLOCK_REALTIME, &ts);
-#else // HAVE_POSIX_CLOCKS
- // we don't support the clocks here.
- struct timeval t;
- gettimeofday(&t, NULL);
- ts.tv_sec = t.tv_sec;
- ts.tv_nsec= t.tv_usec*1000;
-#endif // HAVE_POSIX_CLOCKS
- ts.tv_sec += reltime/1000000000;
- ts.tv_nsec+= reltime%1000000000;
- if (ts.tv_nsec >= 1000000000) {
- ts.tv_nsec -= 1000000000;
- ts.tv_sec += 1;
- }
- return -pthread_cond_timedwait(&mCond, &mutex.mMutex, &ts);
-#endif // HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE
-}
-inline void Condition::signal() {
- pthread_cond_signal(&mCond);
-}
-inline void Condition::broadcast() {
- pthread_cond_broadcast(&mCond);
-}
-
-#endif // HAVE_PTHREADS
-
-/*****************************************************************************/
-
-/*
- * This is our spiffy thread object!
- */
-
-class Thread : virtual public RefBase
-{
-public:
- // Create a Thread object, but doesn't create or start the associated
- // thread. See the run() method.
- Thread(bool canCallJava = true);
- virtual ~Thread();
-
- // Start the thread in threadLoop() which needs to be implemented.
- virtual status_t run( const char* name = 0,
- int32_t priority = PRIORITY_DEFAULT,
- size_t stack = 0);
-
- // Ask this object's thread to exit. This function is asynchronous, when the
- // function returns the thread might still be running. Of course, this
- // function can be called from a different thread.
- virtual void requestExit();
-
- // Good place to do one-time initializations
- virtual status_t readyToRun();
-
- // Call requestExit() and wait until this object's thread exits.
- // BE VERY CAREFUL of deadlocks. In particular, it would be silly to call
- // this function from this object's thread. Will return WOULD_BLOCK in
- // that case.
- status_t requestExitAndWait();
-
- // Wait until this object's thread exits. Returns immediately if not yet running.
- // Do not call from this object's thread; will return WOULD_BLOCK in that case.
- status_t join();
-
-#ifdef HAVE_ANDROID_OS
- // Return the thread's kernel ID, same as the thread itself calling gettid() or
- // androidGetTid(), or -1 if the thread is not running.
- pid_t getTid() const;
-#endif
-
-protected:
- // exitPending() returns true if requestExit() has been called.
- bool exitPending() const;
-
-private:
- // Derived class must implement threadLoop(). The thread starts its life
- // here. There are two ways of using the Thread object:
- // 1) loop: if threadLoop() returns true, it will be called again if
- // requestExit() wasn't called.
- // 2) once: if threadLoop() returns false, the thread will exit upon return.
- virtual bool threadLoop() = 0;
-
-private:
- Thread& operator=(const Thread&);
- static int _threadLoop(void* user);
- const bool mCanCallJava;
- // always hold mLock when reading or writing
- thread_id_t mThread;
- mutable Mutex mLock;
- Condition mThreadExitedCondition;
- status_t mStatus;
- // note that all accesses of mExitPending and mRunning need to hold mLock
- volatile bool mExitPending;
- volatile bool mRunning;
- sp<Thread> mHoldSelf;
-#ifdef HAVE_ANDROID_OS
- // legacy for debugging, not used by getTid() as it is set by the child thread
- // and so is not initialized until the child reaches that point
- pid_t mTid;
-#endif
-};
-
-
-}; // namespace android
-
-#endif // __cplusplus
#endif // _LIBS_UTILS_THREADS_H
diff --git a/libs/binder/Android.mk b/libs/binder/Android.mk
index 3a12e96..fd116b7 100644
--- a/libs/binder/Android.mk
+++ b/libs/binder/Android.mk
@@ -16,7 +16,6 @@
sources := \
Binder.cpp \
BpBinder.cpp \
- CursorWindow.cpp \
IInterface.cpp \
IMemory.cpp \
IPCThreadState.cpp \
diff --git a/libs/binder/CursorWindow.cpp b/libs/binder/CursorWindow.cpp
deleted file mode 100644
index a6e5f71..0000000
--- a/libs/binder/CursorWindow.cpp
+++ /dev/null
@@ -1,351 +0,0 @@
-/*
- * Copyright (C) 2006-2007 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.
- */
-
-#undef LOG_TAG
-#define LOG_TAG "CursorWindow"
-
-#include <utils/Log.h>
-#include <binder/CursorWindow.h>
-
-#include <cutils/ashmem.h>
-#include <sys/mman.h>
-
-#include <assert.h>
-#include <string.h>
-#include <stdlib.h>
-
-namespace android {
-
-CursorWindow::CursorWindow(const String8& name, int ashmemFd,
- void* data, size_t size, bool readOnly) :
- mName(name), mAshmemFd(ashmemFd), mData(data), mSize(size), mReadOnly(readOnly) {
- mHeader = static_cast<Header*>(mData);
-}
-
-CursorWindow::~CursorWindow() {
- ::munmap(mData, mSize);
- ::close(mAshmemFd);
-}
-
-status_t CursorWindow::create(const String8& name, size_t size, CursorWindow** outCursorWindow) {
- String8 ashmemName("CursorWindow: ");
- ashmemName.append(name);
-
- status_t result;
- int ashmemFd = ashmem_create_region(ashmemName.string(), size);
- if (ashmemFd < 0) {
- result = -errno;
- } else {
- result = ashmem_set_prot_region(ashmemFd, PROT_READ | PROT_WRITE);
- if (result >= 0) {
- void* data = ::mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, ashmemFd, 0);
- if (data == MAP_FAILED) {
- result = -errno;
- } else {
- result = ashmem_set_prot_region(ashmemFd, PROT_READ);
- if (result >= 0) {
- CursorWindow* window = new CursorWindow(name, ashmemFd,
- data, size, false /*readOnly*/);
- result = window->clear();
- if (!result) {
- LOG_WINDOW("Created new CursorWindow: freeOffset=%d, "
- "numRows=%d, numColumns=%d, mSize=%d, mData=%p",
- window->mHeader->freeOffset,
- window->mHeader->numRows,
- window->mHeader->numColumns,
- window->mSize, window->mData);
- *outCursorWindow = window;
- return OK;
- }
- delete window;
- }
- }
- ::munmap(data, size);
- }
- ::close(ashmemFd);
- }
- *outCursorWindow = NULL;
- return result;
-}
-
-status_t CursorWindow::createFromParcel(Parcel* parcel, CursorWindow** outCursorWindow) {
- String8 name = parcel->readString8();
-
- status_t result;
- int ashmemFd = parcel->readFileDescriptor();
- if (ashmemFd == int(BAD_TYPE)) {
- result = BAD_TYPE;
- } else {
- ssize_t size = ashmem_get_size_region(ashmemFd);
- if (size < 0) {
- result = UNKNOWN_ERROR;
- } else {
- int dupAshmemFd = ::dup(ashmemFd);
- if (dupAshmemFd < 0) {
- result = -errno;
- } else {
- void* data = ::mmap(NULL, size, PROT_READ, MAP_SHARED, dupAshmemFd, 0);
- if (data == MAP_FAILED) {
- result = -errno;
- } else {
- CursorWindow* window = new CursorWindow(name, dupAshmemFd,
- data, size, true /*readOnly*/);
- LOG_WINDOW("Created CursorWindow from parcel: freeOffset=%d, "
- "numRows=%d, numColumns=%d, mSize=%d, mData=%p",
- window->mHeader->freeOffset,
- window->mHeader->numRows,
- window->mHeader->numColumns,
- window->mSize, window->mData);
- *outCursorWindow = window;
- return OK;
- }
- ::close(dupAshmemFd);
- }
- }
- }
- *outCursorWindow = NULL;
- return result;
-}
-
-status_t CursorWindow::writeToParcel(Parcel* parcel) {
- status_t status = parcel->writeString8(mName);
- if (!status) {
- status = parcel->writeDupFileDescriptor(mAshmemFd);
- }
- return status;
-}
-
-status_t CursorWindow::clear() {
- if (mReadOnly) {
- return INVALID_OPERATION;
- }
-
- mHeader->freeOffset = sizeof(Header) + sizeof(RowSlotChunk);
- mHeader->firstChunkOffset = sizeof(Header);
- mHeader->numRows = 0;
- mHeader->numColumns = 0;
-
- RowSlotChunk* firstChunk = static_cast<RowSlotChunk*>(offsetToPtr(mHeader->firstChunkOffset));
- firstChunk->nextChunkOffset = 0;
- return OK;
-}
-
-status_t CursorWindow::setNumColumns(uint32_t numColumns) {
- if (mReadOnly) {
- return INVALID_OPERATION;
- }
-
- uint32_t cur = mHeader->numColumns;
- if ((cur > 0 || mHeader->numRows > 0) && cur != numColumns) {
- ALOGE("Trying to go from %d columns to %d", cur, numColumns);
- return INVALID_OPERATION;
- }
- mHeader->numColumns = numColumns;
- return OK;
-}
-
-status_t CursorWindow::allocRow() {
- if (mReadOnly) {
- return INVALID_OPERATION;
- }
-
- // Fill in the row slot
- RowSlot* rowSlot = allocRowSlot();
- if (rowSlot == NULL) {
- return NO_MEMORY;
- }
-
- // Allocate the slots for the field directory
- size_t fieldDirSize = mHeader->numColumns * sizeof(FieldSlot);
- uint32_t fieldDirOffset = alloc(fieldDirSize, true /*aligned*/);
- if (!fieldDirOffset) {
- mHeader->numRows--;
- LOG_WINDOW("The row failed, so back out the new row accounting "
- "from allocRowSlot %d", mHeader->numRows);
- return NO_MEMORY;
- }
- FieldSlot* fieldDir = static_cast<FieldSlot*>(offsetToPtr(fieldDirOffset));
- memset(fieldDir, 0, fieldDirSize);
-
- LOG_WINDOW("Allocated row %u, rowSlot is at offset %u, fieldDir is %d bytes at offset %u\n",
- mHeader->numRows - 1, offsetFromPtr(rowSlot), fieldDirSize, fieldDirOffset);
- rowSlot->offset = fieldDirOffset;
- return OK;
-}
-
-status_t CursorWindow::freeLastRow() {
- if (mReadOnly) {
- return INVALID_OPERATION;
- }
-
- if (mHeader->numRows > 0) {
- mHeader->numRows--;
- }
- return OK;
-}
-
-uint32_t CursorWindow::alloc(size_t size, bool aligned) {
- uint32_t padding;
- if (aligned) {
- // 4 byte alignment
- padding = (~mHeader->freeOffset + 1) & 3;
- } else {
- padding = 0;
- }
-
- uint32_t offset = mHeader->freeOffset + padding;
- uint32_t nextFreeOffset = offset + size;
- if (nextFreeOffset > mSize) {
- ALOGW("Window is full: requested allocation %d bytes, "
- "free space %d bytes, window size %d bytes",
- size, freeSpace(), mSize);
- return 0;
- }
-
- mHeader->freeOffset = nextFreeOffset;
- return offset;
-}
-
-CursorWindow::RowSlot* CursorWindow::getRowSlot(uint32_t row) {
- uint32_t chunkPos = row;
- RowSlotChunk* chunk = static_cast<RowSlotChunk*>(
- offsetToPtr(mHeader->firstChunkOffset));
- while (chunkPos >= ROW_SLOT_CHUNK_NUM_ROWS) {
- chunk = static_cast<RowSlotChunk*>(offsetToPtr(chunk->nextChunkOffset));
- chunkPos -= ROW_SLOT_CHUNK_NUM_ROWS;
- }
- return &chunk->slots[chunkPos];
-}
-
-CursorWindow::RowSlot* CursorWindow::allocRowSlot() {
- uint32_t chunkPos = mHeader->numRows;
- RowSlotChunk* chunk = static_cast<RowSlotChunk*>(
- offsetToPtr(mHeader->firstChunkOffset));
- while (chunkPos > ROW_SLOT_CHUNK_NUM_ROWS) {
- chunk = static_cast<RowSlotChunk*>(offsetToPtr(chunk->nextChunkOffset));
- chunkPos -= ROW_SLOT_CHUNK_NUM_ROWS;
- }
- if (chunkPos == ROW_SLOT_CHUNK_NUM_ROWS) {
- if (!chunk->nextChunkOffset) {
- chunk->nextChunkOffset = alloc(sizeof(RowSlotChunk), true /*aligned*/);
- if (!chunk->nextChunkOffset) {
- return NULL;
- }
- }
- chunk = static_cast<RowSlotChunk*>(offsetToPtr(chunk->nextChunkOffset));
- chunk->nextChunkOffset = 0;
- chunkPos = 0;
- }
- mHeader->numRows += 1;
- return &chunk->slots[chunkPos];
-}
-
-CursorWindow::FieldSlot* CursorWindow::getFieldSlot(uint32_t row, uint32_t column) {
- if (row >= mHeader->numRows || column >= mHeader->numColumns) {
- ALOGE("Failed to read row %d, column %d from a CursorWindow which "
- "has %d rows, %d columns.",
- row, column, mHeader->numRows, mHeader->numColumns);
- return NULL;
- }
- RowSlot* rowSlot = getRowSlot(row);
- if (!rowSlot) {
- ALOGE("Failed to find rowSlot for row %d.", row);
- return NULL;
- }
- FieldSlot* fieldDir = static_cast<FieldSlot*>(offsetToPtr(rowSlot->offset));
- return &fieldDir[column];
-}
-
-status_t CursorWindow::putBlob(uint32_t row, uint32_t column, const void* value, size_t size) {
- return putBlobOrString(row, column, value, size, FIELD_TYPE_BLOB);
-}
-
-status_t CursorWindow::putString(uint32_t row, uint32_t column, const char* value,
- size_t sizeIncludingNull) {
- return putBlobOrString(row, column, value, sizeIncludingNull, FIELD_TYPE_STRING);
-}
-
-status_t CursorWindow::putBlobOrString(uint32_t row, uint32_t column,
- const void* value, size_t size, int32_t type) {
- if (mReadOnly) {
- return INVALID_OPERATION;
- }
-
- FieldSlot* fieldSlot = getFieldSlot(row, column);
- if (!fieldSlot) {
- return BAD_VALUE;
- }
-
- uint32_t offset = alloc(size);
- if (!offset) {
- return NO_MEMORY;
- }
-
- memcpy(offsetToPtr(offset), value, size);
-
- fieldSlot->type = type;
- fieldSlot->data.buffer.offset = offset;
- fieldSlot->data.buffer.size = size;
- return OK;
-}
-
-status_t CursorWindow::putLong(uint32_t row, uint32_t column, int64_t value) {
- if (mReadOnly) {
- return INVALID_OPERATION;
- }
-
- FieldSlot* fieldSlot = getFieldSlot(row, column);
- if (!fieldSlot) {
- return BAD_VALUE;
- }
-
- fieldSlot->type = FIELD_TYPE_INTEGER;
- fieldSlot->data.l = value;
- return OK;
-}
-
-status_t CursorWindow::putDouble(uint32_t row, uint32_t column, double value) {
- if (mReadOnly) {
- return INVALID_OPERATION;
- }
-
- FieldSlot* fieldSlot = getFieldSlot(row, column);
- if (!fieldSlot) {
- return BAD_VALUE;
- }
-
- fieldSlot->type = FIELD_TYPE_FLOAT;
- fieldSlot->data.d = value;
- return OK;
-}
-
-status_t CursorWindow::putNull(uint32_t row, uint32_t column) {
- if (mReadOnly) {
- return INVALID_OPERATION;
- }
-
- FieldSlot* fieldSlot = getFieldSlot(row, column);
- if (!fieldSlot) {
- return BAD_VALUE;
- }
-
- fieldSlot->type = FIELD_TYPE_NULL;
- fieldSlot->data.buffer.offset = 0;
- fieldSlot->data.buffer.size = 0;
- return OK;
-}
-
-}; // namespace android
diff --git a/libs/gui/BufferQueue.cpp b/libs/gui/BufferQueue.cpp
index 0791de2..d761680 100644
--- a/libs/gui/BufferQueue.cpp
+++ b/libs/gui/BufferQueue.cpp
@@ -15,6 +15,8 @@
*/
#define LOG_TAG "BufferQueue"
+//#define LOG_NDEBUG 0
+#define ATRACE_TAG ATRACE_TAG_GRAPHICS
#define GL_GLEXT_PROTOTYPES
#define EGL_EGLEXT_PROTOTYPES
@@ -23,10 +25,12 @@
#include <EGL/eglext.h>
#include <gui/BufferQueue.h>
+#include <gui/ISurfaceComposer.h>
#include <private/gui/ComposerService.h>
-#include <surfaceflinger/ISurfaceComposer.h>
#include <utils/Log.h>
+#include <gui/SurfaceTexture.h>
+#include <utils/Trace.h>
// This compile option causes SurfaceTexture to return the buffer that is currently
// attached to the GL texture from dequeueBuffer when no other buffers are
@@ -34,6 +38,10 @@
// implicit cross-process synchronization to prevent the buffer from being
// written to before the buffer has (a) been detached from the GL texture and
// (b) all GL reads from the buffer have completed.
+
+// During refactoring, do not support dequeuing the current buffer
+#undef ALLOW_DEQUEUE_CURRENT_BUFFER
+
#ifdef ALLOW_DEQUEUE_CURRENT_BUFFER
#define FLAG_ALLOW_DEQUEUE_CURRENT_BUFFER true
#warning "ALLOW_DEQUEUE_CURRENT_BUFFER enabled"
@@ -42,11 +50,11 @@
#endif
// Macros for including the BufferQueue name in log messages
-#define ST_LOGV(x, ...) ALOGV("[%s] "x, mName.string(), ##__VA_ARGS__)
-#define ST_LOGD(x, ...) ALOGD("[%s] "x, mName.string(), ##__VA_ARGS__)
-#define ST_LOGI(x, ...) ALOGI("[%s] "x, mName.string(), ##__VA_ARGS__)
-#define ST_LOGW(x, ...) ALOGW("[%s] "x, mName.string(), ##__VA_ARGS__)
-#define ST_LOGE(x, ...) ALOGE("[%s] "x, mName.string(), ##__VA_ARGS__)
+#define ST_LOGV(x, ...) ALOGV("[%s] "x, mConsumerName.string(), ##__VA_ARGS__)
+#define ST_LOGD(x, ...) ALOGD("[%s] "x, mConsumerName.string(), ##__VA_ARGS__)
+#define ST_LOGI(x, ...) ALOGI("[%s] "x, mConsumerName.string(), ##__VA_ARGS__)
+#define ST_LOGW(x, ...) ALOGW("[%s] "x, mConsumerName.string(), ##__VA_ARGS__)
+#define ST_LOGE(x, ...) ALOGE("[%s] "x, mConsumerName.string(), ##__VA_ARGS__)
namespace android {
@@ -63,17 +71,17 @@
mBufferCount(MIN_ASYNC_BUFFER_SLOTS),
mClientBufferCount(0),
mServerBufferCount(MIN_ASYNC_BUFFER_SLOTS),
- mCurrentTexture(INVALID_BUFFER_SLOT),
mNextTransform(0),
mNextScalingMode(NATIVE_WINDOW_SCALING_MODE_FREEZE),
mSynchronousMode(false),
mAllowSynchronousMode(allowSynchronousMode),
mConnectedApi(NO_CONNECTED_API),
mAbandoned(false),
- mFrameCounter(0)
+ mFrameCounter(0),
+ mBufferHasBeenQueued(false)
{
// Choose a name using the PID and a process-unique ID.
- mName = String8::format("unnamed-%d-%d", getpid(), createProcessUniqueId());
+ mConsumerName = String8::format("unnamed-%d-%d", getpid(), createProcessUniqueId());
ST_LOGV("BufferQueue");
sp<ISurfaceComposer> composer(ComposerService::getComposerService());
@@ -119,6 +127,23 @@
return OK;
}
+bool BufferQueue::isSynchronousMode() const {
+ Mutex::Autolock lock(mMutex);
+ return mSynchronousMode;
+}
+
+void BufferQueue::setConsumerName(const String8& name) {
+ Mutex::Autolock lock(mMutex);
+ mConsumerName = name;
+}
+
+void BufferQueue::setFrameAvailableListener(
+ const sp<FrameAvailableListener>& listener) {
+ ST_LOGV("setFrameAvailableListener");
+ Mutex::Autolock lock(mMutex);
+ mFrameAvailableListener = listener;
+}
+
status_t BufferQueue::setBufferCount(int bufferCount) {
ST_LOGV("setBufferCount: count=%d", bufferCount);
Mutex::Autolock lock(mMutex);
@@ -160,7 +185,7 @@
freeAllBuffersLocked();
mBufferCount = bufferCount;
mClientBufferCount = bufferCount;
- mCurrentTexture = INVALID_BUFFER_SLOT;
+ mBufferHasBeenQueued = false;
mQueue.clear();
mDequeueCondition.signal();
return OK;
@@ -168,6 +193,7 @@
int BufferQueue::query(int what, int* outValue)
{
+ ATRACE_CALL();
Mutex::Autolock lock(mMutex);
if (mAbandoned) {
@@ -198,6 +224,7 @@
}
status_t BufferQueue::requestBuffer(int slot, sp<GraphicBuffer>* buf) {
+ ATRACE_CALL();
ST_LOGV("requestBuffer: slot=%d", slot);
Mutex::Autolock lock(mMutex);
if (mAbandoned) {
@@ -216,6 +243,7 @@
status_t BufferQueue::dequeueBuffer(int *outBuf, uint32_t w, uint32_t h,
uint32_t format, uint32_t usage) {
+ ATRACE_CALL();
ST_LOGV("dequeueBuffer: w=%d h=%d fmt=%#x usage=%#x", w, h, format, usage);
if ((w && !h) || (!w && h)) {
@@ -276,7 +304,7 @@
mBufferCount = mServerBufferCount;
if (mBufferCount < minBufferCountNeeded)
mBufferCount = minBufferCountNeeded;
- mCurrentTexture = INVALID_BUFFER_SLOT;
+ mBufferHasBeenQueued = false;
returnFlags |= ISurfaceTexture::RELEASE_ALL_BUFFERS;
}
@@ -290,19 +318,12 @@
dequeuedCount++;
}
- // if buffer is FREE it CANNOT be current
- ALOGW_IF((state == BufferSlot::FREE) && (mCurrentTexture==i),
- "dequeueBuffer: buffer %d is both FREE and current!",
- i);
-
- if (FLAG_ALLOW_DEQUEUE_CURRENT_BUFFER) {
- if (state == BufferSlot::FREE || i == mCurrentTexture) {
- foundSync = i;
- if (i != mCurrentTexture) {
- found = i;
- break;
- }
- }
+ // this logic used to be if (FLAG_ALLOW_DEQUEUE_CURRENT_BUFFER)
+ // but dequeuing the current buffer is disabled.
+ if (false) {
+ // This functionality has been temporarily removed so
+ // BufferQueue and SurfaceTexture can be refactored into
+ // separate objects
} else {
if (state == BufferSlot::FREE) {
/* We return the oldest of the free buffers to avoid
@@ -331,8 +352,7 @@
// See whether a buffer has been queued since the last
// setBufferCount so we know whether to perform the
// MIN_UNDEQUEUED_BUFFERS check below.
- bool bufferHasBeenQueued = mCurrentTexture != INVALID_BUFFER_SLOT;
- if (bufferHasBeenQueued) {
+ if (mBufferHasBeenQueued) {
// make sure the client is not trying to dequeue more buffers
// than allowed.
const int avail = mBufferCount - (dequeuedCount+1);
@@ -404,27 +424,23 @@
if (updateFormat) {
mPixelFormat = format;
}
+
+ mSlots[buf].mAcquireCalled = false;
mSlots[buf].mGraphicBuffer = graphicBuffer;
mSlots[buf].mRequestBufferCalled = false;
mSlots[buf].mFence = EGL_NO_SYNC_KHR;
- if (mSlots[buf].mEglImage != EGL_NO_IMAGE_KHR) {
- eglDestroyImageKHR(mSlots[buf].mEglDisplay,
- mSlots[buf].mEglImage);
- mSlots[buf].mEglImage = EGL_NO_IMAGE_KHR;
- mSlots[buf].mEglDisplay = EGL_NO_DISPLAY;
- }
- if (mCurrentTexture == buf) {
- // The current texture no longer references the buffer in this slot
- // since we just allocated a new buffer.
- mCurrentTexture = INVALID_BUFFER_SLOT;
- }
+ mSlots[buf].mEglDisplay = EGL_NO_DISPLAY;
+
+
+
+
returnFlags |= ISurfaceTexture::BUFFER_NEEDS_REALLOCATION;
}
dpy = mSlots[buf].mEglDisplay;
fence = mSlots[buf].mFence;
mSlots[buf].mFence = EGL_NO_SYNC_KHR;
- }
+ } // end lock scope
if (fence != EGL_NO_SYNC_KHR) {
EGLint result = eglClientWaitSyncKHR(dpy, fence, 0, 1000000000);
@@ -437,6 +453,7 @@
ALOGE("dequeueBuffer: timeout waiting for fence");
}
eglDestroySyncKHR(dpy, fence);
+
}
ST_LOGV("dequeueBuffer: returning slot=%d buf=%p flags=%#x", *outBuf,
@@ -446,6 +463,7 @@
}
status_t BufferQueue::setSynchronousMode(bool enabled) {
+ ATRACE_CALL();
ST_LOGV("setSynchronousMode: enabled=%d", enabled);
Mutex::Autolock lock(mMutex);
@@ -478,6 +496,7 @@
status_t BufferQueue::queueBuffer(int buf, int64_t timestamp,
uint32_t* outWidth, uint32_t* outHeight, uint32_t* outTransform) {
+ ATRACE_CALL();
ST_LOGV("queueBuffer: slot=%d time=%lld", buf, timestamp);
sp<FrameAvailableListener> listener;
@@ -496,9 +515,6 @@
ST_LOGE("queueBuffer: slot %d is not owned by the client "
"(state=%d)", buf, mSlots[buf].mBufferState);
return -EINVAL;
- } else if (buf == mCurrentTexture) {
- ST_LOGE("queueBuffer: slot %d is current!", buf);
- return -EINVAL;
} else if (!mSlots[buf].mRequestBufferCalled) {
ST_LOGE("queueBuffer: slot %d was enqueued without requesting a "
"buffer", buf);
@@ -538,11 +554,14 @@
mFrameCounter++;
mSlots[buf].mFrameNumber = mFrameCounter;
+ mBufferHasBeenQueued = true;
mDequeueCondition.signal();
*outWidth = mDefaultWidth;
*outHeight = mDefaultHeight;
*outTransform = 0;
+
+ ATRACE_INT(mConsumerName.string(), mQueue.size());
} // scope for the lock
// call back without lock held
@@ -553,6 +572,7 @@
}
void BufferQueue::cancelBuffer(int buf) {
+ ATRACE_CALL();
ST_LOGV("cancelBuffer: slot=%d", buf);
Mutex::Autolock lock(mMutex);
@@ -576,6 +596,7 @@
}
status_t BufferQueue::setCrop(const Rect& crop) {
+ ATRACE_CALL();
ST_LOGV("setCrop: crop=[%d,%d,%d,%d]", crop.left, crop.top, crop.right,
crop.bottom);
@@ -589,6 +610,7 @@
}
status_t BufferQueue::setTransform(uint32_t transform) {
+ ATRACE_CALL();
ST_LOGV("setTransform: xform=%#x", transform);
Mutex::Autolock lock(mMutex);
if (mAbandoned) {
@@ -600,6 +622,7 @@
}
status_t BufferQueue::setScalingMode(int mode) {
+ ATRACE_CALL();
ST_LOGV("setScalingMode: mode=%d", mode);
switch (mode) {
@@ -618,6 +641,7 @@
status_t BufferQueue::connect(int api,
uint32_t* outWidth, uint32_t* outHeight, uint32_t* outTransform) {
+ ATRACE_CALL();
ST_LOGV("connect: api=%d", api);
Mutex::Autolock lock(mMutex);
@@ -647,10 +671,14 @@
err = -EINVAL;
break;
}
+
+ mBufferHasBeenQueued = false;
+
return err;
}
status_t BufferQueue::disconnect(int api) {
+ ATRACE_CALL();
ST_LOGV("disconnect: api=%d", api);
Mutex::Autolock lock(mMutex);
@@ -687,26 +715,188 @@
return err;
}
+void BufferQueue::dump(String8& result) const
+{
+ char buffer[1024];
+ BufferQueue::dump(result, "", buffer, 1024);
+}
+
+void BufferQueue::dump(String8& result, const char* prefix,
+ char* buffer, size_t SIZE) const
+{
+ Mutex::Autolock _l(mMutex);
+ snprintf(buffer, SIZE,
+ "%snext : {crop=[%d,%d,%d,%d], transform=0x%02x}\n"
+ ,prefix, mNextCrop.left, mNextCrop.top, mNextCrop.right,
+ mNextCrop.bottom, mNextTransform
+ );
+ result.append(buffer);
+
+ String8 fifo;
+ int fifoSize = 0;
+ Fifo::const_iterator i(mQueue.begin());
+ while (i != mQueue.end()) {
+ snprintf(buffer, SIZE, "%02d ", *i++);
+ fifoSize++;
+ fifo.append(buffer);
+ }
+
+ snprintf(buffer, SIZE,
+ "%s-BufferQueue mBufferCount=%d, mSynchronousMode=%d, default-size=[%dx%d], "
+ "mPixelFormat=%d, FIFO(%d)={%s}\n",
+ prefix, mBufferCount, mSynchronousMode, mDefaultWidth,
+ mDefaultHeight, mPixelFormat, fifoSize, fifo.string());
+ result.append(buffer);
+
+
+ struct {
+ const char * operator()(int state) const {
+ switch (state) {
+ case BufferSlot::DEQUEUED: return "DEQUEUED";
+ case BufferSlot::QUEUED: return "QUEUED";
+ case BufferSlot::FREE: return "FREE";
+ case BufferSlot::ACQUIRED: return "ACQUIRED";
+ default: return "Unknown";
+ }
+ }
+ } stateName;
+
+ for (int i=0 ; i<mBufferCount ; i++) {
+ const BufferSlot& slot(mSlots[i]);
+ snprintf(buffer, SIZE,
+ "%s%s[%02d] "
+ "state=%-8s, crop=[%d,%d,%d,%d], "
+ "transform=0x%02x, timestamp=%lld",
+ prefix, (slot.mBufferState == BufferSlot::ACQUIRED)?">":" ", i,
+ stateName(slot.mBufferState),
+ slot.mCrop.left, slot.mCrop.top, slot.mCrop.right,
+ slot.mCrop.bottom, slot.mTransform, slot.mTimestamp
+ );
+ result.append(buffer);
+
+ const sp<GraphicBuffer>& buf(slot.mGraphicBuffer);
+ if (buf != NULL) {
+ snprintf(buffer, SIZE,
+ ", %p [%4ux%4u:%4u,%3X]",
+ buf->handle, buf->width, buf->height, buf->stride,
+ buf->format);
+ result.append(buffer);
+ }
+ result.append("\n");
+ }
+}
+
void BufferQueue::freeBufferLocked(int i) {
mSlots[i].mGraphicBuffer = 0;
mSlots[i].mBufferState = BufferSlot::FREE;
mSlots[i].mFrameNumber = 0;
- if (mSlots[i].mEglImage != EGL_NO_IMAGE_KHR) {
- eglDestroyImageKHR(mSlots[i].mEglDisplay, mSlots[i].mEglImage);
- mSlots[i].mEglImage = EGL_NO_IMAGE_KHR;
- mSlots[i].mEglDisplay = EGL_NO_DISPLAY;
+ mSlots[i].mAcquireCalled = false;
+
+ // destroy fence as BufferQueue now takes ownership
+ if (mSlots[i].mFence != EGL_NO_SYNC_KHR) {
+ eglDestroySyncKHR(mSlots[i].mEglDisplay, mSlots[i].mFence);
+ mSlots[i].mFence = EGL_NO_SYNC_KHR;
}
}
void BufferQueue::freeAllBuffersLocked() {
ALOGW_IF(!mQueue.isEmpty(),
"freeAllBuffersLocked called but mQueue is not empty");
- mCurrentTexture = INVALID_BUFFER_SLOT;
+ mQueue.clear();
+ mBufferHasBeenQueued = false;
for (int i = 0; i < NUM_BUFFER_SLOTS; i++) {
freeBufferLocked(i);
}
}
+status_t BufferQueue::acquire(BufferItem *buffer) {
+ Mutex::Autolock _l(mMutex);
+ // check if queue is empty
+ // In asynchronous mode the list is guaranteed to be one buffer
+ // deep, while in synchronous mode we use the oldest buffer.
+ if (!mQueue.empty()) {
+ Fifo::iterator front(mQueue.begin());
+ int buf = *front;
+
+ if (mSlots[buf].mAcquireCalled) {
+ buffer->mGraphicBuffer = NULL;
+ }
+ else {
+ buffer->mGraphicBuffer = mSlots[buf].mGraphicBuffer;
+ }
+ buffer->mCrop = mSlots[buf].mCrop;
+ buffer->mTransform = mSlots[buf].mTransform;
+ buffer->mScalingMode = mSlots[buf].mScalingMode;
+ buffer->mFrameNumber = mSlots[buf].mFrameNumber;
+ buffer->mBuf = buf;
+ mSlots[buf].mAcquireCalled = true;
+
+ mSlots[buf].mBufferState = BufferSlot::ACQUIRED;
+ mQueue.erase(front);
+
+ ATRACE_INT(mConsumerName.string(), mQueue.size());
+ }
+ else {
+ return -EINVAL; //should be a better return code
+ }
+
+ return OK;
+}
+
+status_t BufferQueue::releaseBuffer(int buf, EGLDisplay display,
+ EGLSyncKHR fence) {
+ Mutex::Autolock _l(mMutex);
+
+ if (buf == INVALID_BUFFER_SLOT) {
+ return -EINVAL;
+ }
+
+ mSlots[buf].mEglDisplay = display;
+ mSlots[buf].mFence = fence;
+
+ // The current buffer becomes FREE if it was still in the queued
+ // state. If it has already been given to the client
+ // (synchronous mode), then it stays in DEQUEUED state.
+ if (mSlots[buf].mBufferState == BufferSlot::QUEUED
+ || mSlots[buf].mBufferState == BufferSlot::ACQUIRED) {
+ mSlots[buf].mBufferState = BufferSlot::FREE;
+ }
+ mDequeueCondition.signal();
+
+ return OK;
+}
+
+status_t BufferQueue::consumerDisconnect() {
+ Mutex::Autolock lock(mMutex);
+ // Once the SurfaceTexture disconnects, the BufferQueue
+ // is considered abandoned
+ mAbandoned = true;
+ freeAllBuffersLocked();
+ mDequeueCondition.signal();
+ return OK;
+}
+
+status_t BufferQueue::setDefaultBufferSize(uint32_t w, uint32_t h)
+{
+ ST_LOGV("setDefaultBufferSize: w=%d, h=%d", w, h);
+ if (!w || !h) {
+ ST_LOGE("setDefaultBufferSize: dimensions cannot be 0 (w=%d, h=%d)",
+ w, h);
+ return BAD_VALUE;
+ }
+
+ Mutex::Autolock lock(mMutex);
+ mDefaultWidth = w;
+ mDefaultHeight = h;
+ return OK;
+}
+
+status_t BufferQueue::setBufferCountServer(int bufferCount) {
+ ATRACE_CALL();
+ Mutex::Autolock lock(mMutex);
+ return setBufferCountServerLocked(bufferCount);
+}
+
void BufferQueue::freeAllBuffersExceptHeadLocked() {
ALOGW_IF(!mQueue.isEmpty(),
"freeAllBuffersExceptCurrentLocked called but mQueue is not empty");
@@ -715,7 +905,7 @@
Fifo::iterator front(mQueue.begin());
head = *front;
}
- mCurrentTexture = INVALID_BUFFER_SLOT;
+ mBufferHasBeenQueued = false;
for (int i = 0; i < NUM_BUFFER_SLOTS; i++) {
if (i != head) {
freeBufferLocked(i);
diff --git a/libs/gui/DisplayEventReceiver.cpp b/libs/gui/DisplayEventReceiver.cpp
index 6a4763d..a6790ad 100644
--- a/libs/gui/DisplayEventReceiver.cpp
+++ b/libs/gui/DisplayEventReceiver.cpp
@@ -21,11 +21,10 @@
#include <gui/BitTube.h>
#include <gui/DisplayEventReceiver.h>
#include <gui/IDisplayEventConnection.h>
+#include <gui/ISurfaceComposer.h>
#include <private/gui/ComposerService.h>
-#include <surfaceflinger/ISurfaceComposer.h>
-
// ---------------------------------------------------------------------------
namespace android {
diff --git a/libs/gui/IGraphicBufferAlloc.cpp b/libs/gui/IGraphicBufferAlloc.cpp
index 30f8d00..a70a5e8 100644
--- a/libs/gui/IGraphicBufferAlloc.cpp
+++ b/libs/gui/IGraphicBufferAlloc.cpp
@@ -24,7 +24,7 @@
#include <ui/GraphicBuffer.h>
-#include <surfaceflinger/IGraphicBufferAlloc.h>
+#include <gui/IGraphicBufferAlloc.h>
// ---------------------------------------------------------------------------
diff --git a/libs/gui/ISurface.cpp b/libs/gui/ISurface.cpp
index 96155d7..c2ea183 100644
--- a/libs/gui/ISurface.cpp
+++ b/libs/gui/ISurface.cpp
@@ -22,8 +22,8 @@
#include <binder/Parcel.h>
+#include <gui/ISurface.h>
#include <gui/ISurfaceTexture.h>
-#include <surfaceflinger/ISurface.h>
namespace android {
diff --git a/libs/gui/ISurfaceComposer.cpp b/libs/gui/ISurfaceComposer.cpp
index 95b2379..1f1794c 100644
--- a/libs/gui/ISurfaceComposer.cpp
+++ b/libs/gui/ISurfaceComposer.cpp
@@ -25,17 +25,15 @@
#include <binder/IPCThreadState.h>
#include <binder/IServiceManager.h>
-#include <private/surfaceflinger/LayerState.h>
-
-#include <surfaceflinger/ISurfaceComposer.h>
-
#include <gui/BitTube.h>
#include <gui/IDisplayEventConnection.h>
+#include <gui/ISurfaceComposer.h>
+#include <gui/ISurfaceTexture.h>
+
+#include <private/gui/LayerState.h>
#include <ui/DisplayInfo.h>
-#include <gui/ISurfaceTexture.h>
-
#include <utils/Log.h>
// ---------------------------------------------------------------------------
diff --git a/libs/gui/ISurfaceComposerClient.cpp b/libs/gui/ISurfaceComposerClient.cpp
index 8fe96b1..ca9ed5b 100644
--- a/libs/gui/ISurfaceComposerClient.cpp
+++ b/libs/gui/ISurfaceComposerClient.cpp
@@ -29,9 +29,9 @@
#include <ui/Point.h>
#include <ui/Rect.h>
-#include <surfaceflinger/ISurface.h>
-#include <surfaceflinger/ISurfaceComposerClient.h>
-#include <private/surfaceflinger/LayerState.h>
+#include <gui/ISurface.h>
+#include <gui/ISurfaceComposerClient.h>
+#include <private/gui/LayerState.h>
// ---------------------------------------------------------------------------
diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp
index 87901e8..224c305 100644
--- a/libs/gui/LayerState.cpp
+++ b/libs/gui/LayerState.cpp
@@ -16,8 +16,8 @@
#include <utils/Errors.h>
#include <binder/Parcel.h>
-#include <private/surfaceflinger/LayerState.h>
-#include <surfaceflinger/ISurfaceComposerClient.h>
+#include <gui/ISurfaceComposerClient.h>
+#include <private/gui/LayerState.h>
namespace android {
diff --git a/libs/gui/Surface.cpp b/libs/gui/Surface.cpp
index 337950c..72b27ed 100644
--- a/libs/gui/Surface.cpp
+++ b/libs/gui/Surface.cpp
@@ -28,16 +28,15 @@
#include <binder/IPCThreadState.h>
-#include <gui/SurfaceTextureClient.h>
-
#include <ui/DisplayInfo.h>
#include <ui/GraphicBuffer.h>
#include <ui/Rect.h>
-#include <surfaceflinger/ISurface.h>
-#include <surfaceflinger/ISurfaceComposer.h>
-#include <surfaceflinger/Surface.h>
-#include <surfaceflinger/SurfaceComposerClient.h>
+#include <gui/ISurface.h>
+#include <gui/ISurfaceComposer.h>
+#include <gui/Surface.h>
+#include <gui/SurfaceComposerClient.h>
+#include <gui/SurfaceTextureClient.h>
namespace android {
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp
index 699438c..ceb1ba6 100644
--- a/libs/gui/SurfaceComposerClient.cpp
+++ b/libs/gui/SurfaceComposerClient.cpp
@@ -31,15 +31,14 @@
#include <ui/DisplayInfo.h>
-#include <surfaceflinger/ISurface.h>
-#include <surfaceflinger/ISurfaceComposer.h>
-#include <surfaceflinger/ISurfaceComposerClient.h>
-#include <surfaceflinger/SurfaceComposerClient.h>
-
-#include <private/surfaceflinger/LayerState.h>
-#include <private/surfaceflinger/SharedBufferStack.h>
+#include <gui/ISurface.h>
+#include <gui/ISurfaceComposer.h>
+#include <gui/ISurfaceComposerClient.h>
+#include <gui/SurfaceComposerClient.h>
#include <private/gui/ComposerService.h>
+#include <private/gui/LayerState.h>
+#include <private/gui/SharedBufferStack.h>
namespace android {
// ---------------------------------------------------------------------------
diff --git a/libs/gui/SurfaceTexture.cpp b/libs/gui/SurfaceTexture.cpp
index a7bfc61..b42aa34 100644
--- a/libs/gui/SurfaceTexture.cpp
+++ b/libs/gui/SurfaceTexture.cpp
@@ -15,6 +15,7 @@
*/
#define LOG_TAG "SurfaceTexture"
+#define ATRACE_TAG ATRACE_TAG_GRAPHICS
//#define LOG_NDEBUG 0
#define GL_GLEXT_PROTOTYPES
@@ -25,18 +26,18 @@
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
-#include <gui/SurfaceTexture.h>
-
#include <hardware/hardware.h>
+#include <gui/IGraphicBufferAlloc.h>
+#include <gui/ISurfaceComposer.h>
+#include <gui/SurfaceComposerClient.h>
+#include <gui/SurfaceTexture.h>
+
#include <private/gui/ComposerService.h>
-#include <surfaceflinger/ISurfaceComposer.h>
-#include <surfaceflinger/SurfaceComposerClient.h>
-#include <surfaceflinger/IGraphicBufferAlloc.h>
-
#include <utils/Log.h>
#include <utils/String8.h>
+#include <utils/Trace.h>
// This compile option makes SurfaceTexture use the EGL_KHR_fence_sync extension
// to synchronize access to the buffers. It will cause dequeueBuffer to stall,
@@ -97,6 +98,11 @@
static void mtxMul(float out[16], const float a[16], const float b[16]);
+// Get an ID that's unique within this process.
+static int32_t createProcessUniqueId() {
+ static volatile int32_t globalCounter = 0;
+ return android_atomic_inc(&globalCounter);
+}
SurfaceTexture::SurfaceTexture(GLuint tex, bool allowSynchronousMode,
GLenum texTarget, bool useFenceSync) :
@@ -109,8 +115,13 @@
#else
mUseFenceSync(false),
#endif
- mTexTarget(texTarget)
+ mTexTarget(texTarget),
+ mAbandoned(false),
+ mCurrentTexture(BufferQueue::INVALID_BUFFER_SLOT)
{
+ // Choose a name using the PID and a process-unique ID.
+ mName = String8::format("unnamed-%d-%d", getpid(), createProcessUniqueId());
+ BufferQueue::setConsumerName(mName);
ST_LOGV("SurfaceTexture");
memcpy(mCurrentTransformMatrix, mtxIdentity,
@@ -119,31 +130,22 @@
SurfaceTexture::~SurfaceTexture() {
ST_LOGV("~SurfaceTexture");
- freeAllBuffersLocked();
+ abandon();
}
status_t SurfaceTexture::setBufferCountServer(int bufferCount) {
Mutex::Autolock lock(mMutex);
- return setBufferCountServerLocked(bufferCount);
+ return BufferQueue::setBufferCountServer(bufferCount);
}
status_t SurfaceTexture::setDefaultBufferSize(uint32_t w, uint32_t h)
{
- ST_LOGV("setDefaultBufferSize: w=%d, h=%d", w, h);
- if (!w || !h) {
- ST_LOGE("setDefaultBufferSize: dimensions cannot be 0 (w=%d, h=%d)",
- w, h);
- return BAD_VALUE;
- }
-
- Mutex::Autolock lock(mMutex);
- mDefaultWidth = w;
- mDefaultHeight = h;
- return OK;
+ return BufferQueue::setDefaultBufferSize(w, h);
}
status_t SurfaceTexture::updateTexImage() {
+ ATRACE_CALL();
ST_LOGV("updateTexImage");
Mutex::Autolock lock(mMutex);
@@ -152,23 +154,35 @@
return NO_INIT;
}
+ BufferItem item;
+
// In asynchronous mode the list is guaranteed to be one buffer
// deep, while in synchronous mode we use the oldest buffer.
- if (!mQueue.empty()) {
- Fifo::iterator front(mQueue.begin());
- int buf = *front;
+ if (acquire(&item) == NO_ERROR) {
+ int buf = item.mBuf;
+ // This buffer was newly allocated, so we need to clean up on our side
+ if (item.mGraphicBuffer != NULL) {
+ mEGLSlots[buf].mGraphicBuffer = 0;
+ if (mEGLSlots[buf].mEglImage != EGL_NO_IMAGE_KHR) {
+ eglDestroyImageKHR(mEGLSlots[buf].mEglDisplay,
+ mEGLSlots[buf].mEglImage);
+ mEGLSlots[buf].mEglImage = EGL_NO_IMAGE_KHR;
+ mEGLSlots[buf].mEglDisplay = EGL_NO_DISPLAY;
+ }
+ mEGLSlots[buf].mGraphicBuffer = item.mGraphicBuffer;
+ }
// Update the GL texture object.
- EGLImageKHR image = mSlots[buf].mEglImage;
+ EGLImageKHR image = mEGLSlots[buf].mEglImage;
EGLDisplay dpy = eglGetCurrentDisplay();
if (image == EGL_NO_IMAGE_KHR) {
- if (mSlots[buf].mGraphicBuffer == 0) {
+ if (item.mGraphicBuffer == 0) {
ST_LOGE("buffer at slot %d is null", buf);
return BAD_VALUE;
}
- image = createImage(dpy, mSlots[buf].mGraphicBuffer);
- mSlots[buf].mEglImage = image;
- mSlots[buf].mEglDisplay = dpy;
+ image = createImage(dpy, item.mGraphicBuffer);
+ mEGLSlots[buf].mEglImage = image;
+ mEGLSlots[buf].mEglDisplay = dpy;
if (image == EGL_NO_IMAGE_KHR) {
// NOTE: if dpy was invalid, createImage() is guaranteed to
// fail. so we'd end up here.
@@ -191,6 +205,8 @@
failed = true;
}
if (failed) {
+ releaseBuffer(buf, mEGLSlots[buf].mEglDisplay,
+ mEGLSlots[buf].mFence);
return -EINVAL;
}
@@ -201,40 +217,37 @@
if (fence == EGL_NO_SYNC_KHR) {
ALOGE("updateTexImage: error creating fence: %#x",
eglGetError());
+ releaseBuffer(buf, mEGLSlots[buf].mEglDisplay,
+ mEGLSlots[buf].mFence);
return -EINVAL;
}
glFlush();
- mSlots[mCurrentTexture].mFence = fence;
+ mEGLSlots[mCurrentTexture].mFence = fence;
}
}
ST_LOGV("updateTexImage: (slot=%d buf=%p) -> (slot=%d buf=%p)",
mCurrentTexture,
mCurrentTextureBuf != NULL ? mCurrentTextureBuf->handle : 0,
- buf, mSlots[buf].mGraphicBuffer->handle);
+ buf, item.mGraphicBuffer != NULL ? item.mGraphicBuffer->handle : 0);
- if (mCurrentTexture != INVALID_BUFFER_SLOT) {
- // The current buffer becomes FREE if it was still in the queued
- // state. If it has already been given to the client
- // (synchronous mode), then it stays in DEQUEUED state.
- if (mSlots[mCurrentTexture].mBufferState == BufferSlot::QUEUED) {
- mSlots[mCurrentTexture].mBufferState = BufferSlot::FREE;
- }
- }
+ // release old buffer
+ releaseBuffer(mCurrentTexture,
+ mEGLSlots[mCurrentTexture].mEglDisplay,
+ mEGLSlots[mCurrentTexture].mFence);
// Update the SurfaceTexture state.
mCurrentTexture = buf;
- mCurrentTextureBuf = mSlots[buf].mGraphicBuffer;
- mCurrentCrop = mSlots[buf].mCrop;
- mCurrentTransform = mSlots[buf].mTransform;
- mCurrentScalingMode = mSlots[buf].mScalingMode;
- mCurrentTimestamp = mSlots[buf].mTimestamp;
+ mCurrentTextureBuf = mEGLSlots[buf].mGraphicBuffer;
+ mCurrentCrop = item.mCrop;
+ mCurrentTransform = item.mTransform;
+ mCurrentScalingMode = item.mScalingMode;
+ mCurrentTimestamp = item.mTimestamp;
computeCurrentTransformMatrix();
// Now that we've passed the point at which failures can happen,
// it's safe to remove the buffer from the front of the queue.
- mQueue.erase(front);
- mDequeueCondition.signal();
+
} else {
// We always bind the texture even if we don't update its contents.
glBindTexture(mTexTarget, mTexName);
@@ -300,7 +313,7 @@
}
}
- sp<GraphicBuffer>& buf(mSlots[mCurrentTexture].mGraphicBuffer);
+ sp<GraphicBuffer>& buf(mCurrentTextureBuf);
float tx, ty, sx, sy;
if (!mCurrentCrop.isEmpty()) {
// In order to prevent bilinear sampling at the of the crop rectangle we
@@ -372,7 +385,7 @@
const sp<FrameAvailableListener>& listener) {
ST_LOGV("setFrameAvailableListener");
Mutex::Autolock lock(mMutex);
- mFrameAvailableListener = listener;
+ BufferQueue::setFrameAvailableListener(listener);
}
EGLImageKHR SurfaceTexture::createImage(EGLDisplay dpy,
@@ -413,22 +426,33 @@
bool SurfaceTexture::isSynchronousMode() const {
Mutex::Autolock lock(mMutex);
- return mSynchronousMode;
+ return BufferQueue::isSynchronousMode();
}
-
-
void SurfaceTexture::abandon() {
Mutex::Autolock lock(mMutex);
- mQueue.clear();
mAbandoned = true;
mCurrentTextureBuf.clear();
- freeAllBuffersLocked();
- mDequeueCondition.signal();
+
+ // destroy all egl buffers
+ for (int i =0; i < NUM_BUFFER_SLOTS; i++) {
+ mEGLSlots[i].mGraphicBuffer = 0;
+ if (mEGLSlots[i].mEglImage != EGL_NO_IMAGE_KHR) {
+ eglDestroyImageKHR(mEGLSlots[i].mEglDisplay,
+ mEGLSlots[i].mEglImage);
+ mEGLSlots[i].mEglImage = EGL_NO_IMAGE_KHR;
+ mEGLSlots[i].mEglDisplay = EGL_NO_DISPLAY;
+ }
+ }
+
+ // disconnect from the BufferQueue
+ BufferQueue::consumerDisconnect();
}
void SurfaceTexture::setName(const String8& name) {
+ Mutex::Autolock _l(mMutex);
mName = name;
+ BufferQueue::setConsumerName(name);
}
void SurfaceTexture::dump(String8& result) const
@@ -441,68 +465,19 @@
char* buffer, size_t SIZE) const
{
Mutex::Autolock _l(mMutex);
- snprintf(buffer, SIZE,
- "%smBufferCount=%d, mSynchronousMode=%d, default-size=[%dx%d], "
- "mPixelFormat=%d, mTexName=%d\n",
- prefix, mBufferCount, mSynchronousMode, mDefaultWidth,
- mDefaultHeight, mPixelFormat, mTexName);
+ snprintf(buffer, SIZE, "%smTexName=%d\n", prefix, mTexName);
result.append(buffer);
- String8 fifo;
- int fifoSize = 0;
- Fifo::const_iterator i(mQueue.begin());
- while (i != mQueue.end()) {
- snprintf(buffer, SIZE, "%02d ", *i++);
- fifoSize++;
- fifo.append(buffer);
- }
-
snprintf(buffer, SIZE,
- "%scurrent: {crop=[%d,%d,%d,%d], transform=0x%02x, current=%d}\n"
- "%snext : {crop=[%d,%d,%d,%d], transform=0x%02x, FIFO(%d)={%s}}\n"
- ,
- prefix, mCurrentCrop.left,
+ "%snext : {crop=[%d,%d,%d,%d], transform=0x%02x, current=%d}\n"
+ ,prefix, mCurrentCrop.left,
mCurrentCrop.top, mCurrentCrop.right, mCurrentCrop.bottom,
- mCurrentTransform, mCurrentTexture,
- prefix, mNextCrop.left, mNextCrop.top, mNextCrop.right,
- mNextCrop.bottom, mNextTransform, fifoSize, fifo.string()
+ mCurrentTransform, mCurrentTexture
);
result.append(buffer);
- struct {
- const char * operator()(int state) const {
- switch (state) {
- case BufferSlot::DEQUEUED: return "DEQUEUED";
- case BufferSlot::QUEUED: return "QUEUED";
- case BufferSlot::FREE: return "FREE";
- default: return "Unknown";
- }
- }
- } stateName;
- for (int i=0 ; i<mBufferCount ; i++) {
- const BufferSlot& slot(mSlots[i]);
- snprintf(buffer, SIZE,
- "%s%s[%02d] "
- "state=%-8s, crop=[%d,%d,%d,%d], "
- "transform=0x%02x, timestamp=%lld",
- prefix, (i==mCurrentTexture)?">":" ", i,
- stateName(slot.mBufferState),
- slot.mCrop.left, slot.mCrop.top, slot.mCrop.right,
- slot.mCrop.bottom, slot.mTransform, slot.mTimestamp
- );
- result.append(buffer);
-
- const sp<GraphicBuffer>& buf(slot.mGraphicBuffer);
- if (buf != NULL) {
- snprintf(buffer, SIZE,
- ", %p [%4ux%4u:%4u,%3X]",
- buf->handle, buf->width, buf->height, buf->stride,
- buf->format);
- result.append(buffer);
- }
- result.append("\n");
- }
+ BufferQueue::dump(result, prefix, buffer, SIZE);
}
static void mtxMul(float out[16], const float a[16], const float b[16]) {
diff --git a/libs/gui/SurfaceTextureClient.cpp b/libs/gui/SurfaceTextureClient.cpp
index d0934ba..f88dcaf 100644
--- a/libs/gui/SurfaceTextureClient.cpp
+++ b/libs/gui/SurfaceTextureClient.cpp
@@ -15,13 +15,15 @@
*/
#define LOG_TAG "SurfaceTextureClient"
+#define ATRACE_TAG ATRACE_TAG_GRAPHICS
//#define LOG_NDEBUG 0
-#include <gui/SurfaceTextureClient.h>
-#include <surfaceflinger/ISurfaceComposer.h>
-#include <surfaceflinger/SurfaceComposerClient.h>
-
#include <utils/Log.h>
+#include <utils/Trace.h>
+
+#include <gui/ISurfaceComposer.h>
+#include <gui/SurfaceComposerClient.h>
+#include <gui/SurfaceTextureClient.h>
#include <private/gui/ComposerService.h>
@@ -121,6 +123,7 @@
}
int SurfaceTextureClient::setSwapInterval(int interval) {
+ ATRACE_CALL();
// EGL specification states:
// interval is silently clamped to minimum and maximum implementation
// dependent values before being stored.
@@ -138,6 +141,7 @@
}
int SurfaceTextureClient::dequeueBuffer(android_native_buffer_t** buffer) {
+ ATRACE_CALL();
ALOGV("SurfaceTextureClient::dequeueBuffer");
Mutex::Autolock lock(mMutex);
int buf = -1;
@@ -167,6 +171,7 @@
}
int SurfaceTextureClient::cancelBuffer(android_native_buffer_t* buffer) {
+ ATRACE_CALL();
ALOGV("SurfaceTextureClient::cancelBuffer");
Mutex::Autolock lock(mMutex);
int i = getSlotFromBufferLocked(buffer);
@@ -213,6 +218,7 @@
}
int SurfaceTextureClient::queueBuffer(android_native_buffer_t* buffer) {
+ ATRACE_CALL();
ALOGV("SurfaceTextureClient::queueBuffer");
Mutex::Autolock lock(mMutex);
int64_t timestamp;
@@ -236,6 +242,7 @@
}
int SurfaceTextureClient::query(int what, int* value) const {
+ ATRACE_CALL();
ALOGV("SurfaceTextureClient::query");
{ // scope for the lock
Mutex::Autolock lock(mMutex);
@@ -404,6 +411,7 @@
int SurfaceTextureClient::connect(int api) {
+ ATRACE_CALL();
ALOGV("SurfaceTextureClient::connect");
Mutex::Autolock lock(mMutex);
int err = mSurfaceTexture->connect(api,
@@ -415,6 +423,7 @@
}
int SurfaceTextureClient::disconnect(int api) {
+ ATRACE_CALL();
ALOGV("SurfaceTextureClient::disconnect");
Mutex::Autolock lock(mMutex);
freeAllBuffers();
@@ -441,6 +450,7 @@
int SurfaceTextureClient::setCrop(Rect const* rect)
{
+ ATRACE_CALL();
ALOGV("SurfaceTextureClient::setCrop");
Mutex::Autolock lock(mMutex);
@@ -459,6 +469,7 @@
int SurfaceTextureClient::setBufferCount(int bufferCount)
{
+ ATRACE_CALL();
ALOGV("SurfaceTextureClient::setBufferCount");
Mutex::Autolock lock(mMutex);
@@ -475,6 +486,7 @@
int SurfaceTextureClient::setBuffersDimensions(int w, int h)
{
+ ATRACE_CALL();
ALOGV("SurfaceTextureClient::setBuffersDimensions");
Mutex::Autolock lock(mMutex);
@@ -508,6 +520,7 @@
int SurfaceTextureClient::setScalingMode(int mode)
{
+ ATRACE_CALL();
ALOGV("SurfaceTextureClient::setScalingMode(%d)", mode);
Mutex::Autolock lock(mMutex);
// mode is validated on the server
@@ -520,6 +533,7 @@
int SurfaceTextureClient::setBuffersTransform(int transform)
{
+ ATRACE_CALL();
ALOGV("SurfaceTextureClient::setBuffersTransform");
Mutex::Autolock lock(mMutex);
status_t err = mSurfaceTexture->setTransform(transform);
diff --git a/libs/gui/tests/SurfaceTexture_test.cpp b/libs/gui/tests/SurfaceTexture_test.cpp
index b18e7b0..8c6defe 100644
--- a/libs/gui/tests/SurfaceTexture_test.cpp
+++ b/libs/gui/tests/SurfaceTexture_test.cpp
@@ -24,9 +24,9 @@
#include <utils/String8.h>
#include <utils/threads.h>
-#include <surfaceflinger/ISurfaceComposer.h>
-#include <surfaceflinger/Surface.h>
-#include <surfaceflinger/SurfaceComposerClient.h>
+#include <gui/ISurfaceComposer.h>
+#include <gui/Surface.h>
+#include <gui/SurfaceComposerClient.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
diff --git a/libs/gui/tests/Surface_test.cpp b/libs/gui/tests/Surface_test.cpp
index ea52750..b585d68 100644
--- a/libs/gui/tests/Surface_test.cpp
+++ b/libs/gui/tests/Surface_test.cpp
@@ -17,9 +17,9 @@
#include <gtest/gtest.h>
#include <binder/IMemory.h>
-#include <surfaceflinger/ISurfaceComposer.h>
-#include <surfaceflinger/Surface.h>
-#include <surfaceflinger/SurfaceComposerClient.h>
+#include <gui/ISurfaceComposer.h>
+#include <gui/Surface.h>
+#include <gui/SurfaceComposerClient.h>
#include <utils/String8.h>
#include <private/gui/ComposerService.h>
diff --git a/libs/surfaceflinger_client/Android.mk b/libs/surfaceflinger_client/Android.mk
deleted file mode 100644
index 5fca1ce..0000000
--- a/libs/surfaceflinger_client/Android.mk
+++ /dev/null
@@ -1,10 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:=
-
-LOCAL_SHARED_LIBRARIES :=
-
-LOCAL_MODULE:= libsurfaceflinger_client
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/libs/ui/Android.mk b/libs/ui/Android.mk
index f0d7b02..5aff7a4 100644
--- a/libs/ui/Android.mk
+++ b/libs/ui/Android.mk
@@ -16,7 +16,6 @@
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= \
- EGLUtils.cpp \
FramebufferNativeWindow.cpp \
GraphicBuffer.cpp \
GraphicBufferAllocator.cpp \
@@ -28,9 +27,12 @@
LOCAL_SHARED_LIBRARIES := \
libcutils \
libutils \
- libEGL \
libhardware
+ifneq ($(BOARD_FRAMEBUFFER_FORCE_FORMAT),)
+LOCAL_CFLAGS += -DFRAMEBUFFER_FORCE_FORMAT=$(BOARD_FRAMEBUFFER_FORCE_FORMAT)
+endif
+
LOCAL_MODULE:= libui
include $(BUILD_SHARED_LIBRARY)
diff --git a/libs/ui/FramebufferNativeWindow.cpp b/libs/ui/FramebufferNativeWindow.cpp
index d1dca0c..dec99b6 100644
--- a/libs/ui/FramebufferNativeWindow.cpp
+++ b/libs/ui/FramebufferNativeWindow.cpp
@@ -27,25 +27,21 @@
#include <utils/threads.h>
#include <utils/RefBase.h>
-#include <ui/Rect.h>
+#include <ui/ANativeObjectBase.h>
#include <ui/FramebufferNativeWindow.h>
+#include <ui/Rect.h>
#include <EGL/egl.h>
-#include <pixelflinger/format.h>
-#include <pixelflinger/pixelflinger.h>
-
#include <hardware/hardware.h>
#include <hardware/gralloc.h>
-#include <private/ui/android_natives_priv.h>
-
// ----------------------------------------------------------------------------
namespace android {
// ----------------------------------------------------------------------------
class NativeBuffer
- : public EGLNativeBase<
+ : public ANativeObjectBase<
ANativeWindowBuffer,
NativeBuffer,
LightRefBase<NativeBuffer> >
@@ -100,6 +96,18 @@
mNumFreeBuffers = NUM_FRAME_BUFFERS;
mBufferHead = mNumBuffers-1;
+ /*
+ * This does not actually change the framebuffer format. It merely
+ * fakes this format to surfaceflinger so that when it creates
+ * framebuffer surfaces it will use this format. It's really a giant
+ * HACK to allow interworking with buggy gralloc+GPU driver
+ * implementations. You should *NEVER* need to set this for shipping
+ * devices.
+ */
+#ifdef FRAMEBUFFER_FORCE_FORMAT
+ *((uint32_t *)&fbDev->format) = FRAMEBUFFER_FORCE_FORMAT;
+#endif
+
for (i = 0; i < mNumBuffers; i++)
{
buffers[i] = new NativeBuffer(
diff --git a/libs/ui/GraphicBuffer.cpp b/libs/ui/GraphicBuffer.cpp
index f549a37..57063e5 100644
--- a/libs/ui/GraphicBuffer.cpp
+++ b/libs/ui/GraphicBuffer.cpp
@@ -28,8 +28,6 @@
#include <ui/GraphicBufferMapper.h>
#include <ui/PixelFormat.h>
-#include <pixelflinger/pixelflinger.h>
-
namespace android {
// ===========================================================================
@@ -182,21 +180,6 @@
return res;
}
-status_t GraphicBuffer::lock(GGLSurface* sur, uint32_t usage)
-{
- void* vaddr;
- status_t res = GraphicBuffer::lock(usage, &vaddr);
- if (res == NO_ERROR && sur) {
- sur->version = sizeof(GGLSurface);
- sur->width = width;
- sur->height = height;
- sur->stride = stride;
- sur->format = format;
- sur->data = static_cast<GGLubyte*>(vaddr);
- }
- return res;
-}
-
size_t GraphicBuffer::getFlattenedSize() const {
return (8 + (handle ? handle->numInts : 0))*sizeof(int);
}
diff --git a/libs/ui/PixelFormat.cpp b/libs/ui/PixelFormat.cpp
index 6993dac..fc1d3c2 100644
--- a/libs/ui/PixelFormat.cpp
+++ b/libs/ui/PixelFormat.cpp
@@ -48,7 +48,10 @@
{ 4, 32, {32,24, 24,16, 16, 8, 8, 0 }, PixelFormatInfo::RGBA },
{ 2, 16, { 1, 0, 16,11, 11, 6, 6, 1 }, PixelFormatInfo::RGBA },
{ 2, 16, { 4, 0, 16,12, 12, 8, 8, 4 }, PixelFormatInfo::RGBA },
- { 1, 8, { 8, 0, 0, 0, 0, 0, 0, 0 }, PixelFormatInfo::ALPHA}
+ { 1, 8, { 8, 0, 0, 0, 0, 0, 0, 0 }, PixelFormatInfo::ALPHA},
+ { 1, 8, { 0, 0, 8, 0, 8, 0, 8, 0 }, PixelFormatInfo::L },
+ { 2, 16, {16, 8, 8, 0, 8, 0, 8, 0 }, PixelFormatInfo::LA },
+ { 1, 8, { 0, 0, 8, 5, 5, 2, 2, 0 }, PixelFormatInfo::RGB },
};
static const Info* gGetPixelFormatTable(size_t* numEntries) {
diff --git a/libs/utils/Android.mk b/libs/utils/Android.mk
index a96c8e6..57c048a 100644
--- a/libs/utils/Android.mk
+++ b/libs/utils/Android.mk
@@ -77,7 +77,8 @@
# we have the common sources, plus some device-specific stuff
LOCAL_SRC_FILES:= \
$(commonSources) \
- Looper.cpp
+ Looper.cpp \
+ Trace.cpp
ifeq ($(TARGET_OS),linux)
LOCAL_LDLIBS += -lrt -ldl
diff --git a/libs/utils/Trace.cpp b/libs/utils/Trace.cpp
new file mode 100644
index 0000000..c49278a
--- /dev/null
+++ b/libs/utils/Trace.cpp
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2012 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/properties.h>
+#include <utils/Log.h>
+#include <utils/Trace.h>
+
+namespace android {
+
+volatile int32_t Tracer::sIsReady = 0;
+int Tracer::sTraceFD = -1;
+uint64_t Tracer::sEnabledTags = 0;
+Mutex Tracer::sMutex;
+
+void Tracer::init() {
+ Mutex::Autolock lock(sMutex);
+
+ if (!sIsReady) {
+ const char* const traceFileName =
+ "/sys/kernel/debug/tracing/trace_marker";
+ sTraceFD = open(traceFileName, O_WRONLY);
+ if (sTraceFD == -1) {
+ ALOGE("error opening trace file: %s (%d)", strerror(errno), errno);
+ } else {
+ char value[PROPERTY_VALUE_MAX];
+ property_get("atrace.tags.enableflags", value, "0");
+ sEnabledTags = strtoll(value, NULL, 0) | ATRACE_TAG_ALWAYS;
+ }
+
+ android_atomic_release_store(1, &sIsReady);
+ }
+}
+
+} // namespace andoid
diff --git a/opengl/libagl/TextureObjectManager.cpp b/opengl/libagl/TextureObjectManager.cpp
index 6a006aa..06d45cc 100644
--- a/opengl/libagl/TextureObjectManager.cpp
+++ b/opengl/libagl/TextureObjectManager.cpp
@@ -19,8 +19,6 @@
#include "context.h"
#include "TextureObjectManager.h"
-#include <private/ui/android_natives_priv.h>
-
namespace android {
// ----------------------------------------------------------------------------
diff --git a/opengl/libagl/context.h b/opengl/libagl/context.h
index ef36b56..7065a30 100644
--- a/opengl/libagl/context.h
+++ b/opengl/libagl/context.h
@@ -1,20 +1,642 @@
-/* libs/opengles/context.h
-**
-** Copyright 2006, 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.
-*/
+/*
+ * Copyright (C) 2006 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 <private/opengles/gl_context.h>
+#ifndef ANDROID_OPENGLES_CONTEXT_H
+#define ANDROID_OPENGLES_CONTEXT_H
+
+#include <stdint.h>
+#include <stddef.h>
+#include <sys/types.h>
+#include <pthread.h>
+#ifdef HAVE_ANDROID_OS
+#include <bionic_tls.h>
+#endif
+
+#include <private/pixelflinger/ggl_context.h>
+#include <hardware/gralloc.h>
+
+#include <GLES/gl.h>
+#include <GLES/glext.h>
+
+namespace android {
+
+
+const unsigned int OGLES_NUM_COMPRESSED_TEXTURE_FORMATS = 10
+#ifdef GL_OES_compressed_ETC1_RGB8_texture
+ + 1
+#endif
+ ;
+
+class EGLTextureObject;
+class EGLSurfaceManager;
+class EGLBufferObjectManager;
+
+namespace gl {
+
+struct ogles_context_t;
+struct matrixx_t;
+struct transform_t;
+struct buffer_t;
+
+ogles_context_t* getGlContext();
+
+template<typename T>
+static inline void swap(T& a, T& b) {
+ T t(a); a = b; b = t;
+}
+template<typename T>
+inline T max(T a, T b) {
+ return a<b ? b : a;
+}
+template<typename T>
+inline T max(T a, T b, T c) {
+ return max(a, max(b, c));
+}
+template<typename T>
+inline T min(T a, T b) {
+ return a<b ? a : b;
+}
+template<typename T>
+inline T min(T a, T b, T c) {
+ return min(a, min(b, c));
+}
+template<typename T>
+inline T min(T a, T b, T c, T d) {
+ return min(min(a,b), min(c,d));
+}
+
+// ----------------------------------------------------------------------------
+// vertices
+// ----------------------------------------------------------------------------
+
+struct vec3_t {
+ union {
+ struct { GLfixed x, y, z; };
+ struct { GLfixed r, g, b; };
+ struct { GLfixed S, T, R; };
+ GLfixed v[3];
+ };
+};
+
+struct vec4_t {
+ union {
+ struct { GLfixed x, y, z, w; };
+ struct { GLfixed r, g, b, a; };
+ struct { GLfixed S, T, R, Q; };
+ GLfixed v[4];
+ };
+};
+
+struct vertex_t {
+ enum {
+ // these constant matter for our clipping
+ CLIP_L = 0x0001, // clipping flags
+ CLIP_R = 0x0002,
+ CLIP_B = 0x0004,
+ CLIP_T = 0x0008,
+ CLIP_N = 0x0010,
+ CLIP_F = 0x0020,
+
+ EYE = 0x0040,
+ RESERVED = 0x0080,
+
+ USER_CLIP_0 = 0x0100, // user clipping flags
+ USER_CLIP_1 = 0x0200,
+ USER_CLIP_2 = 0x0400,
+ USER_CLIP_3 = 0x0800,
+ USER_CLIP_4 = 0x1000,
+ USER_CLIP_5 = 0x2000,
+
+ LIT = 0x4000, // lighting has been applied
+ TT = 0x8000, // texture coords transformed
+
+ FRUSTUM_CLIP_ALL= 0x003F,
+ USER_CLIP_ALL = 0x3F00,
+ CLIP_ALL = 0x3F3F,
+ };
+
+ // the fields below are arranged to minimize d-cache usage
+ // we group together, by cache-line, the fields most likely to be used
+
+ union {
+ vec4_t obj;
+ vec4_t eye;
+ };
+ vec4_t clip;
+
+ uint32_t flags;
+ size_t index; // cache tag, and vertex index
+ GLfixed fog;
+ uint8_t locked;
+ uint8_t mru;
+ uint8_t reserved[2];
+ vec4_t window;
+
+ vec4_t color;
+ vec4_t texture[GGL_TEXTURE_UNIT_COUNT];
+ uint32_t reserved1[4];
+
+ inline void clear() {
+ flags = index = locked = mru = 0;
+ }
+};
+
+struct point_size_t {
+ GGLcoord size;
+ GLboolean smooth;
+};
+
+struct line_width_t {
+ GGLcoord width;
+ GLboolean smooth;
+};
+
+struct polygon_offset_t {
+ GLfixed factor;
+ GLfixed units;
+ GLboolean enable;
+};
+
+// ----------------------------------------------------------------------------
+// arrays
+// ----------------------------------------------------------------------------
+
+struct array_t {
+ typedef void (*fetcher_t)(ogles_context_t*, GLfixed*, const GLvoid*);
+ fetcher_t fetch;
+ GLvoid const* physical_pointer;
+ GLint size;
+ GLsizei stride;
+ GLvoid const* pointer;
+ buffer_t const* bo;
+ uint16_t type;
+ GLboolean enable;
+ GLboolean pad;
+ GLsizei bounds;
+ void init(GLint, GLenum, GLsizei, const GLvoid *, const buffer_t*, GLsizei);
+ inline void resolve();
+ inline const GLubyte* element(GLint i) const {
+ return (const GLubyte*)physical_pointer + i * stride;
+ }
+};
+
+struct array_machine_t {
+ array_t vertex;
+ array_t normal;
+ array_t color;
+ array_t texture[GGL_TEXTURE_UNIT_COUNT];
+ uint8_t activeTexture;
+ uint8_t tmu;
+ uint16_t cull;
+ uint32_t flags;
+ GLenum indicesType;
+ buffer_t const* array_buffer;
+ buffer_t const* element_array_buffer;
+
+ void (*compileElements)(ogles_context_t*, vertex_t*, GLint, GLsizei);
+ void (*compileElement)(ogles_context_t*, vertex_t*, GLint);
+
+ void (*mvp_transform)(transform_t const*, vec4_t*, vec4_t const*);
+ void (*mv_transform)(transform_t const*, vec4_t*, vec4_t const*);
+ void (*tex_transform[2])(transform_t const*, vec4_t*, vec4_t const*);
+ void (*perspective)(ogles_context_t*c, vertex_t* v);
+ void (*clipVertex)(ogles_context_t* c, vertex_t* nv,
+ GGLfixed t, const vertex_t* s, const vertex_t* p);
+ void (*clipEye)(ogles_context_t* c, vertex_t* nv,
+ GGLfixed t, const vertex_t* s, const vertex_t* p);
+};
+
+struct vertex_cache_t {
+ enum {
+ // must be at least 4
+ // 3 vertice for triangles
+ // or 2 + 2 for indexed triangles w/ cache contention
+ VERTEX_BUFFER_SIZE = 8,
+ // must be a power of two and at least 3
+ VERTEX_CACHE_SIZE = 64, // 8 KB
+
+ INDEX_BITS = 16,
+ INDEX_MASK = ((1LU<<INDEX_BITS)-1),
+ INDEX_SEQ = 1LU<<INDEX_BITS,
+ };
+ vertex_t* vBuffer;
+ vertex_t* vCache;
+ uint32_t sequence;
+ void* base;
+ uint32_t total;
+ uint32_t misses;
+ int64_t startTime;
+ void init();
+ void uninit();
+ void clear();
+ void dump_stats(GLenum mode);
+};
+
+// ----------------------------------------------------------------------------
+// fog
+// ----------------------------------------------------------------------------
+
+struct fog_t {
+ GLfixed density;
+ GLfixed start;
+ GLfixed end;
+ GLfixed invEndMinusStart;
+ GLenum mode;
+ GLfixed (*fog)(ogles_context_t* c, GLfixed z);
+};
+
+// ----------------------------------------------------------------------------
+// user clip planes
+// ----------------------------------------------------------------------------
+
+const unsigned int OGLES_MAX_CLIP_PLANES = 6;
+
+struct clip_plane_t {
+ vec4_t equation;
+};
+
+struct user_clip_planes_t {
+ clip_plane_t plane[OGLES_MAX_CLIP_PLANES];
+ uint32_t enable;
+};
+
+// ----------------------------------------------------------------------------
+// lighting
+// ----------------------------------------------------------------------------
+
+const unsigned int OGLES_MAX_LIGHTS = 8;
+
+struct light_t {
+ vec4_t ambient;
+ vec4_t diffuse;
+ vec4_t specular;
+ vec4_t implicitAmbient;
+ vec4_t implicitDiffuse;
+ vec4_t implicitSpecular;
+ vec4_t position; // position in eye space
+ vec4_t objPosition;
+ vec4_t normalizedObjPosition;
+ vec4_t spotDir;
+ vec4_t normalizedSpotDir;
+ GLfixed spotExp;
+ GLfixed spotCutoff;
+ GLfixed spotCutoffCosine;
+ GLfixed attenuation[3];
+ GLfixed rConstAttenuation;
+ GLboolean enable;
+};
+
+struct material_t {
+ vec4_t ambient;
+ vec4_t diffuse;
+ vec4_t specular;
+ vec4_t emission;
+ GLfixed shininess;
+};
+
+struct light_model_t {
+ vec4_t ambient;
+ GLboolean twoSide;
+};
+
+struct color_material_t {
+ GLenum face;
+ GLenum mode;
+ GLboolean enable;
+};
+
+struct lighting_t {
+ light_t lights[OGLES_MAX_LIGHTS];
+ material_t front;
+ light_model_t lightModel;
+ color_material_t colorMaterial;
+ vec4_t implicitSceneEmissionAndAmbient;
+ vec4_t objViewer;
+ uint32_t enabledLights;
+ GLboolean enable;
+ GLenum shadeModel;
+ typedef void (*light_fct_t)(ogles_context_t*, vertex_t*);
+ void (*lightVertex)(ogles_context_t* c, vertex_t* v);
+ void (*lightTriangle)(ogles_context_t* c,
+ vertex_t* v0, vertex_t* v1, vertex_t* v2);
+};
+
+struct culling_t {
+ GLenum cullFace;
+ GLenum frontFace;
+ GLboolean enable;
+};
+
+// ----------------------------------------------------------------------------
+// textures
+// ----------------------------------------------------------------------------
+
+struct texture_unit_t {
+ GLuint name;
+ EGLTextureObject* texture;
+ uint8_t dirty;
+};
+
+struct texture_state_t
+{
+ texture_unit_t tmu[GGL_TEXTURE_UNIT_COUNT];
+ int active; // active tmu
+ EGLTextureObject* defaultTexture;
+ GGLContext* ggl;
+ uint8_t packAlignment;
+ uint8_t unpackAlignment;
+};
+
+// ----------------------------------------------------------------------------
+// transformation and matrices
+// ----------------------------------------------------------------------------
+
+struct matrixf_t;
+
+struct matrixx_t {
+ GLfixed m[16];
+ void load(const matrixf_t& rhs);
+};
+
+struct matrix_stack_t;
+
+
+struct matrixf_t {
+ void loadIdentity();
+ void load(const matrixf_t& rhs);
+
+ inline GLfloat* editElements() { return m; }
+ inline GLfloat const* elements() const { return m; }
+
+ void set(const GLfixed* rhs);
+ void set(const GLfloat* rhs);
+
+ static void multiply(matrixf_t& r,
+ const matrixf_t& lhs, const matrixf_t& rhs);
+
+ void dump(const char* what);
+
+private:
+ friend struct matrix_stack_t;
+ GLfloat m[16];
+ void load(const GLfixed* rhs);
+ void load(const GLfloat* rhs);
+ void multiply(const matrixf_t& rhs);
+ void translate(GLfloat x, GLfloat y, GLfloat z);
+ void scale(GLfloat x, GLfloat y, GLfloat z);
+ void rotate(GLfloat a, GLfloat x, GLfloat y, GLfloat z);
+};
+
+enum {
+ OP_IDENTITY = 0x00,
+ OP_TRANSLATE = 0x01,
+ OP_UNIFORM_SCALE = 0x02,
+ OP_SCALE = 0x05,
+ OP_ROTATE = 0x08,
+ OP_SKEW = 0x10,
+ OP_ALL = 0x1F
+};
+
+struct transform_t {
+ enum {
+ FLAGS_2D_PROJECTION = 0x1
+ };
+ matrixx_t matrix;
+ uint32_t flags;
+ uint32_t ops;
+
+ union {
+ struct {
+ void (*point2)(transform_t const* t, vec4_t*, vec4_t const*);
+ void (*point3)(transform_t const* t, vec4_t*, vec4_t const*);
+ void (*point4)(transform_t const* t, vec4_t*, vec4_t const*);
+ };
+ void (*pointv[3])(transform_t const* t, vec4_t*, vec4_t const*);
+ };
+
+ void loadIdentity();
+ void picker();
+ void dump(const char* what);
+};
+
+struct mvui_transform_t : public transform_t
+{
+ void picker();
+};
+
+struct matrix_stack_t {
+ enum {
+ DO_PICKER = 0x1,
+ DO_FLOAT_TO_FIXED = 0x2
+ };
+ transform_t transform;
+ uint8_t maxDepth;
+ uint8_t depth;
+ uint8_t dirty;
+ uint8_t reserved;
+ matrixf_t *stack;
+ uint8_t *ops;
+ void init(int depth);
+ void uninit();
+ void loadIdentity();
+ void load(const GLfixed* rhs);
+ void load(const GLfloat* rhs);
+ void multiply(const matrixf_t& rhs);
+ void translate(GLfloat x, GLfloat y, GLfloat z);
+ void scale(GLfloat x, GLfloat y, GLfloat z);
+ void rotate(GLfloat a, GLfloat x, GLfloat y, GLfloat z);
+ GLint push();
+ GLint pop();
+ void validate();
+ matrixf_t& top() { return stack[depth]; }
+ const matrixf_t& top() const { return stack[depth]; }
+ uint32_t top_ops() const { return ops[depth]; }
+ inline bool isRigidBody() const {
+ return !(ops[depth] & ~(OP_TRANSLATE|OP_UNIFORM_SCALE|OP_ROTATE));
+ }
+};
+
+struct vp_transform_t {
+ transform_t transform;
+ matrixf_t matrix;
+ GLfloat zNear;
+ GLfloat zFar;
+ void loadIdentity();
+};
+
+struct transform_state_t {
+ enum {
+ MODELVIEW = 0x01,
+ PROJECTION = 0x02,
+ VIEWPORT = 0x04,
+ TEXTURE = 0x08,
+ MVUI = 0x10,
+ MVIT = 0x20,
+ MVP = 0x40,
+ };
+ matrix_stack_t *current;
+ matrix_stack_t modelview;
+ matrix_stack_t projection;
+ matrix_stack_t texture[GGL_TEXTURE_UNIT_COUNT];
+
+ // modelview * projection
+ transform_t mvp __attribute__((aligned(32)));
+ // viewport transformation
+ vp_transform_t vpt __attribute__((aligned(32)));
+ // same for 4-D vertices
+ transform_t mvp4;
+ // full modelview inverse transpose
+ transform_t mvit4;
+ // upper 3x3 of mv-inverse-transpose (for normals)
+ mvui_transform_t mvui;
+
+ GLenum matrixMode;
+ GLenum rescaleNormals;
+ uint32_t dirty;
+ void invalidate();
+ void update_mvp();
+ void update_mvit();
+ void update_mvui();
+};
+
+struct viewport_t {
+ GLint x;
+ GLint y;
+ GLsizei w;
+ GLsizei h;
+ struct {
+ GLint x;
+ GLint y;
+ } surfaceport;
+ struct {
+ GLint x;
+ GLint y;
+ GLsizei w;
+ GLsizei h;
+ } scissor;
+};
+
+// ----------------------------------------------------------------------------
+// Lerping
+// ----------------------------------------------------------------------------
+
+struct compute_iterators_t
+{
+ void initTriangle(
+ vertex_t const* v0,
+ vertex_t const* v1,
+ vertex_t const* v2);
+
+ void initLine(
+ vertex_t const* v0,
+ vertex_t const* v1);
+
+ inline void initLerp(vertex_t const* v0, uint32_t enables);
+
+ int iteratorsScale(int32_t it[3],
+ int32_t c0, int32_t c1, int32_t c2) const;
+
+ void iterators1616(GGLfixed it[3],
+ GGLfixed c0, GGLfixed c1, GGLfixed c2) const;
+
+ void iterators0032(int32_t it[3],
+ int32_t c0, int32_t c1, int32_t c2) const;
+
+ void iterators0032(int64_t it[3],
+ int32_t c0, int32_t c1, int32_t c2) const;
+
+ GGLcoord area() const { return m_area; }
+
+private:
+ // don't change order of members here -- used by iterators.S
+ GGLcoord m_dx01, m_dy10, m_dx20, m_dy02;
+ GGLcoord m_x0, m_y0;
+ GGLcoord m_area;
+ uint8_t m_scale;
+ uint8_t m_area_scale;
+ uint8_t m_reserved[2];
+
+};
+
+// ----------------------------------------------------------------------------
+// state
+// ----------------------------------------------------------------------------
+
+#ifdef HAVE_ANDROID_OS
+ // We have a dedicated TLS slot in bionic
+ inline void setGlThreadSpecific(ogles_context_t *value) {
+ ((uint32_t *)__get_tls())[TLS_SLOT_OPENGL] = (uint32_t)value;
+ }
+ inline ogles_context_t* getGlThreadSpecific() {
+ return (ogles_context_t *)(((unsigned *)__get_tls())[TLS_SLOT_OPENGL]);
+ }
+#else
+ extern pthread_key_t gGLKey;
+ inline void setGlThreadSpecific(ogles_context_t *value) {
+ pthread_setspecific(gGLKey, value);
+ }
+ inline ogles_context_t* getGlThreadSpecific() {
+ return static_cast<ogles_context_t*>(pthread_getspecific(gGLKey));
+ }
+#endif
+
+
+struct prims_t {
+ typedef ogles_context_t* GL;
+ void (*renderPoint)(GL, vertex_t*);
+ void (*renderLine)(GL, vertex_t*, vertex_t*);
+ void (*renderTriangle)(GL, vertex_t*, vertex_t*, vertex_t*);
+};
+
+struct ogles_context_t {
+ context_t rasterizer;
+ array_machine_t arrays __attribute__((aligned(32)));
+ texture_state_t textures;
+ transform_state_t transforms;
+ vertex_cache_t vc;
+ prims_t prims;
+ culling_t cull;
+ lighting_t lighting;
+ user_clip_planes_t clipPlanes;
+ compute_iterators_t lerp; __attribute__((aligned(32)));
+ vertex_t current;
+ vec4_t currentColorClamped;
+ vec3_t currentNormal;
+ viewport_t viewport;
+ point_size_t point;
+ line_width_t line;
+ polygon_offset_t polygonOffset;
+ fog_t fog;
+ uint32_t perspective : 1;
+ uint32_t transformTextures : 1;
+ EGLSurfaceManager* surfaceManager;
+ EGLBufferObjectManager* bufferObjectManager;
+
+ GLenum error;
+
+ static inline ogles_context_t* get() {
+ return getGlThreadSpecific();
+ }
+
+};
+
+}; // namespace gl
+}; // namespace android
using namespace android::gl;
+
+#endif // ANDROID_OPENGLES_CONTEXT_H
+
diff --git a/opengl/libagl/egl.cpp b/opengl/libagl/egl.cpp
index eb55bee..92d32a2 100644
--- a/opengl/libagl/egl.cpp
+++ b/opengl/libagl/egl.cpp
@@ -30,6 +30,7 @@
#include <cutils/atomic.h>
#include <utils/threads.h>
+#include <ui/ANativeObjectBase.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
@@ -39,8 +40,6 @@
#include <pixelflinger/format.h>
#include <pixelflinger/pixelflinger.h>
-#include <private/ui/android_natives_priv.h>
-
#include "context.h"
#include "state.h"
#include "texture.h"
@@ -49,13 +48,14 @@
#undef NELEM
#define NELEM(x) (sizeof(x)/sizeof(*(x)))
+// ----------------------------------------------------------------------------
EGLBoolean EGLAPI eglSetSwapRectangleANDROID(EGLDisplay dpy, EGLSurface draw,
EGLint left, EGLint top, EGLint width, EGLint height);
-
// ----------------------------------------------------------------------------
namespace android {
+
// ----------------------------------------------------------------------------
const unsigned int NUM_DISPLAYS = 1;
diff --git a/opengl/libagl/texture.cpp b/opengl/libagl/texture.cpp
index 88e8651..08536df 100644
--- a/opengl/libagl/texture.cpp
+++ b/opengl/libagl/texture.cpp
@@ -23,7 +23,6 @@
#include "texture.h"
#include "TextureObjectManager.h"
-#include <private/ui/android_natives_priv.h>
#include <ETC1/etc1.h>
namespace android {
diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp
index a5dc832..a1bd82d 100644
--- a/opengl/libs/EGL/eglApi.cpp
+++ b/opengl/libs/EGL/eglApi.cpp
@@ -14,6 +14,8 @@
** limitations under the License.
*/
+#define ATRACE_TAG ATRACE_TAG_GRAPHICS
+
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
@@ -34,6 +36,7 @@
#include <utils/KeyedVector.h>
#include <utils/SortedVector.h>
#include <utils/String8.h>
+#include <utils/Trace.h>
#include "egl_impl.h"
#include "egl_tls.h"
@@ -348,6 +351,7 @@
}
void EGLAPI eglBeginFrame(EGLDisplay dpy, EGLSurface surface) {
+ ATRACE_CALL();
clearError();
egl_display_t const * const dp = validate_display(dpy);
@@ -712,6 +716,7 @@
EGLBoolean eglSwapBuffers(EGLDisplay dpy, EGLSurface draw)
{
+ ATRACE_CALL();
clearError();
egl_display_t const * const dp = validate_display(dpy);
diff --git a/opengl/libs/GLES_trace/src/gltrace_api.cpp b/opengl/libs/GLES_trace/src/gltrace_api.cpp
index 358bf54..cef6cbb 100644
--- a/opengl/libs/GLES_trace/src/gltrace_api.cpp
+++ b/opengl/libs/GLES_trace/src/gltrace_api.cpp
@@ -49,9 +49,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -80,9 +83,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -117,9 +123,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) name,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -148,9 +158,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -179,9 +192,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -210,9 +226,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -241,9 +260,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -284,9 +306,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -309,9 +334,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -340,9 +368,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -371,9 +402,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -414,9 +448,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -436,7 +473,7 @@
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);
+ arg_size->add_intvalue(size);
// copy argument data
GLMessage_DataType *arg_data = glmsg.add_args();
@@ -457,9 +494,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) data,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -479,13 +520,13 @@
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);
+ arg_offset->add_intvalue(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);
+ arg_size->add_intvalue(size);
// copy argument data
GLMessage_DataType *arg_data = glmsg.add_args();
@@ -500,9 +541,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) data,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -531,9 +576,12 @@
rt->set_type(GLMessage::DataType::ENUM);
rt->add_intvalue((int)retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -558,9 +606,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -601,9 +652,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -626,9 +680,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -651,9 +708,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -694,9 +754,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -719,9 +782,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -786,9 +852,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) data,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -859,9 +929,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) data,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -926,9 +1000,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -993,9 +1070,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1018,9 +1098,12 @@
rt->set_type(GLMessage::DataType::INT);
rt->add_intvalue(retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -1051,9 +1134,12 @@
rt->set_type(GLMessage::DataType::INT);
rt->add_intvalue(retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -1078,9 +1164,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1109,9 +1198,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) buffers,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1140,9 +1233,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) framebuffers,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1165,9 +1262,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1196,9 +1296,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) renderbuffers,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1221,9 +1325,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1252,9 +1359,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) textures,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1277,9 +1388,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1302,9 +1416,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1333,9 +1450,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1364,9 +1484,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1389,9 +1512,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1414,9 +1540,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1451,9 +1580,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1494,9 +1626,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) indices,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1519,9 +1655,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1544,9 +1683,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1563,9 +1705,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1582,9 +1727,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1625,9 +1773,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1674,9 +1825,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1699,9 +1853,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1730,9 +1887,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) buffers,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1755,9 +1916,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1786,9 +1950,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) framebuffers,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1817,9 +1985,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) renderbuffers,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1848,9 +2020,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) textures,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1909,9 +2085,16 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) length,
+ (void *) size,
+ (void *) type,
+ (void *) name,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -1970,9 +2153,16 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) length,
+ (void *) size,
+ (void *) type,
+ (void *) name,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2013,9 +2203,14 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) count,
+ (void *) shaders,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2050,9 +2245,13 @@
rt->set_type(GLMessage::DataType::INT);
rt->add_intvalue(retValue);
+ void *pointerArgs[] = {
+ (void *) name,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -2083,9 +2282,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2120,9 +2323,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2145,9 +2352,12 @@
rt->set_type(GLMessage::DataType::ENUM);
rt->add_intvalue((int)retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -2178,9 +2388,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2221,9 +2435,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2252,9 +2470,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2289,9 +2511,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2332,9 +2558,14 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) length,
+ (void *) infolog,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2369,9 +2600,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2406,9 +2641,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2449,9 +2688,14 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) length,
+ (void *) infolog,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2492,9 +2736,14 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) range,
+ (void *) precision,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2535,9 +2784,14 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) length,
+ (void *) source,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2566,9 +2820,13 @@
rt->set_type(GLMessage::DataType::INT);
rt->add_intvalue((int)retValue);
+ void *pointerArgs[] = {
+ (void *) retValue,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -2605,9 +2863,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2642,9 +2904,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2679,9 +2945,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2716,9 +2986,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2753,9 +3027,13 @@
rt->set_type(GLMessage::DataType::INT);
rt->add_intvalue(retValue);
+ void *pointerArgs[] = {
+ (void *) name,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -2792,9 +3070,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2829,9 +3111,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2866,9 +3152,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) pointer,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2897,9 +3187,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -2928,9 +3221,12 @@
rt->set_type(GLMessage::DataType::BOOL);
rt->add_boolvalue(retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -2961,9 +3257,12 @@
rt->set_type(GLMessage::DataType::BOOL);
rt->add_boolvalue(retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -2994,9 +3293,12 @@
rt->set_type(GLMessage::DataType::BOOL);
rt->add_boolvalue(retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -3027,9 +3329,12 @@
rt->set_type(GLMessage::DataType::BOOL);
rt->add_boolvalue(retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -3060,9 +3365,12 @@
rt->set_type(GLMessage::DataType::BOOL);
rt->add_boolvalue(retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -3093,9 +3401,12 @@
rt->set_type(GLMessage::DataType::BOOL);
rt->add_boolvalue(retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -3126,9 +3437,12 @@
rt->set_type(GLMessage::DataType::BOOL);
rt->add_boolvalue(retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -3153,9 +3467,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3178,9 +3495,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3209,9 +3529,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3240,9 +3563,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3301,9 +3627,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) pixels,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3320,9 +3650,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3363,9 +3696,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3394,9 +3730,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3437,9 +3776,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3486,9 +3828,14 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) shaders,
+ (void *) binary,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3529,9 +3876,14 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) string,
+ (void *) length,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3566,9 +3918,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3609,9 +3964,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3634,9 +3992,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3665,9 +4026,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3702,9 +4066,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3745,9 +4112,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3818,9 +4188,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) pixels,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3855,9 +4229,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3892,9 +4269,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3929,9 +4310,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -3966,9 +4350,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4039,9 +4427,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) pixels,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4070,9 +4462,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4107,9 +4502,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) v,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4138,9 +4537,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4175,9 +4577,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) v,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4212,9 +4618,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4249,9 +4658,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) v,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4286,9 +4699,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4323,9 +4739,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) v,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4366,9 +4786,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4403,9 +4826,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) v,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4446,9 +4873,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4483,9 +4913,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) v,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4532,9 +4966,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4569,9 +5006,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) v,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4618,9 +5059,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4655,9 +5099,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) v,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4698,9 +5146,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) value,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4741,9 +5193,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) value,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4784,9 +5240,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) value,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4809,9 +5269,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4834,9 +5297,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4865,9 +5331,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4896,9 +5365,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) values,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4933,9 +5406,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -4964,9 +5440,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) values,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -5007,9 +5487,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -5038,9 +5521,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) values,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -5087,9 +5574,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -5118,9 +5608,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) values,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -5173,9 +5667,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) ptr,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -5216,9 +5714,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -5250,9 +5751,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) image,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -5281,9 +5786,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) image,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -5330,9 +5839,15 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) length,
+ (void *) binaryFormat,
+ (void *) binary,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -5373,9 +5888,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) binary,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -5410,9 +5929,13 @@
rt->set_type(GLMessage::DataType::INT);
rt->add_intvalue((int)retValue);
+ void *pointerArgs[] = {
+ (void *) retValue,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -5443,9 +5966,12 @@
rt->set_type(GLMessage::DataType::BOOL);
rt->add_boolvalue(retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -5482,9 +6008,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -5561,9 +6091,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) pixels,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -5646,9 +6180,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) pixels,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -5719,9 +6257,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -5792,9 +6333,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) data,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -5877,9 +6422,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) data,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -5932,9 +6481,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -5957,9 +6509,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -5988,9 +6543,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) arrays,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6019,9 +6578,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) arrays,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6050,9 +6613,12 @@
rt->set_type(GLMessage::DataType::BOOL);
rt->add_boolvalue(retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -6089,9 +6655,14 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) numGroups,
+ (void *) groups,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6138,9 +6709,15 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) numCounters,
+ (void *) maxActiveCounters,
+ (void *) counters,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6181,9 +6758,14 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) length,
+ (void *) groupString,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6230,9 +6812,14 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) length,
+ (void *) counterString,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6273,9 +6860,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) data,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6304,9 +6895,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) monitors,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6335,9 +6930,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) monitors,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6384,9 +6983,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) countersList,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6409,9 +7012,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6434,9 +7040,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6483,9 +7092,14 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) data,
+ (void *) bytesWritten,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6562,9 +7176,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6611,9 +7228,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6660,9 +7280,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6679,9 +7302,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6722,9 +7348,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) label,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6771,9 +7401,14 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) length,
+ (void *) label,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6802,9 +7437,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) marker,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6833,9 +7472,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) marker,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6852,9 +7495,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6889,9 +7535,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) attachments,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6938,9 +7588,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -6993,9 +7646,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7036,9 +7692,14 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) first,
+ (void *) count,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7085,9 +7746,14 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) count,
+ (void *) indices,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7116,9 +7782,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) ids,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7147,9 +7817,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) ids,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7178,9 +7852,12 @@
rt->set_type(GLMessage::DataType::BOOL);
rt->add_boolvalue(retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -7211,9 +7888,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7236,9 +7916,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7273,9 +7956,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7310,9 +7997,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7335,9 +8026,12 @@
rt->set_type(GLMessage::DataType::ENUM);
rt->add_intvalue((int)retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -7404,9 +8098,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) data,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7447,9 +8145,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7490,9 +8192,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7527,9 +8233,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7558,9 +8267,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7601,9 +8313,13 @@
rt->set_type(GLMessage::DataType::INT);
rt->add_intvalue(retValue);
+ void *pointerArgs[] = {
+ (void *) strings,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -7628,9 +8344,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7659,9 +8378,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) pipelines,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7690,9 +8413,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) pipelines,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7721,9 +8448,12 @@
rt->set_type(GLMessage::DataType::BOOL);
rt->add_boolvalue(retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -7760,9 +8490,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7797,9 +8530,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7834,9 +8571,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7877,9 +8617,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7926,9 +8669,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -7981,9 +8727,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8018,9 +8767,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8061,9 +8813,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8110,9 +8865,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8165,9 +8923,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8208,9 +8969,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) value,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8251,9 +9016,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) value,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8294,9 +9063,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) value,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8337,9 +9110,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) value,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8380,9 +9157,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) value,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8423,9 +9204,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) value,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8466,9 +9251,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) value,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8509,9 +9298,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) value,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8558,9 +9351,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) value,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8607,9 +9404,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) value,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8656,9 +9457,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) value,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8681,9 +9486,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8724,9 +9532,14 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) length,
+ (void *) infoLog,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8767,9 +9580,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8816,9 +9632,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8871,9 +9690,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8920,9 +9742,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -8975,9 +9800,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9036,9 +9864,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9085,9 +9916,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9140,9 +9974,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9165,9 +10002,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9190,9 +10030,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9221,9 +10064,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) bufs,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9252,9 +10099,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) fences,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9283,9 +10134,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) fences,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9314,9 +10169,12 @@
rt->set_type(GLMessage::DataType::BOOL);
rt->add_boolvalue(retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -9347,9 +10205,12 @@
rt->set_type(GLMessage::DataType::BOOL);
rt->add_boolvalue(retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -9386,9 +10247,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9411,9 +10276,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9442,9 +10310,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9467,9 +10338,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9498,9 +10372,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9535,9 +10412,14 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) num,
+ (void *) driverControls,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9578,9 +10460,14 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) length,
+ (void *) driverControlString,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9603,9 +10490,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9628,9 +10518,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9665,9 +10558,14 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) textures,
+ (void *) numTextures,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9702,9 +10600,14 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) buffers,
+ (void *) numBuffers,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9739,9 +10642,14 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) renderbuffers,
+ (void *) numRenderbuffers,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9776,9 +10684,14 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) framebuffers,
+ (void *) numFramebuffers,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9825,9 +10738,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9862,9 +10779,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9947,9 +10867,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) texels,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -9978,9 +10902,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10015,9 +10943,14 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) shaders,
+ (void *) numShaders,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10052,9 +10985,14 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) programs,
+ (void *) numPrograms,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10083,9 +11021,12 @@
rt->set_type(GLMessage::DataType::BOOL);
rt->add_boolvalue(retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -10128,9 +11069,14 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) source,
+ (void *) length,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10177,9 +11123,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10202,9 +11151,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10236,9 +11188,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10267,9 +11222,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) equation,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10310,9 +11269,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10341,9 +11303,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10372,9 +11337,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10427,9 +11396,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10458,9 +11430,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) eqn,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10495,9 +11471,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10532,9 +11512,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10569,9 +11553,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10600,9 +11588,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10631,9 +11622,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10668,9 +11663,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10705,9 +11703,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10730,9 +11732,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) m,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10767,9 +11773,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10804,9 +11813,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10829,9 +11842,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) m,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10878,9 +11895,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10915,9 +11935,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -10970,9 +11993,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11001,9 +12027,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11032,9 +12061,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11057,9 +12090,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11100,9 +12136,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11137,9 +12176,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11174,9 +12216,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11211,9 +12256,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11248,9 +12297,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11279,9 +12331,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11322,9 +12377,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11347,9 +12405,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11372,9 +12433,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11403,9 +12467,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) equation,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11446,9 +12514,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11489,9 +12560,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11532,9 +12606,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) pointer,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11563,9 +12641,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11588,9 +12669,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11613,9 +12697,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11644,9 +12731,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11675,9 +12765,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11730,9 +12824,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11761,9 +12858,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) eqn,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11792,9 +12893,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11829,9 +12934,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11866,9 +12975,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11897,9 +13010,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11934,9 +13051,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -11971,9 +13092,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12008,9 +13133,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12039,9 +13168,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12070,9 +13202,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12107,9 +13243,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12144,9 +13283,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12169,9 +13312,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12188,9 +13334,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12213,9 +13362,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) m,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12238,9 +13391,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12275,9 +13431,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12312,9 +13471,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12337,9 +13500,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12362,9 +13528,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) m,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12411,9 +13581,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12448,9 +13621,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12485,9 +13661,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) pointer,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12540,9 +13720,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12571,9 +13754,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12602,9 +13788,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12627,9 +13817,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12658,9 +13851,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12677,9 +13873,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12696,9 +13895,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12739,9 +13941,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12770,9 +13975,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12807,9 +14015,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12832,9 +14043,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12875,9 +14089,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) pointer,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12912,9 +14130,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12949,9 +14170,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -12986,9 +14210,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13023,9 +14251,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13060,9 +14292,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13097,9 +14332,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13134,9 +14373,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13177,9 +14419,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) pointer,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13214,9 +14460,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) pointer,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13248,9 +14498,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13291,9 +14544,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13316,9 +14572,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13365,9 +14624,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13414,9 +14676,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13463,9 +14728,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13488,9 +14756,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) coords,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13513,9 +14785,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) coords,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13538,9 +14814,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) coords,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13587,9 +14867,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13612,9 +14895,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) coords,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13643,9 +14930,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13686,9 +14976,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13711,9 +15004,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13742,9 +15038,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) equation,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13785,9 +15085,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13816,9 +15119,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13847,9 +15153,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13878,9 +15187,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13933,9 +15246,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13964,9 +15280,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) eqn,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -13995,9 +15315,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14032,9 +15356,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14069,9 +15397,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14106,9 +15438,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14143,9 +15479,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14174,9 +15514,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14205,9 +15548,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14242,9 +15589,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14279,9 +15629,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14304,9 +15658,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14329,9 +15686,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) m,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14366,9 +15727,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14403,9 +15767,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14428,9 +15796,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) m,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14477,9 +15849,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14514,9 +15889,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14569,9 +15947,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14600,9 +15981,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14631,9 +16015,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14656,9 +16044,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14687,9 +16078,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14730,9 +16124,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14761,9 +16158,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14798,9 +16198,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14835,9 +16238,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14872,9 +16278,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14909,9 +16319,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14946,9 +16359,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -14983,9 +16400,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15014,9 +16434,12 @@
rt->set_type(GLMessage::DataType::BOOL);
rt->add_boolvalue(retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -15047,9 +16470,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15078,9 +16504,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) renderbuffers,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15109,9 +16539,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) renderbuffers,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15152,9 +16586,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15189,9 +16626,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15220,9 +16661,12 @@
rt->set_type(GLMessage::DataType::BOOL);
rt->add_boolvalue(retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -15253,9 +16697,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15284,9 +16731,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) framebuffers,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15315,9 +16766,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) framebuffers,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15346,9 +16801,12 @@
rt->set_type(GLMessage::DataType::ENUM);
rt->add_intvalue((int)retValue);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -15391,9 +16849,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15440,9 +16901,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15483,9 +16947,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15508,9 +16976,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15533,9 +17004,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15552,9 +17026,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15595,9 +17072,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) pointer,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15638,9 +17119,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) pointer,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15675,9 +17160,14 @@
rt->set_type(GLMessage::DataType::INT);
rt->add_intvalue(retValue);
+ void *pointerArgs[] = {
+ (void *) mantissa,
+ (void *) exponent,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
return retValue;
@@ -15708,9 +17198,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15763,9 +17256,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15818,9 +17314,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15849,9 +17348,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) equation,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15880,9 +17383,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) eqn,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15905,9 +17412,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15942,9 +17452,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -15979,9 +17492,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -16016,9 +17533,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -16053,9 +17573,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -16090,9 +17614,12 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -16127,9 +17654,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -16164,9 +17695,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -16201,9 +17736,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -16238,9 +17777,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) params,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -16269,9 +17812,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) eqn,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
@@ -16300,9 +17847,13 @@
nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+ void *pointerArgs[] = {
+ (void *) eqn,
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
}
diff --git a/opengl/libs/GLES_trace/src/gltrace_fixup.cpp b/opengl/libs/GLES_trace/src/gltrace_fixup.cpp
index 6c4feb5..c69ba5e 100644
--- a/opengl/libs/GLES_trace/src/gltrace_fixup.cpp
+++ b/opengl/libs/GLES_trace/src/gltrace_fixup.cpp
@@ -76,21 +76,64 @@
return 1; // in doubt...
}
+void fixup_GenericFloatArray(int argIndex, int nFloats, GLMessage *glmsg, void *src) {
+ GLMessage_DataType *arg_floatarray = glmsg->mutable_args(argIndex);
+ GLfloat *floatp = (GLfloat *)src;
+
+ if (floatp == NULL) {
+ return;
+ }
+
+ arg_floatarray->set_type(GLMessage::DataType::FLOAT);
+ arg_floatarray->set_isarray(true);
+ arg_floatarray->clear_floatvalue();
+
+ for (int i = 0; i < nFloats; i++, floatp++) {
+ arg_floatarray->add_floatvalue(*floatp);
+ }
+}
+
+void fixup_GenericIntArray(int argIndex, int nInts, GLMessage *glmsg, void *src) {
+ GLMessage_DataType *arg_intarray = glmsg->mutable_args(argIndex);
+ GLint *intp = (GLint *)src;
+
+ if (intp == NULL) {
+ return;
+ }
+
+ 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_GenericEnumArray(int argIndex, int nEnums, GLMessage *glmsg, void *src) {
+ // fixup as if they were ints
+ fixup_GenericIntArray(argIndex, nEnums, glmsg, src);
+
+ // and then set the data type to be enum
+ GLMessage_DataType *arg_enumarray = glmsg->mutable_args(argIndex);
+ arg_enumarray->set_type(GLMessage::DataType::ENUM);
+}
+
/** Generic helper function: extract pointer at argIndex and
replace it with the C style string at *pointer */
-void fixup_CStringPtr(int argIndex, GLMessage *glmsg) {
+void fixup_CStringPtr(int argIndex, GLMessage *glmsg, void *src) {
GLMessage_DataType *arg = glmsg->mutable_args(argIndex);
- GLchar *ptr = (GLchar *)arg->intvalue(0);
+ GLchar *ptr = (GLchar *) src;
arg->set_type(GLMessage::DataType::CHAR);
arg->set_isarray(true);
arg->add_charvalue(ptr);
}
-void fixup_glGetString(GLMessage *glmsg) {
+void fixup_glGetString(GLMessage *glmsg, void *pointersToFixup[]) {
/* const GLubyte* GLTrace_glGetString(GLenum name) */
GLMessage_DataType *ret = glmsg->mutable_returnvalue();
- GLchar *ptr = (GLchar *)ret->intvalue(0);
+ GLchar *ptr = (GLchar *) pointersToFixup[0];
if (ptr != NULL) {
ret->set_type(GLMessage::DataType::CHAR);
@@ -112,7 +155,7 @@
}
/** Common fixup routing for glTexImage2D & glTexSubImage2D. */
-void fixup_glTexImage(int widthIndex, int heightIndex, GLMessage *glmsg) {
+void fixup_glTexImage(int widthIndex, int heightIndex, GLMessage *glmsg, void *dataSrc) {
GLMessage_DataType arg_width = glmsg->args(widthIndex);
GLMessage_DataType arg_height = glmsg->args(heightIndex);
@@ -124,7 +167,7 @@
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);
+ void *data = (void *) dataSrc;
int bytesPerTexel = getBytesPerTexel(format, type);
@@ -141,7 +184,7 @@
}
-void fixup_glTexImage2D(GLMessage *glmsg) {
+void fixup_glTexImage2D(GLMessage *glmsg, void *pointersToFixup[]) {
/* void glTexImage2D(GLenum target,
GLint level,
GLint internalformat,
@@ -154,10 +197,10 @@
*/
int widthIndex = 3;
int heightIndex = 4;
- fixup_glTexImage(widthIndex, heightIndex, glmsg);
+ fixup_glTexImage(widthIndex, heightIndex, glmsg, pointersToFixup[0]);
}
-void fixup_glTexSubImage2D(GLMessage *glmsg) {
+void fixup_glTexSubImage2D(GLMessage *glmsg, void *pointersToFixup[]) {
/*
void glTexSubImage2D(GLenum target,
GLint level,
@@ -171,10 +214,10 @@
*/
int widthIndex = 4;
int heightIndex = 5;
- fixup_glTexImage(widthIndex, heightIndex, glmsg);
+ fixup_glTexImage(widthIndex, heightIndex, glmsg, pointersToFixup[0]);
}
-void fixup_glShaderSource(GLMessage *glmsg) {
+void fixup_glShaderSource(GLMessage *glmsg, void *pointersToFixup[]) {
/* void glShaderSource(GLuint shader, GLsizei count, const GLchar** string,
const GLint* length) */
GLMessage_DataType arg_count = glmsg->args(1);
@@ -182,8 +225,8 @@
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);
+ GLchar **stringpp = (GLchar **) pointersToFixup[0];
+ GLint *lengthp = (GLint *) pointersToFixup[1];
arg_strpp->set_type(GLMessage::DataType::CHAR);
arg_strpp->set_isarray(true);
@@ -202,87 +245,64 @@
arg_strpp->add_charvalue(src);
}
-void fixup_glUniformGenericInteger(int argIndex, int nIntegers, GLMessage *glmsg) {
+void fixup_glUniformGenericInteger(int argIndex, int nIntegers, GLMessage *glmsg,
+ void *pointersToFixup[]) {
/* void glUniform?iv(GLint location, GLsizei count, const GLint *value); */
- GLMessage_DataType *arg_values = glmsg->mutable_args(argIndex);
- GLint *src = (GLint*)arg_values->intvalue(0);
-
- arg_values->set_type(GLMessage::DataType::INT);
- arg_values->set_isarray(true);
- arg_values->clear_intvalue();
-
- for (int i = 0; i < nIntegers; i++) {
- arg_values->add_intvalue(*src++);
- }
+ fixup_GenericIntArray(argIndex, nIntegers, glmsg, pointersToFixup[0]);
}
-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_glUniformGeneric(int argIndex, int nFloats, GLMessage *glmsg, void *src) {
+ fixup_GenericFloatArray(argIndex, nFloats, glmsg, src);
}
-void fixup_glUniformMatrixGeneric(int matrixSize, GLMessage *glmsg) {
+void fixup_glUniformMatrixGeneric(int matrixSize, GLMessage *glmsg, void *pointersToFixup[]) {
/* 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);
+ fixup_glUniformGeneric(3, matrixSize * matrixSize * n_matrices, glmsg, pointersToFixup[0]);
}
-void fixup_GenericIntArray(int argIndex, int nInts, GLMessage *glmsg) {
- GLMessage_DataType *arg_intarray = glmsg->mutable_args(argIndex);
- GLint *intp = (GLint *)arg_intarray->intvalue(0);
+void fixup_glBufferData(int sizeIndex, int dataIndex, GLMessage *glmsg, void *pointersToFixup[]) {
+ /* void glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data) */
+ /* void glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage) */
+ GLsizeiptr size = glmsg->args(sizeIndex).intvalue(0);
- if (intp == NULL) {
+ GLMessage_DataType *arg_datap = glmsg->mutable_args(dataIndex);
+ GLvoid *datap = (GLvoid *) pointersToFixup[0];
+
+ if (datap == NULL) {
+ // glBufferData can be called with a NULL data pointer
return;
}
- arg_intarray->set_type(GLMessage::DataType::INT);
- arg_intarray->set_isarray(true);
- arg_intarray->clear_intvalue();
+ arg_datap->set_type(GLMessage::DataType::VOID);
+ arg_datap->set_isarray(true);
+ arg_datap->clear_intvalue();
- for (int i = 0; i < nInts; i++, intp++) {
- arg_intarray->add_intvalue(*intp);
- }
+ arg_datap->add_rawbytes(datap, size);
}
-void fixup_GenericEnumArray(int argIndex, int nEnums, GLMessage *glmsg) {
- // fixup as if they were ints
- fixup_GenericIntArray(argIndex, nEnums, glmsg);
-
- // and then set the data type to be enum
- GLMessage_DataType *arg_enumarray = glmsg->mutable_args(argIndex);
- arg_enumarray->set_type(GLMessage::DataType::ENUM);
-}
-
-void fixup_glGenGeneric(GLMessage *glmsg) {
+void fixup_glGenGeneric(GLMessage *glmsg, void *pointersToFixup[]) {
/* void glGen*(GLsizei n, GLuint * buffers); */
GLMessage_DataType arg_n = glmsg->args(0);
GLsizei n = arg_n.intvalue(0);
- fixup_GenericIntArray(1, n, glmsg);
+ fixup_GenericIntArray(1, n, glmsg, pointersToFixup[0]);
}
-void fixup_glDeleteGeneric(GLMessage *glmsg) {
+void fixup_glDeleteGeneric(GLMessage *glmsg, void *pointersToFixup[]) {
/* void glDelete*(GLsizei n, GLuint *buffers); */
GLMessage_DataType arg_n = glmsg->args(0);
GLsizei n = arg_n.intvalue(0);
- fixup_GenericIntArray(1, n, glmsg);
+ fixup_GenericIntArray(1, n, glmsg, pointersToFixup[0]);
}
-void fixup_glGetBooleanv(GLMessage *glmsg) {
+void fixup_glGetBooleanv(GLMessage *glmsg, void *pointersToFixup[]) {
/* void glGetBooleanv(GLenum pname, GLboolean *params); */
GLMessage_DataType *arg_params = glmsg->mutable_args(1);
- GLboolean *src = (GLboolean*)arg_params->intvalue(0);
+ GLboolean *src = (GLboolean*) pointersToFixup[0];
arg_params->set_type(GLMessage::DataType::BOOL);
arg_params->set_isarray(true);
@@ -290,10 +310,10 @@
arg_params->add_boolvalue(*src);
}
-void fixup_glGetFloatv(GLMessage *glmsg) {
+void fixup_glGetFloatv(GLMessage *glmsg, void *pointersToFixup[]) {
/* void glGetFloatv(GLenum pname, GLfloat *params); */
GLMessage_DataType *arg_params = glmsg->mutable_args(1);
- GLfloat *src = (GLfloat*)arg_params->intvalue(0);
+ GLfloat *src = (GLfloat*) pointersToFixup[0];
arg_params->set_type(GLMessage::DataType::FLOAT);
arg_params->set_isarray(true);
@@ -338,16 +358,15 @@
}
/** Given a glGetActive[Uniform|Attrib] call, obtain the location
- * of the variable in the call.
+ * of the variable of given name in the call.
*/
-int getShaderVariableLocation(GLTraceContext *context, GLMessage *glmsg) {
+int getShaderVariableLocation(GLTraceContext *context, GLMessage *glmsg, GLchar *name) {
GLMessage_Function func = glmsg->function();
if (func != GLMessage::glGetActiveAttrib && func != GLMessage::glGetActiveUniform) {
return -1;
}
int program = glmsg->args(0).intvalue(0);
- GLchar *name = (GLchar*) glmsg->args(6).intvalue(0);
if (func == GLMessage::glGetActiveAttrib) {
return context->hooks->gl.glGetAttribLocation(program, name);
@@ -356,16 +375,17 @@
}
}
-void fixup_glGetActiveAttribOrUniform(GLMessage *glmsg, int location) {
+void fixup_glGetActiveAttribOrUniform(GLTraceContext *context, GLMessage *glmsg,
+ void *pointersToFixup[]) {
/* void glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize,
GLsizei* length, GLint* size, GLenum* type, GLchar* name); */
/* void glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize,
GLsizei* length, GLint* size, GLenum* type, GLchar* name) */
- fixup_GenericIntArray(3, 1, glmsg); // length
- fixup_GenericIntArray(4, 1, glmsg); // size
- fixup_GenericEnumArray(5, 1, glmsg); // type
- fixup_CStringPtr(6, glmsg); // name
+ fixup_GenericIntArray(3, 1, glmsg, pointersToFixup[0]); // length
+ fixup_GenericIntArray(4, 1, glmsg, pointersToFixup[1]); // size
+ fixup_GenericEnumArray(5, 1, glmsg, pointersToFixup[2]); // type
+ fixup_CStringPtr(6, glmsg, pointersToFixup[3]); // name
// The index argument in the glGetActive[Attrib|Uniform] functions
// does not correspond to the actual location index as used in
@@ -373,6 +393,7 @@
// In order to make things simpler for the debugger, we also pass
// a hidden location argument that stores the actual location.
// append the location value to the end of the argument list
+ int location = getShaderVariableLocation(context, glmsg, (GLchar*)pointersToFixup[3]);
GLMessage_DataType *arg_location = glmsg->add_args();
arg_location->set_isarray(false);
arg_location->set_type(GLMessage::DataType::INT);
@@ -381,7 +402,7 @@
void fixupGLMessage(GLTraceContext *context, nsecs_t wallStart, nsecs_t wallEnd,
nsecs_t threadStart, nsecs_t threadEnd,
- GLMessage *glmsg) {
+ GLMessage *glmsg, void *pointersToFixup[]) {
// for all messages, set the current context id
glmsg->set_context_id(context->getId());
@@ -396,41 +417,41 @@
case GLMessage::glDeleteFramebuffers: /* glDeleteFramebuffers(GLsizei n, GLuint *buffers); */
case GLMessage::glDeleteRenderbuffers:/* glDeleteRenderbuffers(GLsizei n, GLuint *buffers); */
case GLMessage::glDeleteTextures: /* glDeleteTextures(GLsizei n, GLuint *textures); */
- fixup_glDeleteGeneric(glmsg);
+ fixup_glDeleteGeneric(glmsg, pointersToFixup);
break;
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 *textures); */
- fixup_glGenGeneric(glmsg);
+ fixup_glGenGeneric(glmsg, pointersToFixup);
break;
case GLMessage::glLinkProgram: /* void glLinkProgram(GLuint program); */
fixup_glLinkProgram(glmsg);
break;
case GLMessage::glGetActiveAttrib:
- fixup_glGetActiveAttribOrUniform(glmsg, getShaderVariableLocation(context, glmsg));
+ fixup_glGetActiveAttribOrUniform(context, glmsg, pointersToFixup);
break;
case GLMessage::glGetActiveUniform:
- fixup_glGetActiveAttribOrUniform(glmsg, getShaderVariableLocation(context, glmsg));
+ fixup_glGetActiveAttribOrUniform(context, glmsg, pointersToFixup);
break;
case GLMessage::glBindAttribLocation:
/* void glBindAttribLocation(GLuint program, GLuint index, const GLchar* name); */
- fixup_CStringPtr(2, glmsg);
+ fixup_CStringPtr(2, glmsg, pointersToFixup[0]);
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);
+ fixup_CStringPtr(1, glmsg, pointersToFixup[0]);
break;
case GLMessage::glGetBooleanv:
- fixup_glGetBooleanv(glmsg);
+ fixup_glGetBooleanv(glmsg, pointersToFixup);
break;
case GLMessage::glGetFloatv:
- fixup_glGetFloatv(glmsg);
+ fixup_glGetFloatv(glmsg, pointersToFixup);
break;
case GLMessage::glGetIntegerv: /* void glGetIntegerv(GLenum pname, GLint *params); */
- fixup_GenericIntArray(1, 1, glmsg);
+ fixup_GenericIntArray(1, 1, glmsg, pointersToFixup[0]);
break;
case GLMessage::glGetProgramiv:
case GLMessage::glGetRenderbufferParameteriv:
@@ -438,70 +459,78 @@
/* 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);
+ fixup_GenericIntArray(2, 1, glmsg, pointersToFixup[0]);
break;
case GLMessage::glGetString:
- fixup_glGetString(glmsg);
+ fixup_glGetString(glmsg, pointersToFixup);
break;
case GLMessage::glTexImage2D:
if (context->getGlobalTraceState()->shouldCollectTextureDataOnGlTexImage()) {
- fixup_glTexImage2D(glmsg);
+ fixup_glTexImage2D(glmsg, pointersToFixup);
}
break;
case GLMessage::glTexSubImage2D:
if (context->getGlobalTraceState()->shouldCollectTextureDataOnGlTexImage()) {
- fixup_glTexSubImage2D(glmsg);
+ fixup_glTexSubImage2D(glmsg, pointersToFixup);
}
break;
case GLMessage::glShaderSource:
- fixup_glShaderSource(glmsg);
+ fixup_glShaderSource(glmsg, pointersToFixup);
break;
case GLMessage::glUniform1iv:
/* void glUniform1iv(GLint location, GLsizei count, const GLint *value); */
- fixup_glUniformGenericInteger(2, 1, glmsg);
+ fixup_glUniformGenericInteger(2, 1, glmsg, pointersToFixup);
break;
case GLMessage::glUniform2iv:
/* void glUniform2iv(GLint location, GLsizei count, const GLint *value); */
- fixup_glUniformGenericInteger(2, 2, glmsg);
+ fixup_glUniformGenericInteger(2, 2, glmsg, pointersToFixup);
break;
case GLMessage::glUniform3iv:
/* void glUniform3iv(GLint location, GLsizei count, const GLint *value); */
- fixup_glUniformGenericInteger(2, 3, glmsg);
+ fixup_glUniformGenericInteger(2, 3, glmsg, pointersToFixup);
break;
case GLMessage::glUniform4iv:
/* void glUniform4iv(GLint location, GLsizei count, const GLint *value); */
- fixup_glUniformGenericInteger(2, 4, glmsg);
+ fixup_glUniformGenericInteger(2, 4, glmsg, pointersToFixup);
break;
case GLMessage::glUniform1fv:
/* void glUniform1fv(GLint location, GLsizei count, const GLfloat *value); */
- fixup_glUniformGeneric(2, 1, glmsg);
+ fixup_glUniformGeneric(2, 1, glmsg, pointersToFixup[0]);
break;
case GLMessage::glUniform2fv:
/* void glUniform2fv(GLint location, GLsizei count, const GLfloat *value); */
- fixup_glUniformGeneric(2, 2, glmsg);
+ fixup_glUniformGeneric(2, 2, glmsg, pointersToFixup[0]);
break;
case GLMessage::glUniform3fv:
/* void glUniform3fv(GLint location, GLsizei count, const GLfloat *value); */
- fixup_glUniformGeneric(2, 3, glmsg);
+ fixup_glUniformGeneric(2, 3, glmsg, pointersToFixup[0]);
break;
case GLMessage::glUniform4fv:
/* void glUniform4fv(GLint location, GLsizei count, const GLfloat *value); */
- fixup_glUniformGeneric(2, 4, glmsg);
+ fixup_glUniformGeneric(2, 4, glmsg, pointersToFixup[0]);
break;
case GLMessage::glUniformMatrix2fv:
/* void glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat* value) */
- fixup_glUniformMatrixGeneric(2, glmsg);
+ fixup_glUniformMatrixGeneric(2, glmsg, pointersToFixup);
break;
case GLMessage::glUniformMatrix3fv:
/* void glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat* value) */
- fixup_glUniformMatrixGeneric(3, glmsg);
+ fixup_glUniformMatrixGeneric(3, glmsg, pointersToFixup);
break;
case GLMessage::glUniformMatrix4fv:
/* void glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat* value) */
- fixup_glUniformMatrixGeneric(4, glmsg);
+ fixup_glUniformMatrixGeneric(4, glmsg, pointersToFixup);
+ break;
+ case GLMessage::glBufferData:
+ /* void glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage) */
+ fixup_glBufferData(1, 2, glmsg, pointersToFixup);
+ break;
+ case GLMessage::glBufferSubData:
+ /* void glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data) */
+ fixup_glBufferData(2, 3, glmsg, pointersToFixup);
break;
case GLMessage::glDrawArrays:
/* void glDrawArrays(GLenum mode, GLint first, GLsizei count) */
@@ -517,11 +546,11 @@
break;
case GLMessage::glPushGroupMarkerEXT:
/* void PushGroupMarkerEXT(sizei length, const char *marker); */
- fixup_CStringPtr(1, glmsg);
+ fixup_CStringPtr(1, glmsg, pointersToFixup[0]);
break;
case GLMessage::glInsertEventMarkerEXT:
/* void InsertEventMarkerEXT(sizei length, const char *marker); */
- fixup_CStringPtr(1, glmsg);
+ fixup_CStringPtr(1, glmsg, pointersToFixup[0]);
break;
default:
break;
diff --git a/opengl/libs/GLES_trace/src/gltrace_fixup.h b/opengl/libs/GLES_trace/src/gltrace_fixup.h
index f63b056..fe30125 100644
--- a/opengl/libs/GLES_trace/src/gltrace_fixup.h
+++ b/opengl/libs/GLES_trace/src/gltrace_fixup.h
@@ -27,7 +27,7 @@
void fixupGLMessage(GLTraceContext *curContext, nsecs_t wallStart, nsecs_t wallEnd,
nsecs_t threadStart, nsecs_t threadEnd,
- GLMessage *message);
+ GLMessage *message, void *pointersToFixup[]);
void fixup_addFBContents(GLTraceContext *curContext, GLMessage *message, FBBinding fbToRead);
};
diff --git a/opengl/libs/GLES_trace/tools/genapi.py b/opengl/libs/GLES_trace/tools/genapi.py
index e1660be..24034c1 100755
--- a/opengl/libs/GLES_trace/tools/genapi.py
+++ b/opengl/libs/GLES_trace/tools/genapi.py
@@ -92,8 +92,8 @@
"GLclampf":DataType.FLOAT,
"GLfixed":DataType.INT,
"GLclampx":DataType.INT,
- "GLsizeiptr":DataType.POINTER,
- "GLintptr":DataType.POINTER,
+ "GLsizeiptr":DataType.INT,
+ "GLintptr":DataType.INT,
"GLeglImageOES":DataType.POINTER,
}
@@ -180,9 +180,20 @@
rt->$!retDataType.getProtobufCall()!$retValue);
<!--(end)-->
+ void *pointerArgs[] = {
+<!--(for argname, argtype in parsedArgs)-->
+ <!--(if argtype == DataType.POINTER)-->
+ (void *) $!argname!$,
+ <!--(end)-->
+<!--(end)-->
+<!--(if retDataType == DataType.POINTER)-->
+ (void *) retValue,
+<!--(end)-->
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
<!--(if retType != "void")-->
diff --git a/opengl/tests/angeles/Android.mk b/opengl/tests/angeles/Android.mk
index d0c3221..84b754b 100644
--- a/opengl/tests/angeles/Android.mk
+++ b/opengl/tests/angeles/Android.mk
@@ -4,14 +4,7 @@
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= app-linux.cpp demo.c.arm
LOCAL_SHARED_LIBRARIES := libEGL libGLESv1_CM libui
+LOCAL_C_INCLUDES += frameworks/base/opengl/tests/include
LOCAL_MODULE:= angeles
LOCAL_MODULE_TAGS := optional
include $(BUILD_EXECUTABLE)
-
-
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES:= gpustate.c
-LOCAL_SHARED_LIBRARIES := libEGL libGLESv1_CM
-LOCAL_MODULE:= gpustate
-LOCAL_MODULE_TAGS := optional
-include $(BUILD_EXECUTABLE)
diff --git a/opengl/tests/angeles/app-linux.cpp b/opengl/tests/angeles/app-linux.cpp
index 4d10ee5..6ac68a2 100644
--- a/opengl/tests/angeles/app-linux.cpp
+++ b/opengl/tests/angeles/app-linux.cpp
@@ -53,7 +53,7 @@
#include <GLES/gl.h>
#include <ui/FramebufferNativeWindow.h>
-#include <ui/EGLUtils.h>
+#include "EGLUtils.h"
using namespace android;
diff --git a/opengl/tests/angeles/gpustate.c b/opengl/tests/angeles/gpustate.c
deleted file mode 100644
index 3c540c9..0000000
--- a/opengl/tests/angeles/gpustate.c
+++ /dev/null
@@ -1,39 +0,0 @@
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/mman.h>
-#include <unistd.h>
-#include <fcntl.h>
-
-static void *map_memory(const char *fn, unsigned base, unsigned size)
-{
- int fd;
- void *ptr;
-
- fd = open(fn, O_RDWR | O_SYNC);
- if(fd < 0) {
- perror("cannot open %s for mapping");
- return MAP_FAILED;
- }
-
- ptr = mmap(0, size, PROT_READ | PROT_WRITE,
- MAP_SHARED, fd, base);
- close(fd);
-
- if(ptr == MAP_FAILED) {
- fprintf(stderr,"cannot map %s (@%08x,%08x)\n", fn, base, size);
- }
- return ptr;
-}
-
-
-int main(int argc, char** argv)
-{
- void *grp_regs = map_memory("/dev/hw3d", 0, 1024 * 1024);
- printf("GPU base mapped at %p\n", grp_regs);
- int state_offset = 0x10140;
- printf("GPU state = %08lx\n",
- *((long*)((char*)grp_regs + state_offset)) );
-
- return 0;
-}
diff --git a/opengl/tests/fillrate/Android.mk b/opengl/tests/fillrate/Android.mk
index 191c59b..835f858 100644
--- a/opengl/tests/fillrate/Android.mk
+++ b/opengl/tests/fillrate/Android.mk
@@ -11,6 +11,8 @@
libGLESv1_CM \
libui
+LOCAL_C_INCLUDES += frameworks/base/opengl/tests/include
+
LOCAL_MODULE:= test-opengl-fillrate
LOCAL_MODULE_TAGS := optional
diff --git a/opengl/tests/fillrate/fillrate.cpp b/opengl/tests/fillrate/fillrate.cpp
index 911d354..a708647 100644
--- a/opengl/tests/fillrate/fillrate.cpp
+++ b/opengl/tests/fillrate/fillrate.cpp
@@ -26,7 +26,7 @@
#include <utils/StopWatch.h>
#include <ui/FramebufferNativeWindow.h>
-#include <ui/EGLUtils.h>
+#include "EGLUtils.h"
using namespace android;
diff --git a/opengl/tests/filter/Android.mk b/opengl/tests/filter/Android.mk
index a254127..d780362 100644
--- a/opengl/tests/filter/Android.mk
+++ b/opengl/tests/filter/Android.mk
@@ -10,6 +10,8 @@
libGLESv1_CM \
libui
+LOCAL_C_INCLUDES += frameworks/base/opengl/tests/include
+
LOCAL_MODULE:= test-opengl-filter
LOCAL_MODULE_TAGS := optional
diff --git a/opengl/tests/filter/filter.cpp b/opengl/tests/filter/filter.cpp
index 2351909..0067327 100644
--- a/opengl/tests/filter/filter.cpp
+++ b/opengl/tests/filter/filter.cpp
@@ -6,7 +6,7 @@
#include <GLES/glext.h>
#include <ui/FramebufferNativeWindow.h>
-#include <ui/EGLUtils.h>
+#include "EGLUtils.h"
using namespace android;
diff --git a/opengl/tests/finish/Android.mk b/opengl/tests/finish/Android.mk
index aa607c6..8f4f9c3 100644
--- a/opengl/tests/finish/Android.mk
+++ b/opengl/tests/finish/Android.mk
@@ -11,6 +11,8 @@
libGLESv1_CM \
libui
+LOCAL_C_INCLUDES += frameworks/base/opengl/tests/include
+
LOCAL_MODULE:= test-opengl-finish
LOCAL_MODULE_TAGS := optional
diff --git a/opengl/tests/finish/finish.cpp b/opengl/tests/finish/finish.cpp
index 91f5c45..11f0c22 100644
--- a/opengl/tests/finish/finish.cpp
+++ b/opengl/tests/finish/finish.cpp
@@ -27,7 +27,7 @@
#include <utils/Timers.h>
#include <ui/FramebufferNativeWindow.h>
-#include <ui/EGLUtils.h>
+#include "EGLUtils.h"
using namespace android;
diff --git a/opengl/tests/gl2_basic/Android.mk b/opengl/tests/gl2_basic/Android.mk
index a642eaf..07469a0 100644
--- a/opengl/tests/gl2_basic/Android.mk
+++ b/opengl/tests/gl2_basic/Android.mk
@@ -10,6 +10,8 @@
libGLESv2 \
libui
+LOCAL_C_INCLUDES += frameworks/base/opengl/tests/include
+
LOCAL_MODULE:= test-opengl-gl2_basic
LOCAL_MODULE_TAGS := optional
diff --git a/opengl/tests/gl2_basic/gl2_basic.cpp b/opengl/tests/gl2_basic/gl2_basic.cpp
index f274c7c..7007871 100644
--- a/opengl/tests/gl2_basic/gl2_basic.cpp
+++ b/opengl/tests/gl2_basic/gl2_basic.cpp
@@ -27,7 +27,7 @@
#include <utils/Timers.h>
#include <ui/FramebufferNativeWindow.h>
-#include <ui/EGLUtils.h>
+#include "EGLUtils.h"
using namespace android;
diff --git a/opengl/tests/gl2_copyTexImage/Android.mk b/opengl/tests/gl2_copyTexImage/Android.mk
index bef1f90..b616428 100644
--- a/opengl/tests/gl2_copyTexImage/Android.mk
+++ b/opengl/tests/gl2_copyTexImage/Android.mk
@@ -10,6 +10,8 @@
libGLESv2 \
libui
+LOCAL_C_INCLUDES += frameworks/base/opengl/tests/include
+
LOCAL_MODULE:= test-opengl-gl2_copyTexImage
LOCAL_MODULE_TAGS := optional
diff --git a/opengl/tests/gl2_copyTexImage/gl2_copyTexImage.cpp b/opengl/tests/gl2_copyTexImage/gl2_copyTexImage.cpp
index c2bfdec..988d7ac 100644
--- a/opengl/tests/gl2_copyTexImage/gl2_copyTexImage.cpp
+++ b/opengl/tests/gl2_copyTexImage/gl2_copyTexImage.cpp
@@ -27,7 +27,7 @@
#include <utils/Timers.h>
#include <ui/FramebufferNativeWindow.h>
-#include <ui/EGLUtils.h>
+#include "EGLUtils.h"
using namespace android;
diff --git a/opengl/tests/gl2_yuvtex/Android.mk b/opengl/tests/gl2_yuvtex/Android.mk
index 6304700..e36f319 100644
--- a/opengl/tests/gl2_yuvtex/Android.mk
+++ b/opengl/tests/gl2_yuvtex/Android.mk
@@ -10,6 +10,8 @@
libGLESv2 \
libui
+LOCAL_C_INCLUDES += frameworks/base/opengl/tests/include
+
LOCAL_MODULE:= test-opengl-gl2_yuvtex
LOCAL_MODULE_TAGS := optional
diff --git a/opengl/tests/gl2_yuvtex/gl2_yuvtex.cpp b/opengl/tests/gl2_yuvtex/gl2_yuvtex.cpp
index f0b8d12..d3e4932 100644
--- a/opengl/tests/gl2_yuvtex/gl2_yuvtex.cpp
+++ b/opengl/tests/gl2_yuvtex/gl2_yuvtex.cpp
@@ -29,7 +29,7 @@
#include <ui/FramebufferNativeWindow.h>
#include <ui/GraphicBuffer.h>
-#include <ui/EGLUtils.h>
+#include "EGLUtils.h"
using namespace android;
diff --git a/opengl/tests/gl_basic/Android.mk b/opengl/tests/gl_basic/Android.mk
index 6b6341f..2ba327b 100644
--- a/opengl/tests/gl_basic/Android.mk
+++ b/opengl/tests/gl_basic/Android.mk
@@ -10,6 +10,8 @@
libGLESv1_CM \
libui
+LOCAL_C_INCLUDES += frameworks/base/opengl/tests/include
+
LOCAL_MODULE:= test-opengl-gl_basic
LOCAL_MODULE_TAGS := optional
diff --git a/opengl/tests/gl_basic/gl_basic.cpp b/opengl/tests/gl_basic/gl_basic.cpp
index 0cc8398..23ce934 100644
--- a/opengl/tests/gl_basic/gl_basic.cpp
+++ b/opengl/tests/gl_basic/gl_basic.cpp
@@ -6,7 +6,7 @@
#include <GLES/glext.h>
#include <ui/FramebufferNativeWindow.h>
-#include <ui/EGLUtils.h>
+#include "EGLUtils.h"
#include <stdio.h>
diff --git a/opengl/tests/gl_perf/Android.mk b/opengl/tests/gl_perf/Android.mk
index 37647ca..f32abd3 100644
--- a/opengl/tests/gl_perf/Android.mk
+++ b/opengl/tests/gl_perf/Android.mk
@@ -11,6 +11,8 @@
libGLESv2 \
libui
+LOCAL_C_INCLUDES += frameworks/base/opengl/tests/include
+
LOCAL_MODULE:= test-opengl-gl2_perf
LOCAL_MODULE_TAGS := optional
diff --git a/opengl/tests/gl_perf/gl2_perf.cpp b/opengl/tests/gl_perf/gl2_perf.cpp
index 9dfcf1c..224acaf 100644
--- a/opengl/tests/gl_perf/gl2_perf.cpp
+++ b/opengl/tests/gl_perf/gl2_perf.cpp
@@ -27,7 +27,7 @@
#include <utils/Timers.h>
#include <ui/FramebufferNativeWindow.h>
-#include <ui/EGLUtils.h>
+#include "EGLUtils.h"
using namespace android;
diff --git a/opengl/tests/gl_yuvtex/Android.mk b/opengl/tests/gl_yuvtex/Android.mk
index a78db25..5b87f2e 100644
--- a/opengl/tests/gl_yuvtex/Android.mk
+++ b/opengl/tests/gl_yuvtex/Android.mk
@@ -10,6 +10,8 @@
libGLESv1_CM \
libui
+LOCAL_C_INCLUDES += frameworks/base/opengl/tests/include
+
LOCAL_MODULE:= test-opengl-gl_yuvtex
LOCAL_MODULE_TAGS := optional
diff --git a/opengl/tests/gl_yuvtex/gl_yuvtex.cpp b/opengl/tests/gl_yuvtex/gl_yuvtex.cpp
index fbe65f1..7a00f76 100644
--- a/opengl/tests/gl_yuvtex/gl_yuvtex.cpp
+++ b/opengl/tests/gl_yuvtex/gl_yuvtex.cpp
@@ -29,7 +29,7 @@
#include <ui/FramebufferNativeWindow.h>
#include <ui/GraphicBuffer.h>
-#include <ui/EGLUtils.h>
+#include "EGLUtils.h"
using namespace android;
diff --git a/opengl/tests/hwc/hwcColorEquiv.cpp b/opengl/tests/hwc/hwcColorEquiv.cpp
index 1d03948..bb305dc 100644
--- a/opengl/tests/hwc/hwcColorEquiv.cpp
+++ b/opengl/tests/hwc/hwcColorEquiv.cpp
@@ -87,7 +87,6 @@
#include <ui/FramebufferNativeWindow.h>
#include <ui/GraphicBuffer.h>
-#include <ui/EGLUtils.h>
#define LOG_TAG "hwcColorEquivTest"
#include <utils/Log.h>
diff --git a/opengl/tests/hwc/hwcCommit.cpp b/opengl/tests/hwc/hwcCommit.cpp
index 66ccdae..685dc5d 100644
--- a/opengl/tests/hwc/hwcCommit.cpp
+++ b/opengl/tests/hwc/hwcCommit.cpp
@@ -98,7 +98,6 @@
#include <ui/FramebufferNativeWindow.h>
#include <ui/GraphicBuffer.h>
-#include <ui/EGLUtils.h>
#define LOG_TAG "hwcCommitTest"
#include <utils/Log.h>
diff --git a/opengl/tests/hwc/hwcRects.cpp b/opengl/tests/hwc/hwcRects.cpp
index 523e3de..80cde23 100644
--- a/opengl/tests/hwc/hwcRects.cpp
+++ b/opengl/tests/hwc/hwcRects.cpp
@@ -106,7 +106,6 @@
#include <ui/FramebufferNativeWindow.h>
#include <ui/GraphicBuffer.h>
-#include <ui/EGLUtils.h>
#define LOG_TAG "hwcRectsTest"
#include <utils/Log.h>
diff --git a/opengl/tests/hwc/hwcStress.cpp b/opengl/tests/hwc/hwcStress.cpp
index 1cefb4b..7d7bc1f 100644
--- a/opengl/tests/hwc/hwcStress.cpp
+++ b/opengl/tests/hwc/hwcStress.cpp
@@ -103,7 +103,6 @@
#include <ui/FramebufferNativeWindow.h>
#include <ui/GraphicBuffer.h>
-#include <ui/EGLUtils.h>
#define LOG_TAG "hwcStressTest"
#include <utils/Log.h>
diff --git a/opengl/tests/hwc/hwcTestLib.cpp b/opengl/tests/hwc/hwcTestLib.cpp
index 925405e..63f42ba 100644
--- a/opengl/tests/hwc/hwcTestLib.cpp
+++ b/opengl/tests/hwc/hwcTestLib.cpp
@@ -27,6 +27,8 @@
#include <hwc/hwcTestLib.h>
+#include "EGLUtils.h"
+
// Defines
#define NUMA(a) (sizeof(a) / sizeof(a [0]))
diff --git a/opengl/tests/hwc/hwcTestLib.h b/opengl/tests/hwc/hwcTestLib.h
index 99ee608..b0c3012 100644
--- a/opengl/tests/hwc/hwcTestLib.h
+++ b/opengl/tests/hwc/hwcTestLib.h
@@ -29,7 +29,6 @@
#include <ui/FramebufferNativeWindow.h>
#include <ui/GraphicBuffer.h>
-#include <ui/EGLUtils.h>
#include <utils/Log.h>
#include <testUtil.h>
diff --git a/libs/ui/EGLUtils.cpp b/opengl/tests/include/EGLUtils.h
similarity index 82%
rename from libs/ui/EGLUtils.cpp
rename to opengl/tests/include/EGLUtils.h
index f24a71d..014c261 100644
--- a/libs/ui/EGLUtils.cpp
+++ b/opengl/tests/include/EGLUtils.h
@@ -15,21 +15,42 @@
*/
-#define LOG_TAG "EGLUtils"
+#ifndef ANDROID_UI_EGLUTILS_H
+#define ANDROID_UI_EGLUTILS_H
-#include <cutils/log.h>
+#include <stdint.h>
+#include <stdlib.h>
+
+#include <system/window.h>
#include <utils/Errors.h>
-
-#include <ui/EGLUtils.h>
-
#include <EGL/egl.h>
-#include <private/ui/android_natives_priv.h>
// ----------------------------------------------------------------------------
namespace android {
// ----------------------------------------------------------------------------
+class EGLUtils
+{
+public:
+
+ static inline const char *strerror(EGLint err);
+
+ static inline status_t selectConfigForPixelFormat(
+ EGLDisplay dpy,
+ EGLint const* attrs,
+ int32_t format,
+ EGLConfig* outConfig);
+
+ static inline status_t selectConfigForNativeWindow(
+ EGLDisplay dpy,
+ EGLint const* attrs,
+ EGLNativeWindowType window,
+ EGLConfig* outConfig);
+};
+
+// ----------------------------------------------------------------------------
+
const char *EGLUtils::strerror(EGLint err)
{
switch (err){
@@ -55,7 +76,7 @@
status_t EGLUtils::selectConfigForPixelFormat(
EGLDisplay dpy,
EGLint const* attrs,
- PixelFormat format,
+ int32_t format,
EGLConfig* outConfig)
{
EGLint numConfigs = -1, n=0;
@@ -65,7 +86,7 @@
if (outConfig == NULL)
return BAD_VALUE;
-
+
// Get all the "potential match" configs...
if (eglGetConfigs(dpy, NULL, 0, &numConfigs) == EGL_FALSE)
return BAD_VALUE;
@@ -75,7 +96,7 @@
free(configs);
return BAD_VALUE;
}
-
+
int i;
EGLConfig config = NULL;
for (i=0 ; i<n ; i++) {
@@ -88,7 +109,7 @@
}
free(configs);
-
+
if (i<n) {
*outConfig = config;
return NO_ERROR;
@@ -105,10 +126,10 @@
{
int err;
int format;
-
+
if (!window)
return BAD_VALUE;
-
+
if ((err = window->query(window, NATIVE_WINDOW_FORMAT, &format)) < 0) {
return err;
}
@@ -119,3 +140,5 @@
// ----------------------------------------------------------------------------
}; // namespace android
// ----------------------------------------------------------------------------
+
+#endif /* ANDROID_UI_EGLUTILS_H */
diff --git a/opengl/tests/include/glTestLib.h b/opengl/tests/include/glTestLib.h
index 06fbf5d..c91c594 100644
--- a/opengl/tests/include/glTestLib.h
+++ b/opengl/tests/include/glTestLib.h
@@ -24,9 +24,7 @@
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
-//#include <ui/FramebufferNativeWindow.h>
-//#include <ui/GraphicBuffer.h>
-#include <ui/EGLUtils.h>
+#include "EGLUtils.h"
void glTestPrintGLString(const char *name, GLenum s);
void glTestCheckEglError(const char* op, EGLBoolean returnVal = EGL_TRUE);
diff --git a/opengl/tests/lib/glTestLib.cpp b/opengl/tests/lib/glTestLib.cpp
index 052cbd7..b434fc7 100644
--- a/opengl/tests/lib/glTestLib.cpp
+++ b/opengl/tests/lib/glTestLib.cpp
@@ -26,7 +26,7 @@
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
-#include <ui/EGLUtils.h>
+#include "EGLUtils.h"
#include <utils/Log.h>
#include <testUtil.h>
diff --git a/opengl/tests/linetex/Android.mk b/opengl/tests/linetex/Android.mk
index 6ff248d..261940e 100644
--- a/opengl/tests/linetex/Android.mk
+++ b/opengl/tests/linetex/Android.mk
@@ -10,6 +10,8 @@
libGLESv1_CM \
libui
+LOCAL_C_INCLUDES += frameworks/base/opengl/tests/include
+
LOCAL_MODULE:= test-opengl-linetex
LOCAL_MODULE_TAGS := optional
diff --git a/opengl/tests/linetex/linetex.cpp b/opengl/tests/linetex/linetex.cpp
index 6842940..8669492 100644
--- a/opengl/tests/linetex/linetex.cpp
+++ b/opengl/tests/linetex/linetex.cpp
@@ -27,7 +27,7 @@
#include <utils/StopWatch.h>
#include <ui/FramebufferNativeWindow.h>
-#include <ui/EGLUtils.h>
+#include "EGLUtils.h"
using namespace android;
diff --git a/opengl/tests/swapinterval/Android.mk b/opengl/tests/swapinterval/Android.mk
index 9a4145e..d014cc9 100644
--- a/opengl/tests/swapinterval/Android.mk
+++ b/opengl/tests/swapinterval/Android.mk
@@ -11,6 +11,8 @@
libGLESv1_CM \
libui
+LOCAL_C_INCLUDES += frameworks/base/opengl/tests/include
+
LOCAL_MODULE:= test-opengl-swapinterval
LOCAL_MODULE_TAGS := optional
diff --git a/opengl/tests/swapinterval/swapinterval.cpp b/opengl/tests/swapinterval/swapinterval.cpp
index 8ca031b..a0f4bc4 100644
--- a/opengl/tests/swapinterval/swapinterval.cpp
+++ b/opengl/tests/swapinterval/swapinterval.cpp
@@ -24,7 +24,7 @@
#include <utils/StopWatch.h>
#include <ui/FramebufferNativeWindow.h>
-#include <ui/EGLUtils.h>
+#include "EGLUtils.h"
using namespace android;
diff --git a/opengl/tests/textures/Android.mk b/opengl/tests/textures/Android.mk
index b2fa185..fe9f43c 100644
--- a/opengl/tests/textures/Android.mk
+++ b/opengl/tests/textures/Android.mk
@@ -10,6 +10,8 @@
libGLESv1_CM \
libui
+LOCAL_C_INCLUDES += frameworks/base/opengl/tests/include
+
LOCAL_MODULE:= test-opengl-textures
LOCAL_MODULE_TAGS := optional
diff --git a/opengl/tests/textures/textures.cpp b/opengl/tests/textures/textures.cpp
index cbe8ffd..5d3d94e 100644
--- a/opengl/tests/textures/textures.cpp
+++ b/opengl/tests/textures/textures.cpp
@@ -23,7 +23,7 @@
#include <GLES/glext.h>
#include <ui/FramebufferNativeWindow.h>
-#include <ui/EGLUtils.h>
+#include "EGLUtils.h"
using namespace android;
diff --git a/opengl/tests/tritex/Android.mk b/opengl/tests/tritex/Android.mk
index 6db3f49..fc544e4 100644
--- a/opengl/tests/tritex/Android.mk
+++ b/opengl/tests/tritex/Android.mk
@@ -10,6 +10,8 @@
libGLESv1_CM \
libui
+LOCAL_C_INCLUDES += frameworks/base/opengl/tests/include
+
LOCAL_MODULE:= test-opengl-tritex
LOCAL_MODULE_TAGS := optional
diff --git a/opengl/tests/tritex/tritex.cpp b/opengl/tests/tritex/tritex.cpp
index 3365ab4..f183483 100644
--- a/opengl/tests/tritex/tritex.cpp
+++ b/opengl/tests/tritex/tritex.cpp
@@ -9,7 +9,7 @@
#include <GLES/glext.h>
#include <ui/FramebufferNativeWindow.h>
-#include <ui/EGLUtils.h>
+#include "EGLUtils.h"
#include <stdio.h>
#include <stdlib.h>
diff --git a/services/surfaceflinger/DisplayHardware/DisplayHardware.cpp b/services/surfaceflinger/DisplayHardware/DisplayHardware.cpp
index 986aec5..9baae80 100644
--- a/services/surfaceflinger/DisplayHardware/DisplayHardware.cpp
+++ b/services/surfaceflinger/DisplayHardware/DisplayHardware.cpp
@@ -26,14 +26,11 @@
#include <ui/PixelFormat.h>
#include <ui/FramebufferNativeWindow.h>
-#include <ui/EGLUtils.h>
#include <GLES/gl.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
-#include <pixelflinger/pixelflinger.h>
-
#include "DisplayHardware/DisplayHardware.h"
#include <hardware/gralloc.h>
@@ -60,6 +57,29 @@
static __attribute__((noinline))
void checkEGLErrors(const char* token)
{
+ struct EGLUtils {
+ static const char *strerror(EGLint err) {
+ switch (err){
+ case EGL_SUCCESS: return "EGL_SUCCESS";
+ case EGL_NOT_INITIALIZED: return "EGL_NOT_INITIALIZED";
+ case EGL_BAD_ACCESS: return "EGL_BAD_ACCESS";
+ case EGL_BAD_ALLOC: return "EGL_BAD_ALLOC";
+ case EGL_BAD_ATTRIBUTE: return "EGL_BAD_ATTRIBUTE";
+ case EGL_BAD_CONFIG: return "EGL_BAD_CONFIG";
+ case EGL_BAD_CONTEXT: return "EGL_BAD_CONTEXT";
+ case EGL_BAD_CURRENT_SURFACE: return "EGL_BAD_CURRENT_SURFACE";
+ case EGL_BAD_DISPLAY: return "EGL_BAD_DISPLAY";
+ case EGL_BAD_MATCH: return "EGL_BAD_MATCH";
+ case EGL_BAD_NATIVE_PIXMAP: return "EGL_BAD_NATIVE_PIXMAP";
+ case EGL_BAD_NATIVE_WINDOW: return "EGL_BAD_NATIVE_WINDOW";
+ case EGL_BAD_PARAMETER: return "EGL_BAD_PARAMETER";
+ case EGL_BAD_SURFACE: return "EGL_BAD_SURFACE";
+ case EGL_CONTEXT_LOST: return "EGL_CONTEXT_LOST";
+ default: return "UNKNOWN";
+ }
+ }
+ };
+
EGLint error = eglGetError();
if (error && error != EGL_SUCCESS) {
ALOGE("%s: EGL error 0x%04x (%s)",
diff --git a/services/surfaceflinger/DisplayHardware/DisplayHardware.h b/services/surfaceflinger/DisplayHardware/DisplayHardware.h
index 02be4dc..0a828b3 100644
--- a/services/surfaceflinger/DisplayHardware/DisplayHardware.h
+++ b/services/surfaceflinger/DisplayHardware/DisplayHardware.h
@@ -27,8 +27,6 @@
#include <EGL/egl.h>
#include <EGL/eglext.h>
-#include <pixelflinger/pixelflinger.h>
-
#include "GLExtensions.h"
#include "DisplayHardware/DisplayHardwareBase.h"
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index 3e6b872..df7fe5c 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -14,9 +14,12 @@
* limitations under the License.
*/
+#define ATRACE_TAG ATRACE_TAG_GRAPHICS
+
#include <stdlib.h>
#include <stdint.h>
#include <sys/types.h>
+#include <math.h>
#include <cutils/compiler.h>
#include <cutils/native_handle.h>
@@ -25,11 +28,12 @@
#include <utils/Errors.h>
#include <utils/Log.h>
#include <utils/StopWatch.h>
+#include <utils/Trace.h>
#include <ui/GraphicBuffer.h>
#include <ui/PixelFormat.h>
-#include <surfaceflinger/Surface.h>
+#include <gui/Surface.h>
#include "clz.h"
#include "DisplayHardware/DisplayHardware.h"
@@ -38,11 +42,9 @@
#include "Layer.h"
#include "SurfaceFlinger.h"
#include "SurfaceTextureLayer.h"
-#include <math.h>
#define DEBUG_RESIZE 0
-
namespace android {
// ---------------------------------------------------------------------------
@@ -55,7 +57,7 @@
mCurrentTransform(0),
mCurrentScalingMode(NATIVE_WINDOW_SCALING_MODE_FREEZE),
mCurrentOpacity(true),
- mRefreshPending(0),
+ mRefreshPending(false),
mFrameLatencyNeeded(false),
mFrameLatencyOffset(0),
mFormat(PIXEL_FORMAT_NONE),
@@ -161,7 +163,10 @@
// this surfaces pixel format
PixelFormatInfo info;
status_t err = getPixelFormatInfo(format, &info);
- if (err) return err;
+ if (err) {
+ ALOGE("unsupported pixelformat %d", format);
+ return err;
+ }
// the display's pixel format
const DisplayHardware& hw(graphicPlane(0).displayHardware());
@@ -171,6 +176,7 @@
// never allow a surface larger than what our underlying GL implementation
// can handle.
if ((uint32_t(w)>maxSurfaceDims) || (uint32_t(h)>maxSurfaceDims)) {
+ ALOGE("dimensions too large %u x %u", uint32_t(w), uint32_t(h));
return BAD_VALUE;
}
@@ -264,6 +270,8 @@
void Layer::onDraw(const Region& clip) const
{
+ ATRACE_CALL();
+
if (CC_UNLIKELY(mActiveBuffer == 0)) {
// the texture has not been created yet, this Layer has
// in fact never been drawn into. This happens frequently with
@@ -362,6 +370,8 @@
uint32_t Layer::doTransaction(uint32_t flags)
{
+ ATRACE_CALL();
+
const Layer::State& front(drawingState());
const Layer::State& temp(currentState());
@@ -408,19 +418,15 @@
// pageflip handling...
// ----------------------------------------------------------------------------
-bool Layer::onPreComposition()
-{
- // if there was more than one pending update, request a refresh
- if (mRefreshPending >= 2) {
- mRefreshPending = 0;
- return true;
- }
- mRefreshPending = 0;
- return false;
+bool Layer::onPreComposition() {
+ mRefreshPending = false;
+ return mQueuedFrames > 0;
}
void Layer::lockPageFlip(bool& recomputeVisibleRegions)
{
+ ATRACE_CALL();
+
if (mQueuedFrames > 0) {
// if we've already called updateTexImage() without going through
@@ -428,9 +434,11 @@
// because we cannot call updateTeximage() without a corresponding
// compositionComplete() call.
// we'll trigger an update in onPreComposition().
- if (mRefreshPending++) {
+ if (mRefreshPending) {
+ mPostedDirtyRegion.clear();
return;
}
+ mRefreshPending = true;
// Capture the old state of the layer for comparisons later
const bool oldOpacity = isOpaque();
@@ -451,6 +459,12 @@
mActiveBuffer = mSurfaceTexture->getCurrentBuffer();
mFrameLatencyNeeded = true;
+ if (oldActiveBuffer == NULL && mActiveBuffer != NULL) {
+ // the first time we receive a buffer, we need to trigger a
+ // geometry invalidation.
+ mFlinger->invalidateHwcGeometry();
+ }
+
const Rect crop(mSurfaceTexture->getCurrentCrop());
const uint32_t transform(mSurfaceTexture->getCurrentTransform());
const uint32_t scalingMode(mSurfaceTexture->getCurrentScalingMode());
@@ -541,25 +555,25 @@
void Layer::unlockPageFlip(
const Transform& planeTransform, Region& outDirtyRegion)
{
- if (mRefreshPending >= 2) {
- return;
- }
+ ATRACE_CALL();
- Region dirtyRegion(mPostedDirtyRegion);
- if (!dirtyRegion.isEmpty()) {
+ Region postedRegion(mPostedDirtyRegion);
+ if (!postedRegion.isEmpty()) {
mPostedDirtyRegion.clear();
- // The dirty region is given in the layer's coordinate space
- // transform the dirty region by the surface's transformation
- // and the global transformation.
- const Layer::State& s(drawingState());
- const Transform tr(planeTransform * s.transform);
- dirtyRegion = tr.transform(dirtyRegion);
+ if (!visibleRegionScreen.isEmpty()) {
+ // The dirty region is given in the layer's coordinate space
+ // transform the dirty region by the surface's transformation
+ // and the global transformation.
+ const Layer::State& s(drawingState());
+ const Transform tr(planeTransform * s.transform);
+ postedRegion = tr.transform(postedRegion);
- // At this point, the dirty region is in screen space.
- // Make sure it's constrained by the visible region (which
- // is in screen space as well).
- dirtyRegion.andSelf(visibleRegionScreen);
- outDirtyRegion.orSelf(dirtyRegion);
+ // At this point, the dirty region is in screen space.
+ // Make sure it's constrained by the visible region (which
+ // is in screen space as well).
+ postedRegion.andSelf(visibleRegionScreen);
+ outDirtyRegion.orSelf(postedRegion);
+ }
}
}
diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h
index bf30608..8d508c2 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -22,10 +22,13 @@
#include <gui/SurfaceTexture.h>
-#include <pixelflinger/pixelflinger.h>
+#include <utils/Timers.h>
+
#include <ui/GraphicBuffer.h>
#include <ui/PixelFormat.h>
+#include <gui/ISurfaceComposerClient.h>
+
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <GLES/gl.h>
@@ -34,7 +37,6 @@
#include "LayerBase.h"
#include "SurfaceTextureLayer.h"
#include "Transform.h"
-#include <utils/Timers.h>
namespace android {
@@ -116,7 +118,7 @@
uint32_t mCurrentTransform;
uint32_t mCurrentScalingMode;
bool mCurrentOpacity;
- size_t mRefreshPending;
+ bool mRefreshPending;
bool mFrameLatencyNeeded;
int mFrameLatencyOffset;
diff --git a/services/surfaceflinger/LayerBase.h b/services/surfaceflinger/LayerBase.h
index b8f7680..cd6efdd 100644
--- a/services/surfaceflinger/LayerBase.h
+++ b/services/surfaceflinger/LayerBase.h
@@ -28,10 +28,9 @@
#include <ui/Region.h>
-#include <surfaceflinger/ISurfaceComposerClient.h>
-#include <private/surfaceflinger/LayerState.h>
+#include <gui/ISurfaceComposerClient.h>
-#include <pixelflinger/pixelflinger.h>
+#include <private/gui/LayerState.h>
#include <hardware/hwcomposer.h>
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 9e3f548..42ed4fa 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+#define ATRACE_TAG ATRACE_TAG_GRAPHICS
+
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
@@ -39,18 +41,18 @@
#include <utils/String8.h>
#include <utils/String16.h>
#include <utils/StopWatch.h>
+#include <utils/Trace.h>
#include <ui/GraphicBufferAllocator.h>
#include <ui/PixelFormat.h>
-#include <pixelflinger/pixelflinger.h>
#include <GLES/gl.h>
#include "clz.h"
+#include "DdmConnection.h"
#include "DisplayEventConnection.h"
#include "EventThread.h"
#include "GLExtensions.h"
-#include "DdmConnection.h"
#include "Layer.h"
#include "LayerDim.h"
#include "LayerScreenshot.h"
@@ -60,7 +62,7 @@
#include "DisplayHardware/HWComposer.h"
#include <private/android_filesystem_config.h>
-#include <private/surfaceflinger/SharedBufferStack.h>
+#include <private/gui/SharedBufferStack.h>
#define EGL_VERSION_HW_ANDROID 0x3143
@@ -403,6 +405,7 @@
void SurfaceFlinger::onMessageReceived(int32_t what)
{
+ ATRACE_CALL();
switch (what) {
case MessageQueue::REFRESH: {
// case MessageQueue::INVALIDATE: {
@@ -738,6 +741,7 @@
void SurfaceFlinger::handlePageFlip()
{
+ ATRACE_CALL();
const DisplayHardware& hw = graphicPlane(0).displayHardware();
const Region screenRegion(hw.bounds());
@@ -1000,6 +1004,12 @@
drawWormhole();
}
+ // FIXME: workaroud for b/6020860
+ glEnable(GL_SCISSOR_TEST);
+ glScissor(0,0,0,0);
+ glClear(GL_COLOR_BUFFER_BIT);
+ // end-workaround
+
/*
* and then, render the layers targeted at the framebuffer
*/
@@ -1279,7 +1289,7 @@
return surfaceHandle;
}
- //ALOGD("createSurface for pid %d (%d x %d)", pid, w, h);
+ //ALOGD("createSurface for (%d x %d), name=%s", w, h, name.string());
sp<Layer> normalLayer;
switch (flags & eFXSurfaceMask) {
case eFXSurfaceNormal:
@@ -1776,6 +1786,10 @@
setTransactionFlags(eTransactionNeeded|eTraversalNeeded);
return NO_ERROR;
}
+ case 1006:{ // send empty update
+ signalRefresh();
+ return NO_ERROR;
+ }
case 1008: // toggle use of hw composer
n = data.readInt32();
mDebugDisableHWC = n ? 1 : 0;
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index fcd9361..b507877 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -33,9 +33,9 @@
#include <binder/IMemory.h>
#include <ui/PixelFormat.h>
-#include <surfaceflinger/IGraphicBufferAlloc.h>
-#include <surfaceflinger/ISurfaceComposer.h>
-#include <surfaceflinger/ISurfaceComposerClient.h>
+#include <gui/IGraphicBufferAlloc.h>
+#include <gui/ISurfaceComposer.h>
+#include <gui/ISurfaceComposerClient.h>
#include "Barrier.h"
#include "Layer.h"
diff --git a/services/surfaceflinger/tests/Transaction_test.cpp b/services/surfaceflinger/tests/Transaction_test.cpp
index 396a3fd..84ae0d9 100644
--- a/services/surfaceflinger/tests/Transaction_test.cpp
+++ b/services/surfaceflinger/tests/Transaction_test.cpp
@@ -17,9 +17,12 @@
#include <gtest/gtest.h>
#include <binder/IMemory.h>
-#include <surfaceflinger/ISurfaceComposer.h>
-#include <surfaceflinger/Surface.h>
-#include <surfaceflinger/SurfaceComposerClient.h>
+
+#include <gui/ISurfaceComposer.h>
+#include <gui/Surface.h>
+#include <gui/SurfaceComposerClient.h>
+#include <private/gui/ComposerService.h>
+
#include <utils/String8.h>
namespace android {
diff --git a/services/surfaceflinger/tests/resize/resize.cpp b/services/surfaceflinger/tests/resize/resize.cpp
index 7f3f064..c143b3d 100644
--- a/services/surfaceflinger/tests/resize/resize.cpp
+++ b/services/surfaceflinger/tests/resize/resize.cpp
@@ -22,9 +22,8 @@
#include <binder/ProcessState.h>
#include <binder/IServiceManager.h>
-#include <surfaceflinger/Surface.h>
-#include <surfaceflinger/ISurface.h>
-#include <surfaceflinger/SurfaceComposerClient.h>
+#include <gui/Surface.h>
+#include <gui/SurfaceComposerClient.h>
using namespace android;
diff --git a/services/surfaceflinger/tests/screencap/screencap.cpp b/services/surfaceflinger/tests/screencap/screencap.cpp
index 6cf1504..53566e0 100644
--- a/services/surfaceflinger/tests/screencap/screencap.cpp
+++ b/services/surfaceflinger/tests/screencap/screencap.cpp
@@ -21,7 +21,7 @@
#include <binder/IServiceManager.h>
#include <binder/IMemory.h>
-#include <surfaceflinger/ISurfaceComposer.h>
+#include <gui/ISurfaceComposer.h>
#include <SkImageEncoder.h>
#include <SkBitmap.h>
diff --git a/services/surfaceflinger/tests/surface/surface.cpp b/services/surfaceflinger/tests/surface/surface.cpp
index 9c15f9b..a8878f7 100644
--- a/services/surfaceflinger/tests/surface/surface.cpp
+++ b/services/surfaceflinger/tests/surface/surface.cpp
@@ -22,9 +22,8 @@
#include <binder/ProcessState.h>
#include <binder/IServiceManager.h>
-#include <surfaceflinger/Surface.h>
-#include <surfaceflinger/ISurface.h>
-#include <surfaceflinger/SurfaceComposerClient.h>
+#include <gui/Surface.h>
+#include <gui/SurfaceComposerClient.h>
using namespace android;