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

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

Issue 682223002: rename GrTextureDesc->GrSurfaceDesc, GrTextureFlags->GrSurfaceFlags (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: const Created 6 years, 1 month 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/SkMorphologyImageFilter.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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 srcRect.roundOut(); 165 srcRect.roundOut();
166 scale_rect(&srcRect, static_cast<float>(scaleFactorX), 166 scale_rect(&srcRect, static_cast<float>(scaleFactorX),
167 static_cast<float>(scaleFactorY)); 167 static_cast<float>(scaleFactorY));
168 168
169 GrContext::AutoClip acs(context, SkRect::MakeWH(srcRect.width(), srcRect.hei ght())); 169 GrContext::AutoClip acs(context, SkRect::MakeWH(srcRect.width(), srcRect.hei ght()));
170 170
171 SkASSERT(kBGRA_8888_GrPixelConfig == srcTexture->config() || 171 SkASSERT(kBGRA_8888_GrPixelConfig == srcTexture->config() ||
172 kRGBA_8888_GrPixelConfig == srcTexture->config() || 172 kRGBA_8888_GrPixelConfig == srcTexture->config() ||
173 kAlpha_8_GrPixelConfig == srcTexture->config()); 173 kAlpha_8_GrPixelConfig == srcTexture->config());
174 174
175 GrTextureDesc desc; 175 GrSurfaceDesc desc;
176 desc.fFlags = kRenderTarget_GrTextureFlagBit | kNoStencil_GrTextureFlagBit; 176 desc.fFlags = kRenderTarget_GrSurfaceFlag | kNoStencil_GrSurfaceFlag;
177 desc.fWidth = SkScalarFloorToInt(srcRect.width()); 177 desc.fWidth = SkScalarFloorToInt(srcRect.width());
178 desc.fHeight = SkScalarFloorToInt(srcRect.height()); 178 desc.fHeight = SkScalarFloorToInt(srcRect.height());
179 desc.fConfig = srcTexture->config(); 179 desc.fConfig = srcTexture->config();
180 180
181 GrTexture* dstTexture; 181 GrTexture* dstTexture;
182 GrTexture* tempTexture; 182 GrTexture* tempTexture;
183 SkAutoTUnref<GrTexture> temp1, temp2; 183 SkAutoTUnref<GrTexture> temp1, temp2;
184 184
185 temp1.reset(context->refScratchTexture(desc, GrContext::kApprox_ScratchTexMa tch)); 185 temp1.reset(context->refScratchTexture(desc, GrContext::kApprox_ScratchTexMa tch));
186 dstTexture = temp1.get(); 186 dstTexture = temp1.get();
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 context->drawRectToRect(paint, dstRect, srcRect); 303 context->drawRectToRect(paint, dstRect, srcRect);
304 srcRect = dstRect; 304 srcRect = dstRect;
305 srcTexture = dstTexture; 305 srcTexture = dstTexture;
306 SkTSwap(dstTexture, tempTexture); 306 SkTSwap(dstTexture, tempTexture);
307 } 307 }
308 return SkRef(srcTexture); 308 return SkRef(srcTexture);
309 } 309 }
310 #endif 310 #endif
311 311
312 } 312 }
OLDNEW
« no previous file with comments | « src/effects/SkDisplacementMapEffect.cpp ('k') | src/effects/SkMorphologyImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698