From 95740981c36266e4595ddde2264aa38e3c7e2d02 Mon Sep 17 00:00:00 2001 From: bsalomon Date: Thu, 4 Sep 2014 13:12:37 -0700 Subject: Add GrProgramElement base class for GrEffect with deferred exec ref. BUG=skia:2889 R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/537773004 --- include/gpu/GrEffect.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'include/gpu/GrEffect.h') diff --git a/include/gpu/GrEffect.h b/include/gpu/GrEffect.h index ec1b0ba636..b7a6d17af9 100644 --- a/include/gpu/GrEffect.h +++ b/include/gpu/GrEffect.h @@ -10,16 +10,14 @@ #include "GrColor.h" #include "GrEffectUnitTest.h" -#include "GrTexture.h" +#include "GrProgramElement.h" #include "GrTextureAccess.h" #include "GrTypesPriv.h" class GrBackendEffectFactory; class GrContext; class GrCoordTransform; -class GrEffect; -class GrVertexEffect; -class SkString; + /** Provides custom vertex shader, fragment shader, uniform data for a particular stage of the Ganesh shading pipeline. @@ -31,7 +29,7 @@ class SkString; effect must reach 0 before the thread terminates and the pool is destroyed. To create a static effect use the macro GR_CREATE_STATIC_EFFECT declared below. */ -class GrEffect : public SkRefCnt { +class GrEffect : public GrProgramElement { public: SK_DECLARE_INST_COUNT(GrEffect) @@ -205,7 +203,7 @@ private: bool fWillUseInputColor; bool fRequiresVertexShader; - typedef SkRefCnt INHERITED; + typedef GrProgramElement INHERITED; }; /** @@ -217,5 +215,4 @@ static SkAlignedSStorage g_##NAME##_Storage; static GrEffect* NAME SkNEW_PLACEMENT_ARGS(g_##NAME##_Storage.get(), EFFECT_CLASS, ARGS); \ static SkAutoTDestroy NAME##_ad(NAME); - #endif -- cgit v1.2.3