| Index: src/image/SkSurface.cpp
|
| diff --git a/src/image/SkSurface.cpp b/src/image/SkSurface.cpp
|
| index 3a28e421a880df9ff6ae9962aa504c6bd63bb040..5249daf362dabd40e3b9d1b141889d3ede3b7f82 100644
|
| --- a/src/image/SkSurface.cpp
|
| +++ b/src/image/SkSurface.cpp
|
| @@ -9,14 +9,26 @@
|
| #include "SkImagePriv.h"
|
| #include "SkCanvas.h"
|
|
|
| +SkSurfaceProps::SkSurfaceProps()
|
| + : fOrigin(SkIPoint::Make(0, 0)), fDisallowFlags(0), fPixelGeometry(kLegacyLCD_SkPixelGeometry)
|
| +{}
|
| +
|
| +SkSurfaceProps::SkSurfaceProps(int x, int y, uint32_t flags, SkPixelGeometry pg)
|
| + : fOrigin(SkIPoint::Make(x, y)), fDisallowFlags(flags), fPixelGeometry(pg)
|
| +{}
|
| +
|
| ///////////////////////////////////////////////////////////////////////////////
|
|
|
| -SkSurface_Base::SkSurface_Base(int width, int height) : INHERITED(width, height) {
|
| +SkSurface_Base::SkSurface_Base(int width, int height, const Props& props)
|
| + : INHERITED(width, height, props)
|
| +{
|
| fCachedCanvas = NULL;
|
| fCachedImage = NULL;
|
| }
|
|
|
| -SkSurface_Base::SkSurface_Base(const SkImageInfo& info) : INHERITED(info) {
|
| +SkSurface_Base::SkSurface_Base(const SkImageInfo& info, const Props& props)
|
| + : INHERITED(info, props)
|
| +{
|
| fCachedCanvas = NULL;
|
| fCachedImage = NULL;
|
| }
|
| @@ -74,13 +86,17 @@ static SkSurface_Base* asSB(SkSurface* surface) {
|
|
|
| ///////////////////////////////////////////////////////////////////////////////
|
|
|
| -SkSurface::SkSurface(int width, int height) : fWidth(width), fHeight(height) {
|
| +SkSurface::SkSurface(int width, int height, const Props& props)
|
| + : fProps(props), fWidth(width), fHeight(height)
|
| +{
|
| SkASSERT(fWidth >= 0);
|
| SkASSERT(fHeight >= 0);
|
| fGenerationID = 0;
|
| }
|
|
|
| -SkSurface::SkSurface(const SkImageInfo& info) : fWidth(info.width()), fHeight(info.height()) {
|
| +SkSurface::SkSurface(const SkImageInfo& info, const Props& props)
|
| + : fProps(props), fWidth(info.width()), fHeight(info.height())
|
| +{
|
| SkASSERT(fWidth >= 0);
|
| SkASSERT(fHeight >= 0);
|
| fGenerationID = 0;
|
|
|