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

Unified Diff: src/gpu/GrSurface.cpp

Issue 536003002: Hide fields in SkImageInfo (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix qt Created 6 years, 3 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/effects/gradients/SkGradientShader.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 54497fe8c8a3018a98679be480b8ec7f15b72eeb..52ab4fd11dc2963fa3612b482d84ea8f33eafea7 100644
--- a/src/gpu/GrSurface.cpp
+++ b/src/gpu/GrSurface.cpp
@@ -13,14 +13,11 @@
#include <stdio.h>
SkImageInfo GrSurface::info() const {
- SkImageInfo info;
- if (!GrPixelConfig2ColorType(this->config(), &info.fColorType)) {
+ SkColorType colorType;
+ if (!GrPixelConfig2ColorType(this->config(), &colorType)) {
sk_throw();
}
- info.fWidth = this->width();
- info.fHeight = this->height();
- info.fAlphaType = kPremul_SkAlphaType;
- return info;
+ return SkImageInfo::Make(this->width(), this->height(), colorType, kPremul_SkAlphaType);
}
bool GrSurface::savePixels(const char* filename) {
« no previous file with comments | « src/effects/gradients/SkGradientShader.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698