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

Side by Side 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: ping 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_TEXTURE_LAYER_H_ 5 #ifndef CC_TEXTURE_LAYER_H_
6 #define CC_TEXTURE_LAYER_H_ 6 #define CC_TEXTURE_LAYER_H_
7 7
8 #include "cc/cc_export.h" 8 #include "cc/cc_export.h"
9 #include "cc/layer.h" 9 #include "cc/layer.h"
10 10
(...skipping 16 matching lines...) Expand all
27 void clearClient() { m_client = 0; } 27 void clearClient() { m_client = 0; }
28 28
29 virtual scoped_ptr<LayerImpl> createLayerImpl(LayerTreeImpl* treeImpl) OVERR IDE; 29 virtual scoped_ptr<LayerImpl> createLayerImpl(LayerTreeImpl* treeImpl) OVERR IDE;
30 30
31 // Sets whether this texture should be Y-flipped at draw time. Defaults to t rue. 31 // Sets whether this texture should be Y-flipped at draw time. Defaults to t rue.
32 void setFlipped(bool); 32 void setFlipped(bool);
33 33
34 // Sets a UV transform to be used at draw time. Defaults to (0, 0, 1, 1). 34 // Sets a UV transform to be used at draw time. Defaults to (0, 0, 1, 1).
35 void setUVRect(const gfx::RectF&); 35 void setUVRect(const gfx::RectF&);
36 36
37 // Sets an opacity value per vertex. It will be multiplied by the layer opac ity value.
38 void setVertexOpacity(float bottomLeft, float topLeft, float topRight, float bottomRight);
39
37 // Sets whether the alpha channel is premultiplied or unpremultiplied. Defau lts to true. 40 // Sets whether the alpha channel is premultiplied or unpremultiplied. Defau lts to true.
38 void setPremultipliedAlpha(bool); 41 void setPremultipliedAlpha(bool);
39 42
40 // Sets whether this context should rate limit on damage to prevent too many frames from 43 // Sets whether this context should rate limit on damage to prevent too many frames from
41 // being queued up before the compositor gets a chance to run. Requires a no n-nil client. 44 // being queued up before the compositor gets a chance to run. Requires a no n-nil client.
42 // Defaults to false. 45 // Defaults to false.
43 void setRateLimitContext(bool); 46 void setRateLimitContext(bool);
44 47
45 // Code path for plugins which supply their own texture ID. 48 // Code path for plugins which supply their own texture ID.
46 void setTextureId(unsigned); 49 void setTextureId(unsigned);
(...skipping 10 matching lines...) Expand all
57 60
58 protected: 61 protected:
59 explicit TextureLayer(TextureLayerClient*); 62 explicit TextureLayer(TextureLayerClient*);
60 virtual ~TextureLayer(); 63 virtual ~TextureLayer();
61 64
62 private: 65 private:
63 TextureLayerClient* m_client; 66 TextureLayerClient* m_client;
64 67
65 bool m_flipped; 68 bool m_flipped;
66 gfx::RectF m_uvRect; 69 gfx::RectF m_uvRect;
70 // [bottom left, top left, top right, bottom right]
71 float m_vertexOpacity[4];
67 bool m_premultipliedAlpha; 72 bool m_premultipliedAlpha;
68 bool m_rateLimitContext; 73 bool m_rateLimitContext;
69 bool m_contextLost; 74 bool m_contextLost;
70 bool m_contentCommitted; 75 bool m_contentCommitted;
71 76
72 unsigned m_textureId; 77 unsigned m_textureId;
73 }; 78 };
74 79
75 } 80 }
76 #endif // CC_TEXTURE_LAYER_H_ 81 #endif // CC_TEXTURE_LAYER_H_
OLDNEW
« 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