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

Unified Diff: cc/texture_layer.h

Issue 11570027: Adding support for per vertex opacity on textured layer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixing unittest Created 8 years 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 side-by-side diff with in-line comments
Download patch
Index: cc/texture_layer.h
diff --git a/cc/texture_layer.h b/cc/texture_layer.h
index 0f177566d8ba069273996233d51d0b27105c3b84..2e7921e4bd33ca6a315ed224c1f462eebb3e945a 100644
--- a/cc/texture_layer.h
+++ b/cc/texture_layer.h
@@ -34,6 +34,9 @@ public:
// Sets a UV transform to be used at draw time. Defaults to (0, 0, 1, 1).
void setUVRect(const gfx::RectF&);
+ // Sets an opacity value per vertex. It will be multiplied by the layer opacity value.
+ void setVertexOpacity(float bottomLeft, float topLeft, float topRight, float bottomRight);
+
// Sets whether the alpha channel is premultiplied or unpremultiplied. Defaults to true.
void setPremultipliedAlpha(bool);
@@ -64,6 +67,8 @@ private:
bool m_flipped;
gfx::RectF m_uvRect;
+ // [bottom left, top left, top right, bottom right]
+ float m_vertexOpacity[4];
bool m_premultipliedAlpha;
bool m_rateLimitContext;
bool m_contextLost;
« cc/texture_draw_quad.cc ('K') | « cc/texture_draw_quad.cc ('k') | cc/texture_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698