// Generate the result image by rendering to tiles and accumulating
// the results in 'bitmap'
- // This 16x16 tiling matches the settings applied to 'pict' in
+ // This 16x16 tiling matches the settings applied to 'pict' in
// 'generate_new_picture'
SkISize tileSize = SkISize::Make(16, 16);
for (int xTile = 0; xTile < (size.width()+15)/16; ++xTile) {
int saveCount = tileCanvas.save();
SkMatrix mat(tileCanvas.getTotalMatrix());
- mat.postTranslate(SkIntToScalar(-xTile*tileSize.width()),
+ mat.postTranslate(SkIntToScalar(-xTile*tileSize.width()),
SkIntToScalar(-yTile*tileSize.height()));
tileCanvas.setMatrix(mat);
pict->draw(&tileCanvas);
tileCanvas.flush();
tileCanvas.restoreToCount(saveCount);
- bmpCanvas.drawBitmap(tileBM,
- SkIntToScalar(xTile * tileSize.width()),
+ bmpCanvas.drawBitmap(tileBM,
+ SkIntToScalar(xTile * tileSize.width()),
SkIntToScalar(yTile * tileSize.height()),
&bmpPaint);
}
// We cannot yet pass 'true' to generate_image_from_picture to
// perform actual tiled rendering (see Issue 1198 -
// https://code.google.com/p/skia/issues/detail?id=1198)
- gmmain.generate_image_from_picture(gm, compareConfig, pict, &bitmap,
+ gmmain.generate_image_from_picture(gm, compareConfig, pict, &bitmap,
replayScale /*, true */);
SkString suffix("-tilegrid");
if (SK_Scalar1 != replayScale) {
* distance with negative being inside, positive outside. The edge is specified in
* window space (y-down). If either the third or fourth component of the interpolated
* vertex coord is > 0 then the pixel is considered outside the edge. This is used to
- * attempt to trim to a portion of the infinite quad.
- * Requires shader derivative instruction support.
+ * attempt to trim to a portion of the infinite quad.
+ * Requires shader derivative instruction support.
*/
class QuadEdgeEffect : public GrEffect {
static const char* Name() { return "QuadEdge"; }
- virtual void getConstantColorComponents(GrColor* color,
+ virtual void getConstantColorComponents(GrColor* color,
uint32_t* validFlags) const SK_OVERRIDE {
*validFlags = 0;
}
private:
typedef GrGLEffect INHERITED;
};
-
+
private:
- QuadEdgeEffect() {
- this->addVertexAttrib(kVec4f_GrSLType);
+ QuadEdgeEffect() {
+ this->addVertexAttrib(kVec4f_GrSLType);
}
virtual bool onIsEqual(const GrEffect& other) const SK_OVERRIDE {
* The output of this effect is a hairline edge for quadratics.
* Quadratic specified by 0=u^2-v canonical coords. u and v are the first
* two components of the vertex attribute. Uses unsigned distance.
- * Coverage is min(0, 1-distance). 3rd & 4th component unused.
- * Requires shader derivative instruction support.
+ * Coverage is min(0, 1-distance). 3rd & 4th component unused.
+ * Requires shader derivative instruction support.
*/
class HairQuadEdgeEffect : public GrEffect {
public:
// we go through this so we only have one copy of each effect
static SkAutoTUnref<GrEffectRef> gHairQuadEdgeEffectRef(
CreateEffectRef(AutoEffectUnref(SkNEW(HairQuadEdgeEffect))));
-
+
gHairQuadEdgeEffectRef.get()->ref();
return gHairQuadEdgeEffectRef;
}
static const char* Name() { return "HairQuadEdge"; }
- virtual void getConstantColorComponents(GrColor* color,
+ virtual void getConstantColorComponents(GrColor* color,
uint32_t* validFlags) const SK_OVERRIDE {
*validFlags = 0;
}
};
private:
- HairQuadEdgeEffect() {
- this->addVertexAttrib(kVec4f_GrSLType);
+ HairQuadEdgeEffect() {
+ this->addVertexAttrib(kVec4f_GrSLType);
}
virtual bool onIsEqual(const GrEffect& other) const SK_OVERRIDE {
///////////////////////////////////////////////////////////////////////////////
/**
- * The output of this effect is a 1-pixel wide line.
- * Input is 2D implicit device coord line eq (a*x + b*y +c = 0). 4th component unused.
+ * The output of this effect is a 1-pixel wide line.
+ * Input is 2D implicit device coord line eq (a*x + b*y +c = 0). 4th component unused.
*/
class HairLineEdgeEffect : public GrEffect {
public:
// we go through this so we only have one copy of each effect
static SkAutoTUnref<GrEffectRef> gHairLineEdgeEffectRef(
CreateEffectRef(AutoEffectUnref(SkNEW(HairLineEdgeEffect))));
-
+
gHairLineEdgeEffectRef.get()->ref();
return gHairLineEdgeEffectRef;
}
static const char* Name() { return "HairLineEdge"; }
- virtual void getConstantColorComponents(GrColor* color,
+ virtual void getConstantColorComponents(GrColor* color,
uint32_t* validFlags) const SK_OVERRIDE {
*validFlags = 0;
}
};
private:
- HairLineEdgeEffect() {
- this->addVertexAttrib(kVec4f_GrSLType);
+ HairLineEdgeEffect() {
+ this->addVertexAttrib(kVec4f_GrSLType);
}
virtual bool onIsEqual(const GrEffect& other) const SK_OVERRIDE {
}
}
- virtual void getConstantColorComponents(GrColor* color,
+ virtual void getConstantColorComponents(GrColor* color,
uint32_t* validFlags) const SK_OVERRIDE {
*validFlags = 0;
}
}
}
- virtual void getConstantColorComponents(GrColor* color,
+ virtual void getConstantColorComponents(GrColor* color,
uint32_t* validFlags) const SK_OVERRIDE {
*validFlags = 0;
}
builder->fsCodeAppendf("\touterOffset.y *= %s.y;\n", fsEdgeName);
builder->fsCodeAppend("\tfloat dOuter = length(outerOffset);\n");
// compare outer lengths against xOuterRadius
- builder->fsCodeAppendf("\tfloat edgeAlpha = clamp(%s.x-dOuter, 0.0, 1.0);\n",
+ builder->fsCodeAppendf("\tfloat edgeAlpha = clamp(%s.x-dOuter, 0.0, 1.0);\n",
fsEdgeName);
if (ellipseEffect.isStroked()) {
builder->fsCodeAppend("\tfloat dInner = length(innerOffset);\n");
// compare inner lengths against xInnerRadius
- builder->fsCodeAppendf("\tfloat innerAlpha = clamp(dInner-%s.z, 0.0, 1.0);\n",
+ builder->fsCodeAppendf("\tfloat innerAlpha = clamp(dInner-%s.z, 0.0, 1.0);\n",
fsEdgeName);
builder->fsCodeAppend("\tedgeAlpha *= innerAlpha;\n");
}
SkString modulate;
GrGLSLModulate4f(&modulate, inputColor, "edgeAlpha");
- builder->fsCodeAppendf("\t%s = %s;\n", outputColor, modulate.c_str());
+ builder->fsCodeAppendf("\t%s = %s;\n", outputColor, modulate.c_str());
}
static inline EffectKey GenKey(const GrDrawEffect& drawEffect, const GrGLCaps&) {
public:
Iterator(const SkOTTableName& name) : fName(name), fIndex(0), fType(-1) { }
Iterator(const SkOTTableName& name, SkOTTableName::Record::NameID::Predefined::Value type)
- : fName(name), fIndex(0), fType(type)
+ : fName(name), fIndex(0), fType(type)
{ }
struct Record {
wprintf(L"Error %d getting LCID\n", GetLastError());
return (TRUE);
}
-
+
if (lcid > 0x8000) {
wprintf(L"//");
}