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

Unified Diff: src/core/SkSpecialImage.cpp

Issue 1789663002: sRGB support in Ganesh. Several pieces: (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Squelch assert when blurring sRGB Created 4 years, 9 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/core/SkImageCacherator.cpp ('k') | src/effects/SkGpuBlurUtils.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkSpecialImage.cpp
diff --git a/src/core/SkSpecialImage.cpp b/src/core/SkSpecialImage.cpp
index 991e16351586674ad01272215071f043c72d8408..426a44ebff26ed4a4a8059f3f34a79ad8a4ea90f 100644
--- a/src/core/SkSpecialImage.cpp
+++ b/src/core/SkSpecialImage.cpp
@@ -136,6 +136,7 @@ SkImageFilter::Proxy* SkSpecialImage::internal_getProxy() const {
///////////////////////////////////////////////////////////////////////////////
#include "SkImage.h"
#if SK_SUPPORT_GPU
+#include "GrContext.h"
#include "SkGrPriv.h"
#endif
@@ -206,7 +207,7 @@ public:
#if SK_SUPPORT_GPU
GrTexture* texture = as_IB(fImage.get())->peekTexture();
if (texture) {
- GrSurfaceDesc desc = GrImageInfoToSurfaceDesc(info);
+ GrSurfaceDesc desc = GrImageInfoToSurfaceDesc(info, *texture->getContext()->caps());
desc.fFlags = kRenderTarget_GrSurfaceFlag;
return SkSpecialSurface::MakeRenderTarget(this->proxy(), texture->getContext(), desc);
@@ -430,7 +431,7 @@ public:
}
sk_sp<SkSpecialSurface> onMakeSurface(const SkImageInfo& info) const override {
- GrSurfaceDesc desc = GrImageInfoToSurfaceDesc(info);
+ GrSurfaceDesc desc = GrImageInfoToSurfaceDesc(info, *fTexture->getContext()->caps());
desc.fFlags = kRenderTarget_GrSurfaceFlag;
return SkSpecialSurface::MakeRenderTarget(this->proxy(), fTexture->getContext(), desc);
« no previous file with comments | « src/core/SkImageCacherator.cpp ('k') | src/effects/SkGpuBlurUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698