bits.setConfig(SkBitmap::kARGB_8888_Config, bitWidth * 2, bitHeight);
bits.allocPixels();
}
-
+
SkRect larger = one.getBounds();
larger.join(two.getBounds());
SkScalar largerWidth = larger.width();
const SkMatrix& m,
const GrTextureParams& params,
GrPaint* grPaint);
- void drawBitmapCommon(const SkDraw&,
+ void drawBitmapCommon(const SkDraw&,
const SkBitmap& bitmap,
const SkRect* srcRectPtr,
- const SkMatrix&,
+ const SkMatrix&,
const SkPaint&);
/**
for (int x = 0; x <= nx; x++) {
for (int y = 0; y <= ny; y++) {
SkRect tileR;
- tileR.set(SkIntToScalar(x * tileSize),
+ tileR.set(SkIntToScalar(x * tileSize),
SkIntToScalar(y * tileSize),
- SkIntToScalar((x + 1) * tileSize),
+ SkIntToScalar((x + 1) * tileSize),
SkIntToScalar((y + 1) * tileSize));
if (!SkRect::Intersects(tileR, clipRect)) {
}
SkBitmap tmpB;
- SkIRect iTileR;
+ SkIRect iTileR;
tileR.roundOut(&iTileR);
if (bitmap.extractSubset(&tmpB, iTileR)) {
// now offset it to make it "local" to our tmp bitmap
bool needsTextureDomain = false;
if (params.isBilerp()) {
// Need texture domain if drawing a sub rect.
- needsTextureDomain = srcRect.width() < bitmap.width() ||
+ needsTextureDomain = srcRect.width() < bitmap.width() ||
srcRect.height() < bitmap.height();
if (m.rectStaysRect() && draw.fMatrix->rectStaysRect()) {
// sampling is axis-aligned
doLCD = true;
doAA = true;
}
-
+
//FIXME: lcd smoothed un-hinted rasterization unsupported. Tracked by
//http://code.google.com/p/skia/issues/detail?id=915
if (!generateA8FromLCD && SkMask::kA8_Format == glyph.fMaskFormat) {
//FIXME: lcd smoothed un-hinted rasterization unsupported. Tracked by
//http://code.google.com/p/skia/issues/detail?id=915
bool generateA8FromLCD = fRec.getHinting() != SkPaint::kNo_Hinting;
-
+
// Draw the glyph
size_t cgRowBytes;
CGRGBPixel* cgPixels = fOffscreen.getCG(*this, glyph, cgGlyph, &cgRowBytes, generateA8FromLCD);