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

Side by Side Diff: include/core/SkImageFilter.h

Issue 1228683002: rename GrShaderDataManager -> GrProcessorDataManager (Closed) Base URL: https://skia.googlesource.com/skia.git@grfixuptests
Patch Set: rebase onto origin/master Created 5 years, 5 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 | « include/core/SkColorFilter.h ('k') | include/core/SkShader.h » ('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 Google Inc. 2 * Copyright 2011 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 #ifndef SkImageFilter_DEFINED 8 #ifndef SkImageFilter_DEFINED
9 #define SkImageFilter_DEFINED 9 #define SkImageFilter_DEFINED
10 10
11 #include "SkFilterQuality.h" 11 #include "SkFilterQuality.h"
12 #include "SkFlattenable.h" 12 #include "SkFlattenable.h"
13 #include "SkMatrix.h" 13 #include "SkMatrix.h"
14 #include "SkRect.h" 14 #include "SkRect.h"
15 #include "SkSurfaceProps.h" 15 #include "SkSurfaceProps.h"
16 #include "SkTemplates.h" 16 #include "SkTemplates.h"
17 17
18 class GrFragmentProcessor; 18 class GrFragmentProcessor;
19 class GrShaderDataManager; 19 class GrProcessorDataManager;
20 class GrTexture; 20 class GrTexture;
21 class SkBaseDevice; 21 class SkBaseDevice;
22 class SkBitmap; 22 class SkBitmap;
23 class SkColorFilter; 23 class SkColorFilter;
24 struct SkIPoint; 24 struct SkIPoint;
25 25
26 /** 26 /**
27 * Base class for image filters. If one is installed in the paint, then 27 * Base class for image filters. If one is installed in the paint, then
28 * all drawing occurs as usual, but it is as if the drawing happened into an 28 * all drawing occurs as usual, but it is as if the drawing happened into an
29 * offscreen (before the xfermode is applied). This offscreen bitmap will 29 * offscreen (before the xfermode is applied). This offscreen bitmap will
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 * If effect is non-NULL, a new GrProcessor instance is stored 334 * If effect is non-NULL, a new GrProcessor instance is stored
335 * in it. The caller assumes ownership of the stage, and it is up to the 335 * in it. The caller assumes ownership of the stage, and it is up to the
336 * caller to unref it. 336 * caller to unref it.
337 * 337 *
338 * The effect can assume its vertexCoords space maps 1-to-1 with texels 338 * The effect can assume its vertexCoords space maps 1-to-1 with texels
339 * in the texture. "matrix" is a transformation to apply to filter 339 * in the texture. "matrix" is a transformation to apply to filter
340 * parameters before they are used in the effect. Note that this function 340 * parameters before they are used in the effect. Note that this function
341 * will be called with (NULL, NULL, SkMatrix::I()) to query for support, 341 * will be called with (NULL, NULL, SkMatrix::I()) to query for support,
342 * so returning "true" indicates support for all possible matrices. 342 * so returning "true" indicates support for all possible matrices.
343 */ 343 */
344 virtual bool asFragmentProcessor(GrFragmentProcessor**, GrShaderDataManager* , GrTexture*, 344 virtual bool asFragmentProcessor(GrFragmentProcessor**, GrProcessorDataManag er*, GrTexture*,
345 const SkMatrix&, const SkIRect& bounds) con st; 345 const SkMatrix&, const SkIRect& bounds) con st;
346 346
347 private: 347 private:
348 friend class SkGraphics; 348 friend class SkGraphics;
349 static void PurgeCache(); 349 static void PurgeCache();
350 350
351 bool usesSrcInput() const { return fUsesSrcInput; } 351 bool usesSrcInput() const { return fUsesSrcInput; }
352 352
353 typedef SkFlattenable INHERITED; 353 typedef SkFlattenable INHERITED;
354 int fInputCount; 354 int fInputCount;
355 SkImageFilter** fInputs; 355 SkImageFilter** fInputs;
356 bool fUsesSrcInput; 356 bool fUsesSrcInput;
357 CropRect fCropRect; 357 CropRect fCropRect;
358 uint32_t fUniqueID; // Globally unique 358 uint32_t fUniqueID; // Globally unique
359 }; 359 };
360 360
361 /** 361 /**
362 * Helper to unflatten the common data, and return NULL if we fail. 362 * Helper to unflatten the common data, and return NULL if we fail.
363 */ 363 */
364 #define SK_IMAGEFILTER_UNFLATTEN_COMMON(localVar, expectedCount) \ 364 #define SK_IMAGEFILTER_UNFLATTEN_COMMON(localVar, expectedCount) \
365 Common localVar; \ 365 Common localVar; \
366 do { \ 366 do { \
367 if (!localVar.unflatten(buffer, expectedCount)) { \ 367 if (!localVar.unflatten(buffer, expectedCount)) { \
368 return NULL; \ 368 return NULL; \
369 } \ 369 } \
370 } while (0) 370 } while (0)
371 371
372 #endif 372 #endif
OLDNEW
« no previous file with comments | « include/core/SkColorFilter.h ('k') | include/core/SkShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698