From 73fc558e44be259c0833c8c8074ad2333bcb378d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20PETIT?= Date: Thu, 13 Feb 2014 11:03:40 +0000 Subject: [PATCH] Fixes for 64bit in libhwui MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using reinterpret_cast allows conversions between pointer types and integers which don't have the same size. The corresponding flags is -Wint-to-pointer-cast. Change-Id: I8ff0c79d235fa6d07b8d9305edc185d946d5133d Signed-off-by: Kévin PETIT --- libs/hwui/DisplayListOp.h | 2 +- libs/hwui/PixelBuffer.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/hwui/DisplayListOp.h b/libs/hwui/DisplayListOp.h index 326805a5894b5..842e028427f37 100644 --- a/libs/hwui/DisplayListOp.h +++ b/libs/hwui/DisplayListOp.h @@ -1444,7 +1444,7 @@ public: DeferredDisplayList::kOpBatch_Text : DeferredDisplayList::kOpBatch_ColorText; - deferInfo.mergeId = (mergeid_t)mPaint->getColor(); + deferInfo.mergeId = reinterpret_cast(mPaint->getColor()); // don't merge decorated text - the decorations won't draw in order bool noDecorations = !(mPaint->getFlags() & (SkPaint::kUnderlineText_Flag | diff --git a/libs/hwui/PixelBuffer.cpp b/libs/hwui/PixelBuffer.cpp index 36e89c6a23cf6..5b642b993a2ed 100644 --- a/libs/hwui/PixelBuffer.cpp +++ b/libs/hwui/PixelBuffer.cpp @@ -151,7 +151,7 @@ void GpuPixelBuffer::upload(uint32_t x, uint32_t y, uint32_t width, uint32_t hei mCaches.bindPixelBuffer(mBuffer); unmap(); glTexSubImage2D(GL_TEXTURE_2D, 0, x, y, width, height, mFormat, - GL_UNSIGNED_BYTE, (void*) offset); + GL_UNSIGNED_BYTE, reinterpret_cast(offset)); } ///////////////////////////////////////////////////////////////////////////////