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

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

Issue 522873005: Move MakeDivByTextureWHMatrix to GrCoordTransform (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 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/SkLightingImageFilter.cpp ('k') | src/effects/SkXfermodeImageFilter.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 2012 The Android Open Source Project 2 * Copyright 2012 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 "SkBitmap.h" 8 #include "SkBitmap.h"
9 #include "SkMagnifierImageFilter.h" 9 #include "SkMagnifierImageFilter.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 typedef GrGLMagnifierEffect GLEffect; 59 typedef GrGLMagnifierEffect GLEffect;
60 60
61 private: 61 private:
62 GrMagnifierEffect(GrTexture* texture, 62 GrMagnifierEffect(GrTexture* texture,
63 float xOffset, 63 float xOffset,
64 float yOffset, 64 float yOffset,
65 float xInvZoom, 65 float xInvZoom,
66 float yInvZoom, 66 float yInvZoom,
67 float xInvInset, 67 float xInvInset,
68 float yInvInset) 68 float yInvInset)
69 : GrSingleTextureEffect(texture, MakeDivByTextureWHMatrix(texture)) 69 : GrSingleTextureEffect(texture, GrCoordTransform::MakeDivByTextureWHMat rix(texture))
70 , fXOffset(xOffset) 70 , fXOffset(xOffset)
71 , fYOffset(yOffset) 71 , fYOffset(yOffset)
72 , fXInvZoom(xInvZoom) 72 , fXInvZoom(xInvZoom)
73 , fYInvZoom(yInvZoom) 73 , fYInvZoom(yInvZoom)
74 , fXInvInset(xInvInset) 74 , fXInvInset(xInvInset)
75 , fYInvInset(yInvInset) {} 75 , fYInvInset(yInvInset) {}
76 76
77 virtual bool onIsEqual(const GrEffect&) const SK_OVERRIDE; 77 virtual bool onIsEqual(const GrEffect&) const SK_OVERRIDE;
78 78
79 GR_DECLARE_EFFECT_TEST; 79 GR_DECLARE_EFFECT_TEST;
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 364
365 int x_val = SkPin32(SkScalarFloorToInt(x_interp), 0, width - 1); 365 int x_val = SkPin32(SkScalarFloorToInt(x_interp), 0, width - 1);
366 int y_val = SkPin32(SkScalarFloorToInt(y_interp), 0, height - 1); 366 int y_val = SkPin32(SkScalarFloorToInt(y_interp), 0, height - 1);
367 367
368 *dptr = sptr[y_val * width + x_val]; 368 *dptr = sptr[y_val * width + x_val];
369 dptr++; 369 dptr++;
370 } 370 }
371 } 371 }
372 return true; 372 return true;
373 } 373 }
OLDNEW
« no previous file with comments | « src/effects/SkLightingImageFilter.cpp ('k') | src/effects/SkXfermodeImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698