зеркало из https://github.com/mozilla/moz-skia.git
Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@14705 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
Родитель
b3c836b787
Коммит
e92c68f7d7
|
@ -88,16 +88,16 @@ public:
|
|||
PerlinNoiseGM2() {
|
||||
fSize = SkISize::Make(80, 80);
|
||||
}
|
||||
|
||||
|
||||
protected:
|
||||
virtual SkString onShortName() {
|
||||
return SkString("perlinnoise_localmatrix");
|
||||
}
|
||||
|
||||
|
||||
virtual SkISize onISize() {
|
||||
return SkISize::Make(640, 480);
|
||||
}
|
||||
|
||||
|
||||
void install(SkPaint* paint, SkPerlinNoiseShader::Type type,
|
||||
float baseFrequencyX, float baseFrequencyY, int numOctaves, float seed,
|
||||
bool stitchTiles) {
|
||||
|
@ -108,7 +108,7 @@ protected:
|
|||
seed, stitchTiles ? &fSize : NULL);
|
||||
paint->setShader(shader)->unref();
|
||||
}
|
||||
|
||||
|
||||
virtual void onDraw(SkCanvas* canvas) {
|
||||
canvas->translate(10, 10);
|
||||
|
||||
|
@ -131,7 +131,7 @@ protected:
|
|||
canvas->scale(2, 2);
|
||||
canvas->drawRect(r, paint);
|
||||
canvas->restore();
|
||||
|
||||
|
||||
canvas->save();
|
||||
canvas->translate(w + 100, h + 10);
|
||||
canvas->scale(2, 2);
|
||||
|
@ -153,13 +153,13 @@ protected:
|
|||
canvas->translate(0, h + 10);
|
||||
canvas->drawRect(r, paint);
|
||||
canvas->restore();
|
||||
|
||||
|
||||
canvas->save();
|
||||
canvas->translate(w + 100, h + 10);
|
||||
canvas->drawRect(r, paint);
|
||||
canvas->restore();
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
typedef GM INHERITED;
|
||||
SkISize fSize;
|
||||
|
|
|
@ -18,20 +18,20 @@ public:
|
|||
: fProxyShader(SkRef(proxy))
|
||||
, fProxyLocalMatrix(localMatrix)
|
||||
{}
|
||||
|
||||
|
||||
virtual size_t contextSize() const SK_OVERRIDE {
|
||||
return fProxyShader->contextSize();
|
||||
}
|
||||
|
||||
|
||||
virtual BitmapType asABitmap(SkBitmap* bitmap, SkMatrix* matrix,
|
||||
TileMode* mode) const SK_OVERRIDE {
|
||||
return fProxyShader->asABitmap(bitmap, matrix, mode);
|
||||
}
|
||||
|
||||
|
||||
virtual GradientType asAGradient(GradientInfo* info) const SK_OVERRIDE {
|
||||
return fProxyShader->asAGradient(info);
|
||||
}
|
||||
|
||||
|
||||
virtual GrEffectRef* asNewEffect(GrContext* ctx, const SkPaint& paint,
|
||||
const SkMatrix* localMatrix) const SK_OVERRIDE {
|
||||
SkMatrix tmp = fProxyLocalMatrix;
|
||||
|
@ -40,26 +40,26 @@ public:
|
|||
}
|
||||
return fProxyShader->asNewEffect(ctx, paint, &tmp);
|
||||
}
|
||||
|
||||
|
||||
virtual SkShader* refAsALocalMatrixShader(SkMatrix* localMatrix) const SK_OVERRIDE {
|
||||
if (localMatrix) {
|
||||
*localMatrix = fProxyLocalMatrix;
|
||||
}
|
||||
return SkRef(fProxyShader.get());
|
||||
}
|
||||
|
||||
|
||||
SK_TO_STRING_OVERRIDE()
|
||||
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLocalMatrixShader)
|
||||
|
||||
|
||||
protected:
|
||||
SkLocalMatrixShader(SkReadBuffer&);
|
||||
virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
|
||||
virtual Context* onCreateContext(const ContextRec&, void*) const SK_OVERRIDE;
|
||||
|
||||
|
||||
private:
|
||||
SkAutoTUnref<SkShader> fProxyShader;
|
||||
SkMatrix fProxyLocalMatrix;
|
||||
|
||||
|
||||
typedef SkShader INHERITED;
|
||||
};
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ static void InitializeFlattenables(int*) {
|
|||
SkLightingImageFilter::InitializeFlattenables();
|
||||
SkTableColorFilter::InitializeFlattenables();
|
||||
SkXfermode::InitializeFlattenables();
|
||||
|
||||
|
||||
}
|
||||
|
||||
void SkFlattenable::InitializeFlattenablesIfNeeded() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче