Disable LCD text when rasterizing SkPictureShader tiles.
BUG=chromium:453299 R=reed@google.com Review URL: https://codereview.chromium.org/884163003
This commit is contained in:
parent
c927918cd6
commit
3d91aad293
@ -100,6 +100,14 @@ public:
|
||||
structure are copied to the canvas.
|
||||
*/
|
||||
explicit SkCanvas(const SkBitmap& bitmap);
|
||||
|
||||
/** Construct a canvas with the specified bitmap to draw into.
|
||||
@param bitmap Specifies a bitmap for the canvas to draw into. Its
|
||||
structure are copied to the canvas.
|
||||
@param props New canvas surface properties.
|
||||
*/
|
||||
SkCanvas(const SkBitmap& bitmap, const SkSurfaceProps& props);
|
||||
|
||||
virtual ~SkCanvas();
|
||||
|
||||
SkMetaData& getMetaData();
|
||||
@ -1278,7 +1286,6 @@ private:
|
||||
};
|
||||
SkCanvas(const SkIRect& bounds, InitFlags);
|
||||
SkCanvas(SkBaseDevice*, const SkSurfaceProps*, InitFlags);
|
||||
SkCanvas(const SkBitmap&, const SkSurfaceProps&);
|
||||
|
||||
// needs gettotalclip()
|
||||
friend class SkCanvasStateUtils;
|
||||
|
@ -194,7 +194,9 @@ SkShader* SkPictureShader::refBitmapShader(const SkMatrix& matrix, const SkMatri
|
||||
}
|
||||
bm.eraseColor(SK_ColorTRANSPARENT);
|
||||
|
||||
SkCanvas canvas(bm);
|
||||
// Always disable LCD text, since we can't assume our image will be opaque.
|
||||
SkCanvas canvas(bm, SkSurfaceProps(0, kUnknown_SkPixelGeometry));
|
||||
|
||||
canvas.scale(tileScale.width(), tileScale.height());
|
||||
canvas.translate(-fTile.x(), -fTile.y());
|
||||
canvas.drawPicture(fPicture);
|
||||
|
Loading…
Reference in New Issue
Block a user