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

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

Issue 1840663002: Temporary fix for --preAbandonGpuContext bug (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Temporary fix for --preAbandonGpuContext bug 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/core/SkSpecialImage.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 2011 The Android Open Source Project 2 * Copyright 2011 The Android Open Source Project
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 "SkBlurImageFilter.h" 8 #include "SkBlurImageFilter.h"
9 9
10 #include "SkAutoPixmapStorage.h" 10 #include "SkAutoPixmapStorage.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 if (!this->applyCropRect(this->mapContext(ctx), inputBounds, &dstBounds)) { 87 if (!this->applyCropRect(this->mapContext(ctx), inputBounds, &dstBounds)) {
88 return nullptr; 88 return nullptr;
89 } 89 }
90 if (!inputBounds.intersect(dstBounds)) { 90 if (!inputBounds.intersect(dstBounds)) {
91 return nullptr; 91 return nullptr;
92 } 92 }
93 93
94 const SkVector sigma = map_sigma(fSigma, ctx.ctm()); 94 const SkVector sigma = map_sigma(fSigma, ctx.ctm());
95 95
96 #if SK_SUPPORT_GPU 96 #if SK_SUPPORT_GPU
97 if (input->peekTexture()) { 97 if (input->peekTexture() && input->peekTexture()->getContext()) {
98 if (0 == sigma.x() && 0 == sigma.y()) { 98 if (0 == sigma.x() && 0 == sigma.y()) {
99 offset->fX = inputBounds.x(); 99 offset->fX = inputBounds.x();
100 offset->fY = inputBounds.y(); 100 offset->fY = inputBounds.y();
101 return input->makeSubset(inputBounds.makeOffset(-inputOffset.x(), 101 return input->makeSubset(inputBounds.makeOffset(-inputOffset.x(),
102 -inputOffset.y())); 102 -inputOffset.y()));
103 } 103 }
104 104
105 GrTexture* inputTexture = input->peekTexture(); 105 GrTexture* inputTexture = input->peekTexture();
106 106
107 offset->fX = dstBounds.fLeft; 107 offset->fX = dstBounds.fLeft;
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 str->appendf("SkBlurImageFilter: ("); 238 str->appendf("SkBlurImageFilter: (");
239 str->appendf("sigma: (%f, %f) input (", fSigma.fWidth, fSigma.fHeight); 239 str->appendf("sigma: (%f, %f) input (", fSigma.fWidth, fSigma.fHeight);
240 240
241 if (this->getInput(0)) { 241 if (this->getInput(0)) {
242 this->getInput(0)->toString(str); 242 this->getInput(0)->toString(str);
243 } 243 }
244 244
245 str->append("))"); 245 str->append("))");
246 } 246 }
247 #endif 247 #endif
OLDNEW
« no previous file with comments | « src/core/SkSpecialImage.cpp ('k') | src/effects/SkMorphologyImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698