summaryrefslogtreecommitdiff
path: root/chromium/plat_support
diff options
context:
space:
mode:
authorRoss McIlroy <rmcilroy@google.com>2014-03-24 15:56:14 +0000
committerBen Murdoch <benm@google.com>2014-03-25 16:49:54 +0000
commit2ddcc98cb29e567ea545b3eba2fedc576d1f5365 (patch)
treee5c8bd1f126737df5fd0887911d76ce192cdcbf5 /chromium/plat_support
parent3579d6fb5d979d2d03a6250e82c37d81d672291e (diff)
downloadwebview-2ddcc98cb29e567ea545b3eba2fedc576d1f5365.tar.gz
Convert jint to jlong for native pointers in GLFunctionTable to support 64 b
Corresponding Chromium change is: https://codereview.chromium.org/210023002 Change-Id: Ibe1b1bcbecb3257edbbd5bfee1b5b7da4505f5de Signed-off-by: Ross McIlroy <rmcilroy@google.com>
Diffstat (limited to 'chromium/plat_support')
-rw-r--r--chromium/plat_support/graphic_buffer_impl.cpp14
-rw-r--r--chromium/plat_support/graphic_buffer_impl.h12
-rw-r--r--chromium/plat_support/graphics_utils.cpp8
3 files changed, 17 insertions, 17 deletions
diff --git a/chromium/plat_support/graphic_buffer_impl.cpp b/chromium/plat_support/graphic_buffer_impl.cpp
index bfa91a2..4426778 100644
--- a/chromium/plat_support/graphic_buffer_impl.cpp
+++ b/chromium/plat_support/graphic_buffer_impl.cpp
@@ -34,42 +34,42 @@ GraphicBufferImpl::~GraphicBufferImpl() {
}
// static
-int GraphicBufferImpl::Create(int w, int h) {
+long GraphicBufferImpl::Create(int w, int h) {
GraphicBufferImpl* buffer = new GraphicBufferImpl(
static_cast<uint32_t>(w), static_cast<uint32_t>(h));
if (buffer->InitCheck() != NO_ERROR) {
delete buffer;
return 0;
}
- return reinterpret_cast<int>(buffer);
+ return reinterpret_cast<intptr_t>(buffer);
}
// static
-void GraphicBufferImpl::Release(int buffer_id) {
+void GraphicBufferImpl::Release(long buffer_id) {
GraphicBufferImpl* buffer = reinterpret_cast<GraphicBufferImpl*>(buffer_id);
delete buffer;
}
// static
-int GraphicBufferImpl::MapStatic(int buffer_id, AwMapMode mode, void** vaddr) {
+int GraphicBufferImpl::MapStatic(long buffer_id, AwMapMode mode, void** vaddr) {
GraphicBufferImpl* buffer = reinterpret_cast<GraphicBufferImpl*>(buffer_id);
return buffer->Map(mode, vaddr);
}
// static
-int GraphicBufferImpl::UnmapStatic(int buffer_id) {
+int GraphicBufferImpl::UnmapStatic(long buffer_id) {
GraphicBufferImpl* buffer = reinterpret_cast<GraphicBufferImpl*>(buffer_id);
return buffer->Unmap();
}
// static
-void* GraphicBufferImpl::GetNativeBufferStatic(int buffer_id) {
+void* GraphicBufferImpl::GetNativeBufferStatic(long buffer_id) {
GraphicBufferImpl* buffer = reinterpret_cast<GraphicBufferImpl*>(buffer_id);
return buffer->GetNativeBuffer();
}
// static
-uint32_t GraphicBufferImpl::GetStrideStatic(int buffer_id) {
+uint32_t GraphicBufferImpl::GetStrideStatic(long buffer_id) {
GraphicBufferImpl* buffer = reinterpret_cast<GraphicBufferImpl*>(buffer_id);
return buffer->GetStride();
}
diff --git a/chromium/plat_support/graphic_buffer_impl.h b/chromium/plat_support/graphic_buffer_impl.h
index 13b806e..5d5da12 100644
--- a/chromium/plat_support/graphic_buffer_impl.h
+++ b/chromium/plat_support/graphic_buffer_impl.h
@@ -30,12 +30,12 @@ class GraphicBufferImpl {
public:
~GraphicBufferImpl();
- static int Create(int w, int h);
- static void Release(int buffer_id);
- static int MapStatic(int buffer_id, AwMapMode mode, void** vaddr);
- static int UnmapStatic(int buffer_id);
- static void* GetNativeBufferStatic(int buffer_id);
- static uint32_t GetStrideStatic(int buffer_id);
+ static long Create(int w, int h);
+ static void Release(long buffer_id);
+ static int MapStatic(long buffer_id, AwMapMode mode, void** vaddr);
+ static int UnmapStatic(long buffer_id);
+ static void* GetNativeBufferStatic(long buffer_id);
+ static uint32_t GetStrideStatic(long buffer_id);
private:
status_t Map(AwMapMode mode, void** vaddr);
diff --git a/chromium/plat_support/graphics_utils.cpp b/chromium/plat_support/graphics_utils.cpp
index 9b6758f..7a843e8 100644
--- a/chromium/plat_support/graphics_utils.cpp
+++ b/chromium/plat_support/graphics_utils.cpp
@@ -81,15 +81,15 @@ void ReleasePixels(AwPixelInfo* pixels) {
delete static_cast<PixelInfo*>(pixels);
}
-jint GetDrawSWFunctionTable(JNIEnv* env, jclass) {
+jlong GetDrawSWFunctionTable(JNIEnv* env, jclass) {
static const AwDrawSWFunctionTable function_table = {
&GetPixels,
&ReleasePixels,
};
- return reinterpret_cast<jint>(&function_table);
+ return reinterpret_cast<intptr_t>(&function_table);
}
-jint GetDrawGLFunctionTable(JNIEnv* env, jclass) {
+jlong GetDrawGLFunctionTable(JNIEnv* env, jclass) {
static const AwDrawGLFunctionTable function_table = {
&GraphicBufferImpl::Create,
&GraphicBufferImpl::Release,
@@ -98,7 +98,7 @@ jint GetDrawGLFunctionTable(JNIEnv* env, jclass) {
&GraphicBufferImpl::GetNativeBufferStatic,
&GraphicBufferImpl::GetStrideStatic,
};
- return reinterpret_cast<jint>(&function_table);
+ return reinterpret_cast<intptr_t>(&function_table);
}
const char kClassName[] = "com/android/webview/chromium/GraphicsUtils";