Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(223)

Unified Diff: src/gpu/GrSurface.cpp

Issue 322963002: hide SkBitmap::setConfig (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/fonts/SkGScalerContext.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « src/fonts/SkGScalerContext.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698