From 0342a85091fd430c90a142d155dc9642aa729d9e Mon Sep 17 00:00:00 2001 From: "bsalomon@google.com" Date: Mon, 20 Aug 2012 19:22:38 +0000 Subject: Remove _UPM_ GrPixelConfigs Review URL: http://codereview.appspot.com/6460113/ git-svn-id: http://skia.googlecode.com/svn/trunk@5196 2bbb7eff-a529-9590-31e7-b0007b416f81 --- include/gpu/GrSamplerState.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/gpu/GrSamplerState.h') diff --git a/include/gpu/GrSamplerState.h b/include/gpu/GrSamplerState.h index dcd5b66283..f87b9b4e10 100644 --- a/include/gpu/GrSamplerState.h +++ b/include/gpu/GrSamplerState.h @@ -130,6 +130,7 @@ public: const GrMatrix& getMatrix() const { return fMatrix; } bool swapsRAndB() const { return fSwapRAndB; } + bool premultiply() const { return fPremultiply; } GrTextureParams* textureParams() { return &fTextureParams; } const GrTextureParams& getTextureParams() const { return fTextureParams; } @@ -145,6 +146,12 @@ public: */ void setRAndBSwap(bool swap) { fSwapRAndB = swap; } + /** + * If the texture is RGBA/BGRA 8888 config then its rgb components will be + * multiplied by its a component after the texture read. + **/ + void setPremultiply(bool premul) { fPremultiply = premul; } + /** * Multiplies the current sampler matrix a matrix * @@ -163,6 +170,7 @@ public: fTextureParams.reset(tileXAndY, filter); fMatrix = matrix; fSwapRAndB = false; + fPremultiply = false; GrSafeSetNull(fCustomStage); } void reset(SkShader::TileMode wrapXAndY, bool filter) { @@ -184,6 +192,7 @@ public: private: GrTextureParams fTextureParams; bool fSwapRAndB; + bool fPremultiply; // temporary, will be replaced soon by a custom stage. GrMatrix fMatrix; GrCustomStage* fCustomStage; -- cgit v1.2.3