| Index: cc/texture_layer.cc
|
| diff --git a/cc/texture_layer.cc b/cc/texture_layer.cc
|
| index 127062c32423495868a8ed478f50c27240af25fb..36c4220371d6f5653a7dedae16ed17b414504f96 100644
|
| --- a/cc/texture_layer.cc
|
| +++ b/cc/texture_layer.cc
|
| @@ -28,6 +28,10 @@ TextureLayer::TextureLayer(TextureLayerClient* client)
|
| , m_textureId(0)
|
| , m_contentCommitted(false)
|
| {
|
| + m_vertexOpacity[0] = 1.0f;
|
| + m_vertexOpacity[1] = 1.0f;
|
| + m_vertexOpacity[2] = 1.0f;
|
| + m_vertexOpacity[3] = 1.0f;
|
| }
|
|
|
| TextureLayer::~TextureLayer()
|
| @@ -57,6 +61,21 @@ void TextureLayer::setUVRect(const gfx::RectF& rect)
|
| setNeedsCommit();
|
| }
|
|
|
| +void TextureLayer::setVertexOpacity(float bottomLeft,
|
| + float topLeft,
|
| + float topRight,
|
| + float bottomRight) {
|
| + // Indexing according to the quad vertex generation:
|
| + // 1--2
|
| + // | |
|
| + // 0--3
|
| + m_vertexOpacity[0] = bottomLeft;
|
| + m_vertexOpacity[1] = topLeft;
|
| + m_vertexOpacity[2] = topRight;
|
| + m_vertexOpacity[3] = bottomRight;
|
| + setNeedsCommit();
|
| +}
|
| +
|
| void TextureLayer::setPremultipliedAlpha(bool premultipliedAlpha)
|
| {
|
| m_premultipliedAlpha = premultipliedAlpha;
|
| @@ -126,6 +145,7 @@ void TextureLayer::pushPropertiesTo(LayerImpl* layer)
|
| TextureLayerImpl* textureLayer = static_cast<TextureLayerImpl*>(layer);
|
| textureLayer->setFlipped(m_flipped);
|
| textureLayer->setUVRect(m_uvRect);
|
| + textureLayer->setVertexOpacity(m_vertexOpacity);
|
| textureLayer->setPremultipliedAlpha(m_premultipliedAlpha);
|
| textureLayer->setTextureId(m_textureId);
|
| m_contentCommitted = drawsContent();
|
|
|