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

Unified Diff: src/gpu/GrPathRange.cpp

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/GrPathRange.h ('k') | src/gpu/GrStencilAndCoverTextContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrPathRange.cpp
diff --git a/src/gpu/GrPathRange.cpp b/src/gpu/GrPathRange.cpp
index 117051db19df05db121543f56a5d0698634971b8..754aca0ae652f14bf92c740c70a10222c3f9cfa9 100644
--- a/src/gpu/GrPathRange.cpp
+++ b/src/gpu/GrPathRange.cpp
@@ -8,7 +8,6 @@
#include "GrPathRange.h"
#include "SkPath.h"
-
GrPathRange::GrPathRange(GrGpu* gpu,
PathGenerator* pathGenerator)
: INHERITED(gpu, kCached_LifeCycle),
@@ -27,10 +26,14 @@ GrPathRange::GrPathRange(GrGpu* gpu,
void GrPathRange::loadPathsIfNeeded(const void* indices, PathIndexType indexType, int count) const {
switch (indexType) {
- case kU8_PathIndexType: return this->loadPathsIfNeeded<uint8_t>(indices, count);
- case kU16_PathIndexType: return this->loadPathsIfNeeded<uint16_t>(indices, count);
- case kU32_PathIndexType: return this->loadPathsIfNeeded<uint32_t>(indices, count);
- default: SkFAIL("Unknown path index type");
+ case kU8_PathIndexType:
+ return this->loadPathsIfNeeded(reinterpret_cast<const uint8_t*>(indices), count);
+ case kU16_PathIndexType:
+ return this->loadPathsIfNeeded(reinterpret_cast<const uint16_t*>(indices), count);
+ case kU32_PathIndexType:
+ return this->loadPathsIfNeeded(reinterpret_cast<const uint32_t*>(indices), count);
+ default:
+ SkFAIL("Unknown path index type");
}
}
@@ -38,10 +41,14 @@ void GrPathRange::loadPathsIfNeeded(const void* indices, PathIndexType indexType
void GrPathRange::assertPathsLoaded(const void* indices, PathIndexType indexType, int count) const {
switch (indexType) {
- case kU8_PathIndexType: return this->assertPathsLoaded<uint8_t>(indices, count);
- case kU16_PathIndexType: return this->assertPathsLoaded<uint16_t>(indices, count);
- case kU32_PathIndexType: return this->assertPathsLoaded<uint32_t>(indices, count);
- default: SkFAIL("Unknown path index type");
+ case kU8_PathIndexType:
+ return this->assertPathsLoaded(reinterpret_cast<const uint8_t*>(indices), count);
+ case kU16_PathIndexType:
+ return this->assertPathsLoaded(reinterpret_cast<const uint16_t*>(indices), count);
+ case kU32_PathIndexType:
+ return this->assertPathsLoaded(reinterpret_cast<const uint32_t*>(indices), count);
+ default:
+ SkFAIL("Unknown path index type");
}
}
« no previous file with comments | « src/gpu/GrPathRange.h ('k') | src/gpu/GrStencilAndCoverTextContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698