SkColorSpaceXformCanvas: setMatrix(), clipRect() in constructor
BUG=703363 Change-Id: Ie0053940dd041614b93400e34145118fb0742cae Change-Id: Ie0053940dd041614b93400e34145118fb0742cae Reviewed-on: https://skia-review.googlesource.com/10806 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
This commit is contained in:
parent
b48df27951
commit
9969e77141
@ -21,7 +21,13 @@ public:
|
|||||||
: SkNoDrawCanvas(SkIRect::MakeSize(target->getBaseLayerSize()))
|
: SkNoDrawCanvas(SkIRect::MakeSize(target->getBaseLayerSize()))
|
||||||
, fTarget(target)
|
, fTarget(target)
|
||||||
, fXformer(std::move(xformer))
|
, fXformer(std::move(xformer))
|
||||||
{}
|
{
|
||||||
|
// Set the matrix and clip to match |fTarget|. Otherwise, we'll answer queries for
|
||||||
|
// bounds/matrix differently than |fTarget| would.
|
||||||
|
SkCanvas::onClipRect(SkRect::MakeFromIRect(fTarget->getDeviceClipBounds()),
|
||||||
|
SkClipOp::kIntersect, kHard_ClipEdgeStyle);
|
||||||
|
SkCanvas::setMatrix(fTarget->getTotalMatrix());
|
||||||
|
}
|
||||||
|
|
||||||
SkImageInfo onImageInfo() const override {
|
SkImageInfo onImageInfo() const override {
|
||||||
return fTarget->imageInfo();
|
return fTarget->imageInfo();
|
||||||
|
Loading…
Reference in New Issue
Block a user