| Index: src/image/SkSurface_Gpu.cpp
|
| diff --git a/src/image/SkSurface_Gpu.cpp b/src/image/SkSurface_Gpu.cpp
|
| index d777e3a99120c431cebb18decfa9bb090ac5970b..9ac6d553404e06d3032356571ff3837f50af192c 100644
|
| --- a/src/image/SkSurface_Gpu.cpp
|
| +++ b/src/image/SkSurface_Gpu.cpp
|
| @@ -7,6 +7,7 @@
|
|
|
| #include "SkSurface_Base.h"
|
| #include "SkImagePriv.h"
|
| +#include "SkImage_Base.h"
|
| #include "SkCanvas.h"
|
| #include "SkGpuDevice.h"
|
|
|
| @@ -66,7 +67,12 @@ SkSurface* SkSurface_Gpu::onNewSurface(const SkImageInfo& info) {
|
| }
|
|
|
| SkImage* SkSurface_Gpu::onNewImageSnapshot() {
|
| - return SkImage::NewTexture(fDevice->accessBitmap(false));
|
| + const int sampleCount = fDevice->accessRenderTarget()->numSamples();
|
| + SkImage* image = SkNewImageFromBitmapTexture(fDevice->accessBitmap(false), sampleCount);
|
| + if (image) {
|
| + as_IB(image)->initWithProps(this->props());
|
| + }
|
| + return image;
|
| }
|
|
|
| void SkSurface_Gpu::onDraw(SkCanvas* canvas, SkScalar x, SkScalar y,
|
|
|