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

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

Issue 1842753002: Style bikeshed - remove extraneous whitespace (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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/SkEmbossMask_Table.h ('k') | src/effects/SkLayerDrawLooper.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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 scale_rect(&srcRect, 1.0f / scaleFactorX, 1.0f / scaleFactorY); 293 scale_rect(&srcRect, 1.0f / scaleFactorX, 1.0f / scaleFactorY);
294 srcRect.roundOut(&srcRect); 294 srcRect.roundOut(&srcRect);
295 const SkIRect srcIRect = srcRect.roundOut(); 295 const SkIRect srcIRect = srcRect.roundOut();
296 if (sigmaX > 0.0f) { 296 if (sigmaX > 0.0f) {
297 if (scaleFactorX > 1) { 297 if (scaleFactorX > 1) {
298 // TODO: if we pass in the source draw context we don't need thi s here 298 // TODO: if we pass in the source draw context we don't need thi s here
299 if (!srcDrawContext) { 299 if (!srcDrawContext) {
300 srcDrawContext.reset(context->drawContext(srcTexture->asRend erTarget())); 300 srcDrawContext.reset(context->drawContext(srcTexture->asRend erTarget()));
301 if (!srcDrawContext) { 301 if (!srcDrawContext) {
302 return nullptr; 302 return nullptr;
303 } 303 }
304 } 304 }
305 305
306 // Clear out a radius to the right of the srcRect to prevent the 306 // Clear out a radius to the right of the srcRect to prevent the
307 // X convolution from reading garbage. 307 // X convolution from reading garbage.
308 clearRect = SkIRect::MakeXYWH(srcIRect.fRight, srcIRect.fTop, 308 clearRect = SkIRect::MakeXYWH(srcIRect.fRight, srcIRect.fTop,
309 radiusX, srcIRect.height()); 309 radiusX, srcIRect.height());
310 srcDrawContext->clear(&clearRect, 0x0, false); 310 srcDrawContext->clear(&clearRect, 0x0, false);
311 } 311 }
312 312
313 SkAutoTUnref<GrDrawContext> dstDrawContext( 313 SkAutoTUnref<GrDrawContext> dstDrawContext(
(...skipping 12 matching lines...) Expand all
326 srcOffset.set(0, 0); 326 srcOffset.set(0, 0);
327 } 327 }
328 328
329 if (sigmaY > 0.0f) { 329 if (sigmaY > 0.0f) {
330 if (scaleFactorY > 1 || sigmaX > 0.0f) { 330 if (scaleFactorY > 1 || sigmaX > 0.0f) {
331 // TODO: if we pass in the source draw context we don't need thi s here 331 // TODO: if we pass in the source draw context we don't need thi s here
332 if (!srcDrawContext) { 332 if (!srcDrawContext) {
333 srcDrawContext.reset(context->drawContext(srcTexture->asRend erTarget())); 333 srcDrawContext.reset(context->drawContext(srcTexture->asRend erTarget()));
334 if (!srcDrawContext) { 334 if (!srcDrawContext) {
335 return nullptr; 335 return nullptr;
336 } 336 }
337 } 337 }
338 338
339 // Clear out a radius below the srcRect to prevent the Y 339 // Clear out a radius below the srcRect to prevent the Y
340 // convolution from reading garbage. 340 // convolution from reading garbage.
341 clearRect = SkIRect::MakeXYWH(srcIRect.fLeft, srcIRect.fBottom, 341 clearRect = SkIRect::MakeXYWH(srcIRect.fLeft, srcIRect.fBottom,
342 srcIRect.width(), radiusY); 342 srcIRect.width(), radiusY);
343 srcDrawContext->clear(&clearRect, 0x0, false); 343 srcDrawContext->clear(&clearRect, 0x0, false);
344 } 344 }
345 345
346 SkAutoTUnref<GrDrawContext> dstDrawContext( 346 SkAutoTUnref<GrDrawContext> dstDrawContext(
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 srcRect = dstRect; 394 srcRect = dstRect;
395 srcTexture = dstTexture; 395 srcTexture = dstTexture;
396 SkTSwap(dstTexture, tempTexture); 396 SkTSwap(dstTexture, tempTexture);
397 } 397 }
398 398
399 return SkRef(srcTexture); 399 return SkRef(srcTexture);
400 } 400 }
401 #endif 401 #endif
402 402
403 } 403 }
OLDNEW
« no previous file with comments | « src/effects/SkEmbossMask_Table.h ('k') | src/effects/SkLayerDrawLooper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698