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

Side by Side Diff: src/effects/SkGpuBlurUtils.cpp

Issue 1971343002: Convert GrClip to an abstract base class (Closed) Base URL: https://skia.googlesource.com/skia.git@upload2_clipout
Patch Set: fix crash Created 4 years, 7 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/effects/SkDisplacementMapEffect.cpp ('k') | src/effects/SkLightingImageFilter.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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 srcRect.offset(srcOffset); 205 srcRect.offset(srcOffset);
206 srcBounds = &localSrcBounds; 206 srcBounds = &localSrcBounds;
207 } else { 207 } else {
208 srcRect = localDstBounds; 208 srcRect = localDstBounds;
209 } 209 }
210 210
211 scale_irect_roundout(&srcRect, 1.0f / scaleFactorX, 1.0f / scaleFactorY); 211 scale_irect_roundout(&srcRect, 1.0f / scaleFactorX, 1.0f / scaleFactorY);
212 scale_irect(&srcRect, scaleFactorX, scaleFactorY); 212 scale_irect(&srcRect, scaleFactorX, scaleFactorY);
213 213
214 // setup new clip 214 // setup new clip
215 GrClip clip(localDstBounds); 215 GrFixedClip clip(localDstBounds);
216 216
217 sk_sp<GrTexture> srcTexture(sk_ref_sp(origSrc)); 217 sk_sp<GrTexture> srcTexture(sk_ref_sp(origSrc));
218 218
219 SkASSERT(kBGRA_8888_GrPixelConfig == srcTexture->config() || 219 SkASSERT(kBGRA_8888_GrPixelConfig == srcTexture->config() ||
220 kRGBA_8888_GrPixelConfig == srcTexture->config() || 220 kRGBA_8888_GrPixelConfig == srcTexture->config() ||
221 kSRGBA_8888_GrPixelConfig == srcTexture->config() || 221 kSRGBA_8888_GrPixelConfig == srcTexture->config() ||
222 kSBGRA_8888_GrPixelConfig == srcTexture->config() || 222 kSBGRA_8888_GrPixelConfig == srcTexture->config() ||
223 kAlpha_8_GrPixelConfig == srcTexture->config()); 223 kAlpha_8_GrPixelConfig == srcTexture->config());
224 224
225 const int width = dstBounds.width(); 225 const int width = dstBounds.width();
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 dstDrawContext.swap(tmpDrawContext); 375 dstDrawContext.swap(tmpDrawContext);
376 } 376 }
377 377
378 return srcDrawContext; 378 return srcDrawContext;
379 } 379 }
380 380
381 } 381 }
382 382
383 #endif 383 #endif
384 384
OLDNEW
« no previous file with comments | « src/effects/SkDisplacementMapEffect.cpp ('k') | src/effects/SkLightingImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698