virtual SkISize onISize() {
return SkISize::Make(300, 300);
}
-
+
virtual void onDraw(SkCanvas* canvas) {
SkBitmap bmp = create_bitmap();
SkShader* shader = SkShader::CreateBitmapShader(
s.postTranslate(SLIDE_SIZE / 2, SLIDE_SIZE / 2);
shader->setLocalMatrix(s);
paint.setShader(shader)->unref();
-
+
if (fHQ) {
paint.setFilterLevel(SkPaint::kHigh_FilterLevel);
}
SkFlattenable* obj = NULL;
uint32_t len;
const void* data = desc->findEntry(tag, &len);
-
+
if (data) {
SkOrderedReadBuffer buffer(data, len);
obj = buffer.readFlattenable(ft);
config, buffer, rowBytes,
flags);
}
-
+
return false;
}
}
// sampling is axis-aligned
SkRect transformedRect;
matrix.mapRect(&transformedRect, srcRect);
-
+
if (has_aligned_samples(srcRect, transformedRect)) {
// We could also turn off filtering here (but we already did a cache lookup with
// params).