diff options
author | bsalomon <bsalomon@google.com> | 2015-10-06 08:40:50 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-06 08:40:51 -0700 |
commit | 4a339529612a43871d021877e58698e067d6c4cd (patch) | |
tree | a46e5271f68b194f4351271c1faa65568c9606fd /include | |
parent | e1f829699958b673dfe196c80d17a55d18d0fc4b (diff) |
Bye bye processor data manager.
Review URL: https://codereview.chromium.org/1388113002
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkColorFilter.h | 4 | ||||
-rw-r--r-- | include/core/SkComposeShader.h | 3 | ||||
-rw-r--r-- | include/core/SkImageFilter.h | 5 | ||||
-rw-r--r-- | include/core/SkShader.h | 4 | ||||
-rw-r--r-- | include/core/SkXfermode.h | 3 | ||||
-rw-r--r-- | include/effects/SkColorCubeFilter.h | 3 | ||||
-rw-r--r-- | include/effects/SkColorMatrixFilter.h | 3 | ||||
-rw-r--r-- | include/effects/SkLumaColorFilter.h | 3 | ||||
-rw-r--r-- | include/effects/SkMagnifierImageFilter.h | 4 | ||||
-rw-r--r-- | include/effects/SkMatrixConvolutionImageFilter.h | 4 | ||||
-rw-r--r-- | include/effects/SkModeColorFilter.h | 3 | ||||
-rw-r--r-- | include/effects/SkPerlinNoiseShader.h | 3 | ||||
-rw-r--r-- | include/gpu/GrContext.h | 12 | ||||
-rw-r--r-- | include/gpu/GrPaint.h | 6 | ||||
-rw-r--r-- | include/gpu/GrProcessorDataManager.h | 16 | ||||
-rw-r--r-- | include/gpu/GrProcessorUnitTest.h | 3 |
16 files changed, 21 insertions, 58 deletions
diff --git a/include/core/SkColorFilter.h b/include/core/SkColorFilter.h index a5a1a4c0cc..57650fbd98 100644 --- a/include/core/SkColorFilter.h +++ b/include/core/SkColorFilter.h @@ -15,7 +15,6 @@ class GrContext; class GrFragmentProcessor; -class GrProcessorDataManager; class SkBitmap; /** @@ -132,8 +131,7 @@ public: * * A null return indicates that the color filter isn't implemented for the GPU backend. */ - virtual const GrFragmentProcessor* asFragmentProcessor(GrContext*, - GrProcessorDataManager*) const { + virtual const GrFragmentProcessor* asFragmentProcessor(GrContext*) const { return nullptr; } diff --git a/include/core/SkComposeShader.h b/include/core/SkComposeShader.h index 41be197eb7..bc9d932ee5 100644 --- a/include/core/SkComposeShader.h +++ b/include/core/SkComposeShader.h @@ -40,8 +40,7 @@ public: const GrFragmentProcessor* asFragmentProcessor(GrContext*, const SkMatrix& viewM, const SkMatrix* localMatrix, - SkFilterQuality, - GrProcessorDataManager*) const override; + SkFilterQuality) const override; #endif class ComposeShaderContext : public SkShader::Context { diff --git a/include/core/SkImageFilter.h b/include/core/SkImageFilter.h index 1ca1c01c08..30265e4fdd 100644 --- a/include/core/SkImageFilter.h +++ b/include/core/SkImageFilter.h @@ -16,7 +16,6 @@ #include "SkSurfaceProps.h" class GrFragmentProcessor; -class GrProcessorDataManager; class GrTexture; class SkBaseDevice; class SkBitmap; @@ -363,8 +362,8 @@ protected: * will be called with (NULL, NULL, SkMatrix::I()) to query for support, * so returning "true" indicates support for all possible matrices. */ - virtual bool asFragmentProcessor(GrFragmentProcessor**, GrProcessorDataManager*, GrTexture*, - const SkMatrix&, const SkIRect& bounds) const; + virtual bool asFragmentProcessor(GrFragmentProcessor**, GrTexture*, const SkMatrix&, + const SkIRect& bounds) const; /** * Returns true if this filter can cause transparent black pixels to become diff --git a/include/core/SkShader.h b/include/core/SkShader.h index 1b33ccf951..34cb648022 100644 --- a/include/core/SkShader.h +++ b/include/core/SkShader.h @@ -20,7 +20,6 @@ class SkPicture; class SkXfermode; class GrContext; class GrFragmentProcessor; -class GrProcessorDataManager; /** \class SkShader * @@ -322,8 +321,7 @@ public: virtual const GrFragmentProcessor* asFragmentProcessor(GrContext*, const SkMatrix& viewMatrix, const SkMatrix* localMatrix, - SkFilterQuality, - GrProcessorDataManager*) const; + SkFilterQuality) const; /** * If the shader can represent its "average" luminance in a single color, return true and diff --git a/include/core/SkXfermode.h b/include/core/SkXfermode.h index a438c5b4ca..0880f1403c 100644 --- a/include/core/SkXfermode.h +++ b/include/core/SkXfermode.h @@ -14,7 +14,6 @@ #include "SkColor.h" class GrFragmentProcessor; -class GrProcessorDataManager; class GrTexture; class GrXPFactory; class SkString; @@ -201,7 +200,7 @@ public: It is legal for the function to succeed but return a null output. This indicates that the output of the blend is simply the src color. */ - virtual bool asFragmentProcessor(const GrFragmentProcessor** output, GrProcessorDataManager*, + virtual bool asFragmentProcessor(const GrFragmentProcessor** output, const GrFragmentProcessor* dst) const; /** A subclass may implement this factory function to work with the GPU backend. It is legal diff --git a/include/effects/SkColorCubeFilter.h b/include/effects/SkColorCubeFilter.h index eab308e0cf..f4a0c9009d 100644 --- a/include/effects/SkColorCubeFilter.h +++ b/include/effects/SkColorCubeFilter.h @@ -25,8 +25,7 @@ public: uint32_t getFlags() const override; #if SK_SUPPORT_GPU - const GrFragmentProcessor* asFragmentProcessor(GrContext*, - GrProcessorDataManager*) const override; + const GrFragmentProcessor* asFragmentProcessor(GrContext*) const override; #endif SK_TO_STRING_OVERRIDE() diff --git a/include/effects/SkColorMatrixFilter.h b/include/effects/SkColorMatrixFilter.h index 8c6edba77f..bd2b939a43 100644 --- a/include/effects/SkColorMatrixFilter.h +++ b/include/effects/SkColorMatrixFilter.h @@ -26,8 +26,7 @@ public: SkColorFilter* newComposed(const SkColorFilter*) const override; #if SK_SUPPORT_GPU - const GrFragmentProcessor* asFragmentProcessor(GrContext*, - GrProcessorDataManager*) const override; + const GrFragmentProcessor* asFragmentProcessor(GrContext*) const override; #endif struct State { diff --git a/include/effects/SkLumaColorFilter.h b/include/effects/SkLumaColorFilter.h index f9c3f0858c..8dd519af4a 100644 --- a/include/effects/SkLumaColorFilter.h +++ b/include/effects/SkLumaColorFilter.h @@ -28,8 +28,7 @@ public: void filterSpan(const SkPMColor src[], int count, SkPMColor[]) const override; #if SK_SUPPORT_GPU - const GrFragmentProcessor* asFragmentProcessor(GrContext*, - GrProcessorDataManager*) const override; + const GrFragmentProcessor* asFragmentProcessor(GrContext*) const override; #endif SK_TO_STRING_OVERRIDE() diff --git a/include/effects/SkMagnifierImageFilter.h b/include/effects/SkMagnifierImageFilter.h index b89cd346d2..af142e9eff 100644 --- a/include/effects/SkMagnifierImageFilter.h +++ b/include/effects/SkMagnifierImageFilter.h @@ -26,8 +26,8 @@ protected: bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, SkBitmap* result, SkIPoint* offset) const override; #if SK_SUPPORT_GPU - bool asFragmentProcessor(GrFragmentProcessor**, GrProcessorDataManager*, GrTexture*, - const SkMatrix&, const SkIRect& bounds) const override; + bool asFragmentProcessor(GrFragmentProcessor**, GrTexture*, const SkMatrix&, + const SkIRect& bounds) const override; #endif private: diff --git a/include/effects/SkMatrixConvolutionImageFilter.h b/include/effects/SkMatrixConvolutionImageFilter.h index 016dab6588..76349f430c 100644 --- a/include/effects/SkMatrixConvolutionImageFilter.h +++ b/include/effects/SkMatrixConvolutionImageFilter.h @@ -83,8 +83,8 @@ protected: #if SK_SUPPORT_GPU - bool asFragmentProcessor(GrFragmentProcessor**, GrProcessorDataManager*, GrTexture*, - const SkMatrix&, const SkIRect& bounds) const override; + bool asFragmentProcessor(GrFragmentProcessor**, GrTexture*, const SkMatrix&, + const SkIRect& bounds) const override; #endif private: diff --git a/include/effects/SkModeColorFilter.h b/include/effects/SkModeColorFilter.h index 51f79f05e8..0c876aef0b 100644 --- a/include/effects/SkModeColorFilter.h +++ b/include/effects/SkModeColorFilter.h @@ -39,8 +39,7 @@ public: #endif #if SK_SUPPORT_GPU - const GrFragmentProcessor* asFragmentProcessor(GrContext*, - GrProcessorDataManager*) const override; + const GrFragmentProcessor* asFragmentProcessor(GrContext*) const override; #endif SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkModeColorFilter) diff --git a/include/effects/SkPerlinNoiseShader.h b/include/effects/SkPerlinNoiseShader.h index 1caece6f20..0cb1b47a9f 100644 --- a/include/effects/SkPerlinNoiseShader.h +++ b/include/effects/SkPerlinNoiseShader.h @@ -98,8 +98,7 @@ public: #if SK_SUPPORT_GPU const GrFragmentProcessor* asFragmentProcessor(GrContext* context, const SkMatrix& viewM, - const SkMatrix*, SkFilterQuality, - GrProcessorDataManager*) const override; + const SkMatrix*, SkFilterQuality) const override; #endif SK_TO_STRING_OVERRIDE() diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h index 51879e0626..b79ab640a4 100644 --- a/include/gpu/GrContext.h +++ b/include/gpu/GrContext.h @@ -470,13 +470,13 @@ private: * of effects that make a readToUPM->writeToPM->readToUPM cycle invariant. Otherwise, they * return NULL. */ - const GrFragmentProcessor* createPMToUPMEffect(GrProcessorDataManager*, GrTexture*, - bool swapRAndB, const SkMatrix&) const; - const GrFragmentProcessor* createUPMToPMEffect(GrProcessorDataManager*, GrTexture*, - bool swapRAndB, const SkMatrix&) const; + const GrFragmentProcessor* createPMToUPMEffect(GrTexture*, bool swapRAndB, + const SkMatrix&) const; + const GrFragmentProcessor* createUPMToPMEffect(GrTexture*, bool swapRAndB, + const SkMatrix&) const; /** Called before either of the above two functions to determine the appropriate fragment - processors for conversions. This must be called by readSurfacePixels befor a mutex is taken, - since testingvPM conversions itself will call readSurfacePixels */ + processors for conversions. This must be called by readSurfacePixels before a mutex is + taken, since testingvPM conversions itself will call readSurfacePixels */ void testPMConversionsIfNecessary(uint32_t flags); /** Returns true if we've already determined that createPMtoUPMEffect and createUPMToPMEffect will fail. In such cases fall back to SW conversion. */ diff --git a/include/gpu/GrPaint.h b/include/gpu/GrPaint.h index d52c6baec9..9d0fe5575e 100644 --- a/include/gpu/GrPaint.h +++ b/include/gpu/GrPaint.h @@ -11,7 +11,6 @@ #define GrPaint_DEFINED #include "GrColor.h" -#include "GrProcessorDataManager.h" #include "GrXferProcessor.h" #include "effects/GrPorterDuffXferProcessor.h" #include "GrFragmentProcessor.h" @@ -141,10 +140,6 @@ public: */ bool isConstantBlendedColor(GrColor* constantColor) const; - GrProcessorDataManager* getProcessorDataManager() { return &fProcDataManager; } - - const GrProcessorDataManager* processorDataManager() const { return &fProcDataManager; } - private: void resetFragmentProcessors() { for (int i = 0; i < fColorFragmentProcessors.count(); ++i) { @@ -164,7 +159,6 @@ private: bool fAntiAlias; GrColor fColor; - GrProcessorDataManager fProcDataManager; }; #endif diff --git a/include/gpu/GrProcessorDataManager.h b/include/gpu/GrProcessorDataManager.h deleted file mode 100644 index edec39f517..0000000000 --- a/include/gpu/GrProcessorDataManager.h +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright 2015 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#ifndef GrProcessorDataManager_DEFINED -#define GrProcessorDataManager_DEFINED - -// TODO this class is just an empty stub for now - -class GrProcessorDataManager { -}; - -#endif diff --git a/include/gpu/GrProcessorUnitTest.h b/include/gpu/GrProcessorUnitTest.h index b18c7072fd..8f4e84e161 100644 --- a/include/gpu/GrProcessorUnitTest.h +++ b/include/gpu/GrProcessorUnitTest.h @@ -41,19 +41,16 @@ const GrFragmentProcessor* CreateChildFP(GrProcessorTestData*); struct GrProcessorTestData { GrProcessorTestData(SkRandom* random, GrContext* context, - GrProcessorDataManager* procDataManager, const GrCaps* caps, GrTexture* textures[2]) : fRandom(random) , fContext(context) - , fProcDataManager(procDataManager) , fCaps(caps) { fTextures[0] = textures[0]; fTextures[1] = textures[1]; } SkRandom* fRandom; GrContext* fContext; - GrProcessorDataManager* fProcDataManager; const GrCaps* fCaps; GrTexture* fTextures[2]; }; |