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

Side by Side Diff: src/effects/SkGpuBlurUtils.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 unified diff | Download patch
« no previous file with comments | « src/core/SkSpecialImage.cpp ('k') | src/effects/SkTableColorFilter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkGpuBlurUtils.h" 8 #include "SkGpuBlurUtils.h"
9 9
10 #include "SkRect.h" 10 #include "SkRect.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 scale_rect(&srcRect, 1.0f / scaleFactorX, 1.0f / scaleFactorY); 191 scale_rect(&srcRect, 1.0f / scaleFactorX, 1.0f / scaleFactorY);
192 srcRect.roundOut(&srcRect); 192 srcRect.roundOut(&srcRect);
193 scale_rect(&srcRect, static_cast<float>(scaleFactorX), 193 scale_rect(&srcRect, static_cast<float>(scaleFactorX),
194 static_cast<float>(scaleFactorY)); 194 static_cast<float>(scaleFactorY));
195 195
196 // setup new clip 196 // setup new clip
197 GrClip clip(localDstBounds); 197 GrClip clip(localDstBounds);
198 198
199 SkASSERT(kBGRA_8888_GrPixelConfig == srcTexture->config() || 199 SkASSERT(kBGRA_8888_GrPixelConfig == srcTexture->config() ||
200 kRGBA_8888_GrPixelConfig == srcTexture->config() || 200 kRGBA_8888_GrPixelConfig == srcTexture->config() ||
201 kSRGBA_8888_GrPixelConfig == srcTexture->config() ||
202 kSBGRA_8888_GrPixelConfig == srcTexture->config() ||
201 kAlpha_8_GrPixelConfig == srcTexture->config()); 203 kAlpha_8_GrPixelConfig == srcTexture->config());
202 204
203 GrSurfaceDesc desc; 205 GrSurfaceDesc desc;
204 desc.fFlags = kRenderTarget_GrSurfaceFlag; 206 desc.fFlags = kRenderTarget_GrSurfaceFlag;
205 desc.fWidth = SkScalarFloorToInt(dstBounds.width()); 207 desc.fWidth = SkScalarFloorToInt(dstBounds.width());
206 desc.fHeight = SkScalarFloorToInt(dstBounds.height()); 208 desc.fHeight = SkScalarFloorToInt(dstBounds.height());
207 desc.fConfig = srcTexture->config(); 209 desc.fConfig = srcTexture->config();
208 210
209 GrTexture* dstTexture; 211 GrTexture* dstTexture;
210 GrTexture* tempTexture; 212 GrTexture* tempTexture;
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 srcRect = dstRect; 394 srcRect = dstRect;
393 srcTexture = dstTexture; 395 srcTexture = dstTexture;
394 SkTSwap(dstTexture, tempTexture); 396 SkTSwap(dstTexture, tempTexture);
395 } 397 }
396 398
397 return SkRef(srcTexture); 399 return SkRef(srcTexture);
398 } 400 }
399 #endif 401 #endif
400 402
401 } 403 }
OLDNEW
« no previous file with comments | « src/core/SkSpecialImage.cpp ('k') | src/effects/SkTableColorFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698