Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@8503 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
0406b9e1fa
commit
041e2dbc06
@ -422,7 +422,7 @@ public:
|
||||
// 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);
|
||||
|
||||
@ -439,14 +439,14 @@ public:
|
||||
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);
|
||||
}
|
||||
@ -1359,7 +1359,7 @@ ErrorCombination run_multiple_modes(GMMain &gmmain, GM *gm, const ConfigData &co
|
||||
// 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) {
|
||||
|
@ -442,8 +442,8 @@ void create_vertices(const SegmentArray& segments,
|
||||
* 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 {
|
||||
@ -462,7 +462,7 @@ public:
|
||||
|
||||
static const char* Name() { return "QuadEdge"; }
|
||||
|
||||
virtual void getConstantColorComponents(GrColor* color,
|
||||
virtual void getConstantColorComponents(GrColor* color,
|
||||
uint32_t* validFlags) const SK_OVERRIDE {
|
||||
*validFlags = 0;
|
||||
}
|
||||
@ -523,10 +523,10 @@ public:
|
||||
private:
|
||||
typedef GrGLEffect INHERITED;
|
||||
};
|
||||
|
||||
|
||||
private:
|
||||
QuadEdgeEffect() {
|
||||
this->addVertexAttrib(kVec4f_GrSLType);
|
||||
QuadEdgeEffect() {
|
||||
this->addVertexAttrib(kVec4f_GrSLType);
|
||||
}
|
||||
|
||||
virtual bool onIsEqual(const GrEffect& other) const SK_OVERRIDE {
|
||||
|
@ -501,8 +501,8 @@ void add_line(const SkPoint p[2],
|
||||
* 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:
|
||||
@ -511,7 +511,7 @@ 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;
|
||||
}
|
||||
@ -520,7 +520,7 @@ public:
|
||||
|
||||
static const char* Name() { return "HairQuadEdge"; }
|
||||
|
||||
virtual void getConstantColorComponents(GrColor* color,
|
||||
virtual void getConstantColorComponents(GrColor* color,
|
||||
uint32_t* validFlags) const SK_OVERRIDE {
|
||||
*validFlags = 0;
|
||||
}
|
||||
@ -577,8 +577,8 @@ public:
|
||||
};
|
||||
|
||||
private:
|
||||
HairQuadEdgeEffect() {
|
||||
this->addVertexAttrib(kVec4f_GrSLType);
|
||||
HairQuadEdgeEffect() {
|
||||
this->addVertexAttrib(kVec4f_GrSLType);
|
||||
}
|
||||
|
||||
virtual bool onIsEqual(const GrEffect& other) const SK_OVERRIDE {
|
||||
@ -602,8 +602,8 @@ GrEffectRef* HairQuadEdgeEffect::TestCreate(SkMWCRandom* random,
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* 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:
|
||||
@ -612,7 +612,7 @@ 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;
|
||||
}
|
||||
@ -621,7 +621,7 @@ public:
|
||||
|
||||
static const char* Name() { return "HairLineEdge"; }
|
||||
|
||||
virtual void getConstantColorComponents(GrColor* color,
|
||||
virtual void getConstantColorComponents(GrColor* color,
|
||||
uint32_t* validFlags) const SK_OVERRIDE {
|
||||
*validFlags = 0;
|
||||
}
|
||||
@ -670,8 +670,8 @@ public:
|
||||
};
|
||||
|
||||
private:
|
||||
HairLineEdgeEffect() {
|
||||
this->addVertexAttrib(kVec4f_GrSLType);
|
||||
HairLineEdgeEffect() {
|
||||
this->addVertexAttrib(kVec4f_GrSLType);
|
||||
}
|
||||
|
||||
virtual bool onIsEqual(const GrEffect& other) const SK_OVERRIDE {
|
||||
|
@ -68,7 +68,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual void getConstantColorComponents(GrColor* color,
|
||||
virtual void getConstantColorComponents(GrColor* color,
|
||||
uint32_t* validFlags) const SK_OVERRIDE {
|
||||
*validFlags = 0;
|
||||
}
|
||||
@ -179,7 +179,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual void getConstantColorComponents(GrColor* color,
|
||||
virtual void getConstantColorComponents(GrColor* color,
|
||||
uint32_t* validFlags) const SK_OVERRIDE {
|
||||
*validFlags = 0;
|
||||
}
|
||||
@ -228,7 +228,7 @@ public:
|
||||
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()) {
|
||||
@ -236,14 +236,14 @@ public:
|
||||
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&) {
|
||||
|
@ -551,7 +551,7 @@ struct SkOTTableName {
|
||||
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 {
|
||||
|
@ -17,7 +17,7 @@ BOOL CALLBACK MyFuncLocaleEx(LPWSTR pStr, DWORD dwFlags, LPARAM lparam) {
|
||||
wprintf(L"Error %d getting LCID\n", GetLastError());
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
|
||||
if (lcid > 0x8000) {
|
||||
wprintf(L"//");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user