SkAutoSTMalloc<128, SkScalar> widthStorage(count);
SkScalar* widths = widthStorage.get();
paint.getTextWidths(glyphs, count * sizeof(uint16_t), widths);
-
+
for (int i = 0; i < count; ++i) {
pos[i].set(x, y);
x += widths[i];
/** Returns a non-zero, globally unique value corresponding to the set of verbs
and points in the path (but not the fill type [except on Android skbug.com/1762]).
- Each time the path is modified, a different generation ID will be returned.
+ Each time the path is modified, a different generation ID will be returned.
*/
uint32_t getGenerationID() const;
//#define GR_DEFAULT_RESOURCE_CACHE_MB_LIMIT 96
/**
- * This specifies the maximum number of textures the texture cache can hold
+ * This specifies the maximum number of textures the texture cache can hold
* in vram. The value is only a default and can be overridden at runtime.
*/
//#define GR_DEFAULT_RESOURCE_CACHE_COUNT_LIMIT 2048
bool getUseGPU() const { return fUseGPU; }
void setUseGPU(bool ug) { fUseGPU = ug; }
-
+
bool getTriangle() const { return fUseTriangle; }
void setTriangle(bool ut) { fUseTriangle = ut; }
-
+
void toggleRectAsOval() { fRectAsOval = !fRectAsOval; }
bool getUseClip() const { return fUseClip; }
void FatBits::drawTriangleSkeleton(SkCanvas* max, const SkPoint pts[]) {
SkPaint paint;
this->setupSkeletonPaint(&paint);
-
+
SkPath path;
path.moveTo(pts[0]);
path.lineTo(pts[1]);
path.lineTo(pts[2]);
path.close();
-
+
max->drawPath(path, paint);
}
void FatBits::drawTriangle(SkCanvas* canvas, SkPoint pts[3]) {
SkPaint paint;
-
+
fInverse.mapPoints(pts, 3);
-
+
if (fGrid) {
apply_grid(pts, 3);
}
-
+
SkPath path;
path.moveTo(pts[0]);
path.lineTo(pts[1]);
path.lineTo(pts[2]);
path.close();
-
+
erase(fMinSurface);
this->setupPaint(&paint);
paint.setColor(FAT_PIXEL_COLOR);
fMinSurface->getCanvas()->drawPath(path, paint);
this->copyMinToMax();
-
+
SkCanvas* max = fMaxSurface->getCanvas();
-
+
fMatrix.mapPoints(pts, 3);
this->drawTriangleSkeleton(max, pts);
-
+
fMaxSurface->draw(canvas, 0, 0, NULL);
}
int index = -1;
int count = fFB.getTriangle() ? 3 : 2;
SkScalar tol = 12;
-
+
for (int i = 0; i < count; ++i) {
if (fPts[i].equalsWithinTolerance(pt, tol)) {
index = i;
bool dstReadInShaderSupport() const { return fDstReadInShaderSupport; }
// Scratch textures not being reused means that those scratch textures
- // that we upload to (i.e., don't have a render target) will not be
+ // that we upload to (i.e., don't have a render target) will not be
// recycled in the texture cache. This is to prevent ghosting by drivers
// (in particular for deferred architectures).
bool reuseScratchTextures() const { return fReuseScratchTextures; }