Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@8670 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
ab02627ae7
commit
4bb50b22fc
@ -15,7 +15,7 @@
|
||||
namespace {
|
||||
|
||||
// Do the commands in 'input' match the supplied pattern? Note: this is a pretty
|
||||
// heavy-weight operation since we are drawing the picture into a debug canvas
|
||||
// heavy-weight operation since we are drawing the picture into a debug canvas
|
||||
// to extract the commands.
|
||||
bool check_pattern(SkPicture& input, const SkTDArray<DrawType> &pattern) {
|
||||
SkDebugCanvas debugCanvas(input.width(), input.height());
|
||||
@ -392,7 +392,7 @@ private:
|
||||
static const unsigned int kCheckerboardWidth = 16;
|
||||
static const unsigned int kCheckerboardHeight = 16;
|
||||
|
||||
fCheckerboard.setConfig(SkBitmap::kARGB_8888_Config,
|
||||
fCheckerboard.setConfig(SkBitmap::kARGB_8888_Config,
|
||||
kCheckerboardWidth, kCheckerboardHeight);
|
||||
fCheckerboard.allocPixels();
|
||||
SkAutoLockPixels lock(fCheckerboard);
|
||||
|
@ -22,7 +22,7 @@
|
||||
'../debugger/SkDebugCanvas.cpp',
|
||||
'../debugger/SkObjectParser.h',
|
||||
'../debugger/SkObjectParser.cpp',
|
||||
|
||||
|
||||
'../gm/gm.cpp',
|
||||
'../gm/gm.h',
|
||||
|
||||
|
@ -118,7 +118,7 @@ public:
|
||||
kOptimizeForClippedPlayback_RecordingFlag = 0x02,
|
||||
/*
|
||||
This flag disables all the picture recording optimizations (i.e.,
|
||||
those in SkPictureRecord). It is mainly intended for testing the
|
||||
those in SkPictureRecord). It is mainly intended for testing the
|
||||
existing optimizations (i.e., to actually have the pattern
|
||||
appear in an .skp we have to disable the optimization). This
|
||||
option doesn't affect the optimizations controlled by
|
||||
|
@ -1386,7 +1386,7 @@ int SkBuildQuadArc(const SkVector& uStart, const SkVector& uStop,
|
||||
static SkScalar eval_ratquad(const SkScalar src[], SkScalar w, SkScalar t) {
|
||||
SkASSERT(src);
|
||||
SkASSERT(t >= 0 && t <= SK_Scalar1);
|
||||
|
||||
|
||||
SkScalar src2w = SkScalarMul(src[2], w);
|
||||
SkScalar C = src[0];
|
||||
SkScalar A = src[4] - 2 * src2w + C;
|
||||
@ -1403,11 +1403,11 @@ static SkScalar eval_ratquad(const SkScalar src[], SkScalar w, SkScalar t) {
|
||||
|
||||
struct SkP3D {
|
||||
SkScalar fX, fY, fZ;
|
||||
|
||||
|
||||
void set(SkScalar x, SkScalar y, SkScalar z) {
|
||||
fX = x; fY = y; fZ = z;
|
||||
}
|
||||
|
||||
|
||||
void projectDown(SkPoint* dst) const {
|
||||
dst->set(fX / fZ, fY / fZ);
|
||||
}
|
||||
@ -1431,7 +1431,7 @@ static void ratquad_mapTo3D(const SkPoint src[3], SkScalar w, SkP3D dst[]) {
|
||||
|
||||
void SkRationalQuad::evalAt(SkScalar t, SkPoint* pt) const {
|
||||
SkASSERT(t >= 0 && t <= SK_Scalar1);
|
||||
|
||||
|
||||
if (pt) {
|
||||
pt->set(eval_ratquad(&fPts[0].fX, fW, t),
|
||||
eval_ratquad(&fPts[0].fY, fW, t));
|
||||
@ -1442,11 +1442,11 @@ void SkRationalQuad::chopAt(SkScalar t, SkRationalQuad dst[2]) const {
|
||||
SkP3D tmp[3], tmp2[3];
|
||||
|
||||
ratquad_mapTo3D(fPts, fW, tmp);
|
||||
|
||||
|
||||
p3d_interp(&tmp[0].fX, &tmp2[0].fX, t);
|
||||
p3d_interp(&tmp[0].fY, &tmp2[0].fY, t);
|
||||
p3d_interp(&tmp[0].fZ, &tmp2[0].fZ, t);
|
||||
|
||||
|
||||
dst[0].fPts[0] = fPts[0];
|
||||
tmp2[0].projectDown(&dst[0].fPts[1]);
|
||||
tmp2[1].projectDown(&dst[0].fPts[2]); dst[1].fPts[0] = dst[0].fPts[2];
|
||||
@ -1456,4 +1456,3 @@ void SkRationalQuad::chopAt(SkScalar t, SkRationalQuad dst[2]) const {
|
||||
dst[0].fW = tmp2[0].fZ; // ?????
|
||||
dst[1].fW = tmp2[2].fZ; // ?????
|
||||
}
|
||||
|
||||
|
@ -576,7 +576,7 @@ void SkPictureRecord::restore() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((fRecordFlags & SkPicture::kDisableRecordOptimizations_RecordingFlag) ||
|
||||
SK_ARRAY_COUNT(gPictureRecordOpts) == opt) {
|
||||
|
@ -556,4 +556,3 @@ static void TestDeferredCanvas(skiatest::Reporter* reporter, GrContextFactory* f
|
||||
|
||||
#include "TestClassDef.h"
|
||||
DEFINE_GPUTESTCLASS("DeferredCanvas", TestDeferredCanvasClass, TestDeferredCanvas)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user