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

Unified Diff: src/gpu/GrPathRange.h

Issue 1374853004: Fix caching of nvpr glyphs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: MSVC warnings Created 5 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/gpu/GrDrawTarget.cpp ('k') | src/gpu/GrPathRange.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrPathRange.h
diff --git a/src/gpu/GrPathRange.h b/src/gpu/GrPathRange.h
index 23b8beb226ccf18f493774b22574f2ea1d82a095..00165d198e18e0744189f29ee91e13bc8e732ea9 100644
--- a/src/gpu/GrPathRange.h
+++ b/src/gpu/GrPathRange.h
@@ -72,18 +72,17 @@ public:
void loadPathsIfNeeded(const void* indices, PathIndexType, int count) const;
- template<typename IndexType> void loadPathsIfNeeded(const void* indices, int count) const {
+ template<typename IndexType> void loadPathsIfNeeded(const IndexType* indices, int count) const {
if (!fPathGenerator) {
return;
}
- const IndexType* indexArray = reinterpret_cast<const IndexType*>(indices);
bool didLoadPaths = false;
for (int i = 0; i < count; ++i) {
- SkASSERT(indexArray[i] < static_cast<uint32_t>(fNumPaths));
+ SkASSERT(indices[i] < static_cast<uint32_t>(fNumPaths));
- const int groupIndex = indexArray[i] / kPathsPerGroup;
+ const int groupIndex = indices[i] / kPathsPerGroup;
const int groupByte = groupIndex / 8;
const uint8_t groupBit = 1 << (groupIndex % 8);
@@ -113,17 +112,15 @@ public:
#ifdef SK_DEBUG
void assertPathsLoaded(const void* indices, PathIndexType, int count) const;
- template<typename IndexType> void assertPathsLoaded(const void* indices, int count) const {
+ template<typename IndexType> void assertPathsLoaded(const IndexType* indices, int count) const {
if (!fPathGenerator) {
return;
}
- const IndexType* indexArray = reinterpret_cast<const IndexType*>(indices);
-
for (int i = 0; i < count; ++i) {
- SkASSERT(indexArray[i] < static_cast<uint32_t>(fNumPaths));
+ SkASSERT(indices[i] < static_cast<uint32_t>(fNumPaths));
- const int groupIndex = indexArray[i] / kPathsPerGroup;
+ const int groupIndex = indices[i] / kPathsPerGroup;
const int groupByte = groupIndex / 8;
const uint8_t groupBit = 1 << (groupIndex % 8);
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/GrPathRange.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698