Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Unified Diff: src/image/SkImage_Gpu.cpp

Issue 2353453004: SkASSERT firing because pointer wraps negative. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkImage_Gpu.cpp
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp
index 55fb47a75dd233ceae2d1cb75a63b05100876d82..f8e3b94aff877dad13287ab1dc7f8c60fe5d7576 100644
--- a/src/image/SkImage_Gpu.cpp
+++ b/src/image/SkImage_Gpu.cpp
@@ -409,7 +409,7 @@ namespace {
class DTIBufferFiller
{
public:
- explicit DTIBufferFiller(intptr_t bufferAsInt)
+ explicit DTIBufferFiller(uintptr_t bufferAsInt)
: bufferAsInt_(bufferAsInt) {}
void fillMember(const void* source, size_t memberOffset, size_t size) {
@@ -418,7 +418,7 @@ public:
private:
- intptr_t bufferAsInt_;
+ uintptr_t bufferAsInt_;
};
}
@@ -552,8 +552,8 @@ size_t SkImage::getDeferredTextureImageData(const GrContextThreadSafeProxy& prox
if (!fillMode) {
return size;
}
- intptr_t bufferAsInt = reinterpret_cast<intptr_t>(buffer);
- intptr_t pixelsAsInt = bufferAsInt + pixelOffset;
+ uintptr_t bufferAsInt = reinterpret_cast<uintptr_t>(buffer);
+ uintptr_t pixelsAsInt = bufferAsInt + pixelOffset;
void* pixels = reinterpret_cast<void*>(pixelsAsInt);
void* ct = nullptr;
if (ctSize) {
@@ -604,7 +604,7 @@ size_t SkImage::getDeferredTextureImageData(const GrContextThreadSafeProxy& prox
}
// Fill in the mipmap levels if they exist
- intptr_t mipLevelPtr = pixelsAsInt + SkAlign8(pixmap.getSafeSize());
+ uintptr_t mipLevelPtr = pixelsAsInt + SkAlign8(pixmap.getSafeSize());
if (useMipMaps) {
static_assert(std::is_standard_layout<MipMapLevelData>::value,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698