Sanitizing source files in Skia_Periodic_House_Keeping

git-svn-id: http://skia.googlecode.com/svn/trunk@6556 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
skia.committer@gmail.com 2012-11-27 02:01:19 +00:00
parent e7b3d29a12
commit 8ccf590b89
4 changed files with 9 additions and 9 deletions

View File

@ -201,8 +201,8 @@ static SkBitmap createBitmap(const SkPath& path) {
static SkBitmap createBitmap(const SkBitmap& input, const SkRect* srcRect) {
SkBitmap bitmap;
bitmap.setConfig(SkBitmap::kARGB_8888_Config,
SkImageWidget::kImageWidgetWidth,
bitmap.setConfig(SkBitmap::kARGB_8888_Config,
SkImageWidget::kImageWidgetWidth,
SkImageWidget::kImageWidgetHeight);
bitmap.allocPixels();
bitmap.eraseColor(SK_ColorLTGRAY);
@ -220,7 +220,7 @@ static SkBitmap createBitmap(const SkBitmap& input, const SkRect* srcRect) {
xScale *= input.width() / (float) input.height();
}
SkRect dst = SkRect::MakeXYWH(SK_Scalar1, SK_Scalar1,
SkRect dst = SkRect::MakeXYWH(SK_Scalar1, SK_Scalar1,
xScale * input.width(),
yScale * input.height());

View File

@ -99,7 +99,7 @@ protected:
canvas->translate(STROKE_WIDTH*3/2, STROKE_WIDTH*3/2);
SkRect r = { 0, 0, 250, 120 };
SkPaint paint;
paint.setMaskFilter(fMaskFilter);
if (fPProc) {

View File

@ -73,7 +73,7 @@ void GrReduceClipStack(const SkClipStack& stack,
// walk backwards until we get to:
// a) the beginning
// b) an operation that is known to make the bounds all inside/outside
// c) a replace operation
// c) a replace operation
static const InitialState kUnknown_InitialState = static_cast<InitialState>(-1);
*initialState = kUnknown_InitialState;
@ -252,7 +252,7 @@ void GrReduceClipStack(const SkClipStack& stack,
SkClipStack::Iter::Clip* newClip = resultClips->prepend();
// if it is a flip, change it to a bounds-filling rect
if (isFlip) {
SkASSERT(SkRegion::kXOR_Op == clip->fOp ||
SkASSERT(SkRegion::kXOR_Op == clip->fOp ||
SkRegion::kReverseDifference_Op == clip->fOp);
newClip->fPath = NULL;
newClip->fRect = resultBounds;

View File

@ -719,7 +719,7 @@ static void print_clip(const SkClipStack::Iter::Clip& clip) {
static void test_reduced_clip_stack(skiatest::Reporter* reporter) {
// We construct random clip stacks, reduce them, and then rasterize both versions to verify that
// they are equal.
// they are equal.
// All the clip elements will be contained within these bounds.
static const SkRect kBounds = SkRect::MakeWH(100, 100);
@ -768,10 +768,10 @@ static void test_reduced_clip_stack(skiatest::Reporter* reporter) {
continue;
}
}
// saves can change the clip stack behavior when an element is added.
bool doSave = r.nextBool();
SkSize size = SkSize::Make(
SkScalarFloorToScalar(SkScalarMul(kBounds.width(), r.nextRangeScalar(kMinElemSizeFrac, kMaxElemSizeFrac))),
SkScalarFloorToScalar(SkScalarMul(kBounds.height(), r.nextRangeScalar(kMinElemSizeFrac, kMaxElemSizeFrac))));