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

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

Issue 956083002: Revert of Pass clip to context (Closed) Base URL: https://skia.googlesource.com/skia.git@pass_down_rendertarget
Patch Set: Created 5 years, 10 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/SkBlurMaskFilter.cpp ('k') | src/effects/SkGpuBlurUtils.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 "SkDisplacementMapEffect.h" 8 #include "SkDisplacementMapEffect.h"
9 #include "SkReadBuffer.h" 9 #include "SkReadBuffer.h"
10 #include "SkWriteBuffer.h" 10 #include "SkWriteBuffer.h"
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 fYChannelSelector, 442 fYChannelSelector,
443 scale, 443 scale,
444 displacement, 444 displacement,
445 offsetMatrix, 445 offsetMatrix,
446 color))->unref(); 446 color))->unref();
447 SkIRect colorBounds = bounds; 447 SkIRect colorBounds = bounds;
448 colorBounds.offset(-colorOffset); 448 colorBounds.offset(-colorOffset);
449 SkMatrix matrix; 449 SkMatrix matrix;
450 matrix.setTranslate(-SkIntToScalar(colorBounds.x()), 450 matrix.setTranslate(-SkIntToScalar(colorBounds.x()),
451 -SkIntToScalar(colorBounds.y())); 451 -SkIntToScalar(colorBounds.y()));
452 context->drawRect(dst->asRenderTarget(), GrClip::WideOpen(), paint, matrix, 452 context->drawRect(dst->asRenderTarget(), paint, matrix, SkRect::Make(colorBo unds));
453 SkRect::Make(colorBounds));
454 offset->fX = bounds.left(); 453 offset->fX = bounds.left();
455 offset->fY = bounds.top(); 454 offset->fY = bounds.top();
456 WrapTexture(dst, bounds.width(), bounds.height(), result); 455 WrapTexture(dst, bounds.width(), bounds.height(), result);
457 return true; 456 return true;
458 } 457 }
459 458
460 /////////////////////////////////////////////////////////////////////////////// 459 ///////////////////////////////////////////////////////////////////////////////
461 460
462 GrDisplacementMapEffect::GrDisplacementMapEffect( 461 GrDisplacementMapEffect::GrDisplacementMapEffect(
463 SkDisplacementMapEffect::ChannelSelectorType xChann elSelector, 462 SkDisplacementMapEffect::ChannelSelectorType xChann elSelector,
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 const GrGLCaps&, GrProcessorKeyBuilder* b ) { 630 const GrGLCaps&, GrProcessorKeyBuilder* b ) {
632 const GrDisplacementMapEffect& displacementMap = proc.cast<GrDisplacementMap Effect>(); 631 const GrDisplacementMapEffect& displacementMap = proc.cast<GrDisplacementMap Effect>();
633 632
634 uint32_t xKey = displacementMap.xChannelSelector(); 633 uint32_t xKey = displacementMap.xChannelSelector();
635 uint32_t yKey = displacementMap.yChannelSelector() << kChannelSelectorKeyBit s; 634 uint32_t yKey = displacementMap.yChannelSelector() << kChannelSelectorKeyBit s;
636 635
637 b->add32(xKey | yKey); 636 b->add32(xKey | yKey);
638 } 637 }
639 #endif 638 #endif
640 639
OLDNEW
« no previous file with comments | « src/effects/SkBlurMaskFilter.cpp ('k') | src/effects/SkGpuBlurUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698