Restore old SkBitmapDeviceFilteredSurfaceProps
The old seemingly unnecessary assignment is needed, otherwise skbug.com/7909 won't be fixed, and we will also introduce some unexpected gold changes. Ben: did you remember why you originally have that additional assignment? Probably related with SkTLazy? Bug: skia:7909 TBR: bungeman@google.com Change-Id: I20293b76bb448733d3ab4a90d40282b1420000d0 Reviewed-on: https://skia-review.googlesource.com/126204 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
This commit is contained in:
parent
fb799af68b
commit
3d5b83bf95
@ -182,17 +182,20 @@ private:
|
|||||||
class SkBitmapDeviceFilteredSurfaceProps {
|
class SkBitmapDeviceFilteredSurfaceProps {
|
||||||
public:
|
public:
|
||||||
SkBitmapDeviceFilteredSurfaceProps(const SkBitmap& bitmap, const SkPaint& paint,
|
SkBitmapDeviceFilteredSurfaceProps(const SkBitmap& bitmap, const SkPaint& paint,
|
||||||
const SkSurfaceProps& surfaceProps)
|
const SkSurfaceProps& surfaceProps) {
|
||||||
: fSurfaceProps((kN32_SkColorType != bitmap.colorType() || !paint.isSrcOver())
|
if (kN32_SkColorType != bitmap.colorType() || !paint.isSrcOver()) {
|
||||||
? fLazy.init(surfaceProps.flags(), kUnknown_SkPixelGeometry)
|
SkSurfaceProps* newProps = fLazy.init(surfaceProps.flags(), kUnknown_SkPixelGeometry);
|
||||||
: &surfaceProps)
|
fSurfaceProps = newProps;
|
||||||
{ }
|
} else {
|
||||||
|
fSurfaceProps = &surfaceProps;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const SkSurfaceProps& operator()() const { return *fSurfaceProps; }
|
const SkSurfaceProps& operator()() const { return *fSurfaceProps; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
const SkSurfaceProps* fSurfaceProps;
|
||||||
SkTLazy<SkSurfaceProps> fLazy;
|
SkTLazy<SkSurfaceProps> fLazy;
|
||||||
SkSurfaceProps const * const fSurfaceProps;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SkBitmapDevice_DEFINED
|
#endif // SkBitmapDevice_DEFINED
|
||||||
|
Loading…
Reference in New Issue
Block a user