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

Side by Side Diff: src/effects/SkXfermodeImageFilter.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/SkMorphologyImageFilter.cpp ('k') | src/gpu/GrAADistanceFieldPathRenderer.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 The Android Open Source Project 2 * Copyright 2013 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 "SkXfermodeImageFilter.h" 8 #include "SkXfermodeImageFilter.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkDevice.h" 10 #include "SkDevice.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 SkIPoint foregroundOffset = SkIPoint::Make(0, 0); 127 SkIPoint foregroundOffset = SkIPoint::Make(0, 0);
128 if (getInput(1) && !getInput(1)->getInputResultGPU(proxy, src, ctx, &foregro und, 128 if (getInput(1) && !getInput(1)->getInputResultGPU(proxy, src, ctx, &foregro und,
129 &foregroundOffset)) { 129 &foregroundOffset)) {
130 return onFilterImage(proxy, src, ctx, result, offset); 130 return onFilterImage(proxy, src, ctx, result, offset);
131 } 131 }
132 GrTexture* foregroundTex = foreground.getTexture(); 132 GrTexture* foregroundTex = foreground.getTexture();
133 GrContext* context = foregroundTex->getContext(); 133 GrContext* context = foregroundTex->getContext();
134 134
135 GrFragmentProcessor* xferProcessor = NULL; 135 GrFragmentProcessor* xferProcessor = NULL;
136 136
137 GrTextureDesc desc; 137 GrSurfaceDesc desc;
138 desc.fFlags = kRenderTarget_GrTextureFlagBit | kNoStencil_GrTextureFlagBit; 138 desc.fFlags = kRenderTarget_GrSurfaceFlag | kNoStencil_GrSurfaceFlag;
139 desc.fWidth = src.width(); 139 desc.fWidth = src.width();
140 desc.fHeight = src.height(); 140 desc.fHeight = src.height();
141 desc.fConfig = kSkia8888_GrPixelConfig; 141 desc.fConfig = kSkia8888_GrPixelConfig;
142 SkAutoTUnref<GrTexture> dst( 142 SkAutoTUnref<GrTexture> dst(
143 context->refScratchTexture(desc, GrContext::kApprox_ScratchTexMatch)); 143 context->refScratchTexture(desc, GrContext::kApprox_ScratchTexMatch));
144 if (!dst) { 144 if (!dst) {
145 return false; 145 return false;
146 } 146 }
147 GrContext::AutoRenderTarget art(context, dst->asRenderTarget()); 147 GrContext::AutoRenderTarget art(context, dst->asRenderTarget());
148 148
(...skipping 16 matching lines...) Expand all
165 paint.addColorProcessor(xferProcessor)->unref(); 165 paint.addColorProcessor(xferProcessor)->unref();
166 context->drawRect(paint, srcRect); 166 context->drawRect(paint, srcRect);
167 167
168 offset->fX = backgroundOffset.fX; 168 offset->fX = backgroundOffset.fX;
169 offset->fY = backgroundOffset.fY; 169 offset->fY = backgroundOffset.fY;
170 WrapTexture(dst, src.width(), src.height(), result); 170 WrapTexture(dst, src.width(), src.height(), result);
171 return true; 171 return true;
172 } 172 }
173 173
174 #endif 174 #endif
OLDNEW
« no previous file with comments | « src/effects/SkMorphologyImageFilter.cpp ('k') | src/gpu/GrAADistanceFieldPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698