Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@8732 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
717d0cbf66
commit
cbbdab5513
@ -84,4 +84,3 @@ static SkBenchmark* Fact1(void* p) { return new DeferredSurfaceCopyBench(p, true
|
||||
|
||||
static BenchRegistry gReg0(Fact0);
|
||||
static BenchRegistry gReg1(Fact1);
|
||||
|
||||
|
@ -57,4 +57,3 @@ private:
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
DEF_BENCH( return new PerlinNoiseBench(p); )
|
||||
|
||||
|
@ -98,20 +98,20 @@ private:
|
||||
SkAutoLockPixels bgAlp(bg);
|
||||
memcpy(bg.getPixels(), kCheckData, sizeof(kCheckData));
|
||||
bg.setIsOpaque(true);
|
||||
|
||||
|
||||
fBG.reset(SkShader::CreateBitmapShader(bg,
|
||||
SkShader::kRepeat_TileMode,
|
||||
SkShader::kRepeat_TileMode));
|
||||
SkMatrix lm;
|
||||
lm.setScale(SkIntToScalar(16), SkIntToScalar(16));
|
||||
fBG->setLocalMatrix(lm);
|
||||
|
||||
|
||||
SkBitmap dstBmp;
|
||||
dstBmp.setConfig(SkBitmap::kARGB_8888_Config, kSize, kSize);
|
||||
dstBmp.allocPixels();
|
||||
SkAutoLockPixels dstAlp(dstBmp);
|
||||
SkPMColor* pixels = reinterpret_cast<SkPMColor*>(dstBmp.getPixels());
|
||||
|
||||
|
||||
for (int y = 0; y < kSize; ++y) {
|
||||
int c = y * (1 << kShift);
|
||||
SkPMColor rowColor = SkPackARGB32(c, c, 0, c/2);
|
||||
@ -127,7 +127,7 @@ private:
|
||||
srcBmp.allocPixels();
|
||||
SkAutoLockPixels srcAlp(srcBmp);
|
||||
pixels = reinterpret_cast<SkPMColor*>(srcBmp.getPixels());
|
||||
|
||||
|
||||
for (int x = 0; x < kSize; ++x) {
|
||||
int c = x * (1 << kShift);
|
||||
SkPMColor colColor = SkPackARGB32(c, 0, c, c/2);
|
||||
@ -139,12 +139,12 @@ private:
|
||||
SkShader::kClamp_TileMode,
|
||||
SkShader::kClamp_TileMode));
|
||||
}
|
||||
|
||||
|
||||
enum {
|
||||
kShift = 2,
|
||||
kSize = 256 >> kShift,
|
||||
};
|
||||
|
||||
|
||||
SkAutoTUnref<SkShader> fBG;
|
||||
SkAutoTUnref<SkShader> fSrc;
|
||||
SkAutoTUnref<SkShader> fDst;
|
||||
|
Loading…
Reference in New Issue
Block a user