Index: src/gpu/GrSurface.cpp |
diff --git a/src/gpu/GrSurface.cpp b/src/gpu/GrSurface.cpp |
index 66ebe3b1e197226f73e3c9d07bdf01ff85cf0e35..a07fe67ae458dabd45e61305753dcf4cf9862aca 100644 |
--- a/src/gpu/GrSurface.cpp |
+++ b/src/gpu/GrSurface.cpp |
@@ -12,13 +12,15 @@ |
#include "SkImageEncoder.h" |
#include <stdio.h> |
-void GrSurface::asImageInfo(SkImageInfo* info) const { |
- if (!GrPixelConfig2ColorType(this->config(), &info->fColorType)) { |
+SkImageInfo GrSurface::info() const { |
+ SkImageInfo info; |
+ if (!GrPixelConfig2ColorType(this->config(), &info.fColorType)) { |
sk_throw(); |
} |
- info->fWidth = this->width(); |
- info->fHeight = this->height(); |
- info->fAlphaType = kPremul_SkAlphaType; |
+ info.fWidth = this->width(); |
+ info.fHeight = this->height(); |
+ info.fAlphaType = kPremul_SkAlphaType; |
+ return info; |
} |
bool GrSurface::savePixels(const char* filename) { |