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

Unified Diff: src/gpu/GrRecordReplaceDraw.cpp

Issue 617393004: BBHs: void* data -> unsigned data (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: The rest Created 6 years, 2 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 | « src/core/SkTileGrid.cpp ('k') | tests/BBoxHierarchyTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrRecordReplaceDraw.cpp
diff --git a/src/gpu/GrRecordReplaceDraw.cpp b/src/gpu/GrRecordReplaceDraw.cpp
index c8b2670943e4ed39a251d4c99adcdfe4487ea345..b069e60f6e98a4c15639043b1513d414c98f0ac4 100644
--- a/src/gpu/GrRecordReplaceDraw.cpp
+++ b/src/gpu/GrRecordReplaceDraw.cpp
@@ -11,7 +11,7 @@
#include "SkRecordDraw.h"
#include "SkRecords.h"
-GrReplacements::ReplacementInfo* GrReplacements::newReplacement(uint32_t pictureID,
+GrReplacements::ReplacementInfo* GrReplacements::newReplacement(uint32_t pictureID,
unsigned int start,
const SkMatrix& ctm) {
ReplacementInfo* replacement = SkNEW_ARGS(ReplacementInfo, (pictureID, start, ctm));
@@ -30,8 +30,8 @@ void GrReplacements::freeAll() {
fReplacementHash.reset();
}
-const GrReplacements::ReplacementInfo* GrReplacements::lookupByStart(uint32_t pictureID,
- size_t start,
+const GrReplacements::ReplacementInfo* GrReplacements::lookupByStart(uint32_t pictureID,
+ size_t start,
const SkMatrix& ctm) const {
return fReplacementHash.find(ReplacementInfo::Key(pictureID, start, ctm));
}
@@ -94,7 +94,7 @@ public:
return;
}
- record->visit<void>((uintptr_t)fOps[fIndex], *this);
+ record->visit<void>(fOps[fIndex], *this);
}
} else {
@@ -121,29 +121,29 @@ public:
draw.draw();
}
void operator()(const SkRecords::SaveLayer& sl) {
-
+
// For a saveLayer command, check if it can be replaced by a drawBitmap
// call and, if so, draw it and then update the current op index accordingly.
size_t startOffset;
if (fOps.count()) {
- startOffset = (uintptr_t)fOps[fIndex];
+ startOffset = fOps[fIndex];
} else {
startOffset = fIndex;
}
const GrReplacements::ReplacementInfo* ri = fReplacements->lookupByStart(
- fPicture->uniqueID(),
- startOffset,
+ fPicture->uniqueID(),
+ startOffset,
fCanvas->getTotalMatrix());
if (ri) {
draw_replacement_bitmap(ri, fCanvas, fInitialMatrix);
if (fPicture->fBBH.get()) {
- while ((uintptr_t)fOps[fIndex] < ri->fStop) {
+ while (fOps[fIndex] < ri->fStop) {
++fIndex;
}
- SkASSERT((uintptr_t)fOps[fIndex] == ri->fStop);
+ SkASSERT(fOps[fIndex] == ri->fStop);
} else {
fIndex = ri->fStop;
}
@@ -161,7 +161,7 @@ private:
const SkMatrix fInitialMatrix;
SkDrawPictureCallback* fCallback;
- SkTDArray<void*> fOps;
+ SkTDArray<unsigned> fOps;
int fIndex;
typedef Draw INHERITED;
« no previous file with comments | « src/core/SkTileGrid.cpp ('k') | tests/BBoxHierarchyTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698