renderControl_enc: rename rcMapGpaToColorBuffer to rcMapGpaToBufferHandle
We rename
int32_t rcMapGpaToColorBuffer(uint32_t colorBuffer, uint64_t gpa);
to
int32_t rcMapGpaToBufferHandle(uint32_t bufferHandle, uint64_t gpa);
so that the method becomes available to both color buffers and
data buffers.
This is the guest-side change for the method renaming. Currently
there is no clients using this method, and the function signature
doesn't change, so it's safe to rename.
Change-Id: Ie6b33429719157a04e10abf8ecad9be7acdae65c
diff --git a/system/renderControl_enc/renderControl_client_context.cpp b/system/renderControl_enc/renderControl_client_context.cpp
index 61dda7c..34e973d 100644
--- a/system/renderControl_enc/renderControl_client_context.cpp
+++ b/system/renderControl_enc/renderControl_client_context.cpp
@@ -62,7 +62,7 @@
rcCreateBuffer = (rcCreateBuffer_client_proc_t) getProc("rcCreateBuffer", userData);
rcCloseBuffer = (rcCloseBuffer_client_proc_t) getProc("rcCloseBuffer", userData);
rcSetColorBufferVulkanMode2 = (rcSetColorBufferVulkanMode2_client_proc_t) getProc("rcSetColorBufferVulkanMode2", userData);
- rcMapGpaToColorBuffer = (rcMapGpaToColorBuffer_client_proc_t) getProc("rcMapGpaToColorBuffer", userData);
+ rcMapGpaToBufferHandle = (rcMapGpaToBufferHandle_client_proc_t) getProc("rcMapGpaToBufferHandle", userData);
return 0;
}
diff --git a/system/renderControl_enc/renderControl_client_context.h b/system/renderControl_enc/renderControl_client_context.h
index acf79cd..62518fc 100644
--- a/system/renderControl_enc/renderControl_client_context.h
+++ b/system/renderControl_enc/renderControl_client_context.h
@@ -62,7 +62,7 @@
rcCreateBuffer_client_proc_t rcCreateBuffer;
rcCloseBuffer_client_proc_t rcCloseBuffer;
rcSetColorBufferVulkanMode2_client_proc_t rcSetColorBufferVulkanMode2;
- rcMapGpaToColorBuffer_client_proc_t rcMapGpaToColorBuffer;
+ rcMapGpaToBufferHandle_client_proc_t rcMapGpaToBufferHandle;
virtual ~renderControl_client_context_t() {}
typedef renderControl_client_context_t *CONTEXT_ACCESSOR_TYPE(void);
diff --git a/system/renderControl_enc/renderControl_client_proc.h b/system/renderControl_enc/renderControl_client_proc.h
index 19ae22d..a303e36 100644
--- a/system/renderControl_enc/renderControl_client_proc.h
+++ b/system/renderControl_enc/renderControl_client_proc.h
@@ -64,7 +64,7 @@
typedef uint32_t (renderControl_APIENTRY *rcCreateBuffer_client_proc_t) (void * ctx, uint32_t);
typedef void (renderControl_APIENTRY *rcCloseBuffer_client_proc_t) (void * ctx, uint32_t);
typedef GLint (renderControl_APIENTRY *rcSetColorBufferVulkanMode2_client_proc_t) (void * ctx, uint32_t, uint32_t, uint32_t);
-typedef int (renderControl_APIENTRY *rcMapGpaToColorBuffer_client_proc_t) (void * ctx, uint32_t, uint64_t);
+typedef int (renderControl_APIENTRY *rcMapGpaToBufferHandle_client_proc_t) (void * ctx, uint32_t, uint64_t);
#endif
diff --git a/system/renderControl_enc/renderControl_enc.cpp b/system/renderControl_enc/renderControl_enc.cpp
index 6f1a33f..fbcbd29 100644
--- a/system/renderControl_enc/renderControl_enc.cpp
+++ b/system/renderControl_enc/renderControl_enc.cpp
@@ -2008,7 +2008,7 @@
return retval;
}
-int rcMapGpaToColorBuffer_enc(void *self , uint32_t colorBuffer, uint64_t gpa)
+int rcMapGpaToBufferHandle_enc(void *self , uint32_t bufferHandle, uint64_t gpa)
{
renderControl_encoder_context_t *ctx = (renderControl_encoder_context_t *)self;
@@ -2023,10 +2023,10 @@
const size_t totalSize = sizeWithoutChecksum + checksumSize;
buf = stream->alloc(totalSize);
ptr = buf;
- int tmp = OP_rcMapGpaToColorBuffer;memcpy(ptr, &tmp, 4); ptr += 4;
+ int tmp = OP_rcMapGpaToBufferHandle;memcpy(ptr, &tmp, 4); ptr += 4;
memcpy(ptr, &totalSize, 4); ptr += 4;
- memcpy(ptr, &colorBuffer, 4); ptr += 4;
+ memcpy(ptr, &bufferHandle, 4); ptr += 4;
memcpy(ptr, &gpa, 8); ptr += 8;
if (useChecksum) checksumCalculator->addBuffer(buf, ptr-buf);
@@ -2042,7 +2042,7 @@
if (checksumSize > 0) checksumBufPtr = &checksumBuf[0];
stream->readback(checksumBufPtr, checksumSize);
if (!checksumCalculator->validate(checksumBufPtr, checksumSize)) {
- ALOGE("rcMapGpaToColorBuffer: GL communication error, please report this issue to b.android.com.\n");
+ ALOGE("rcMapGpaToBufferHandle: GL communication error, please report this issue to b.android.com.\n");
abort();
}
}
@@ -2108,6 +2108,6 @@
this->rcCreateBuffer = &rcCreateBuffer_enc;
this->rcCloseBuffer = &rcCloseBuffer_enc;
this->rcSetColorBufferVulkanMode2 = &rcSetColorBufferVulkanMode2_enc;
- this->rcMapGpaToColorBuffer = &rcMapGpaToColorBuffer_enc;
+ this->rcMapGpaToBufferHandle = &rcMapGpaToBufferHandle_enc;
}
diff --git a/system/renderControl_enc/renderControl_entry.cpp b/system/renderControl_enc/renderControl_entry.cpp
index 0500bf2..2d38bc1 100644
--- a/system/renderControl_enc/renderControl_entry.cpp
+++ b/system/renderControl_enc/renderControl_entry.cpp
@@ -57,7 +57,7 @@
uint32_t rcCreateBuffer(uint32_t size);
void rcCloseBuffer(uint32_t buffer);
GLint rcSetColorBufferVulkanMode2(uint32_t colorBuffer, uint32_t mode, uint32_t memoryProperty);
- int rcMapGpaToColorBuffer(uint32_t colorBuffer, uint64_t gpa);
+ int rcMapGpaToBufferHandle(uint32_t bufferHandle, uint64_t gpa);
};
#ifndef GET_CONTEXT
@@ -378,9 +378,9 @@
return ctx->rcSetColorBufferVulkanMode2(ctx, colorBuffer, mode, memoryProperty);
}
-int rcMapGpaToColorBuffer(uint32_t colorBuffer, uint64_t gpa)
+int rcMapGpaToBufferHandle(uint32_t bufferHandle, uint64_t gpa)
{
GET_CONTEXT;
- return ctx->rcMapGpaToColorBuffer(ctx, colorBuffer, gpa);
+ return ctx->rcMapGpaToBufferHandle(ctx, bufferHandle, gpa);
}
diff --git a/system/renderControl_enc/renderControl_ftable.h b/system/renderControl_enc/renderControl_ftable.h
index 9ab9148..d41bd63 100644
--- a/system/renderControl_enc/renderControl_ftable.h
+++ b/system/renderControl_enc/renderControl_ftable.h
@@ -60,7 +60,7 @@
{"rcCreateBuffer", (void*)rcCreateBuffer},
{"rcCloseBuffer", (void*)rcCloseBuffer},
{"rcSetColorBufferVulkanMode2", (void*)rcSetColorBufferVulkanMode2},
- {"rcMapGpaToColorBuffer", (void*)rcMapGpaToColorBuffer},
+ {"rcMapGpaToBufferHandle", (void*)rcMapGpaToBufferHandle},
};
static const int renderControl_num_funcs = sizeof(renderControl_funcs_by_name) / sizeof(struct _renderControl_funcs_by_name);
diff --git a/system/renderControl_enc/renderControl_opcodes.h b/system/renderControl_enc/renderControl_opcodes.h
index 7c66651..df1803a 100644
--- a/system/renderControl_enc/renderControl_opcodes.h
+++ b/system/renderControl_enc/renderControl_opcodes.h
@@ -55,7 +55,7 @@
#define OP_rcCreateBuffer 10049
#define OP_rcCloseBuffer 10050
#define OP_rcSetColorBufferVulkanMode2 10051
-#define OP_rcMapGpaToColorBuffer 10052
+#define OP_rcMapGpaToBufferHandle 10052
#define OP_last 10053