diff options
author | clholgat@chromium.org <clholgat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-15 17:54:58 +0000 |
---|---|---|
committer | clholgat@chromium.org <clholgat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-15 17:54:58 +0000 |
commit | e95e40f8561c5231f475cba340e4c30424d8e0bf (patch) | |
tree | c5df2376379e2d6b5f5b6adde38a0f49d941fe6a /cc/layers/ui_resource_layer_impl.h | |
parent | f0d1c8916ba5d13a4ed2a6cf67fd3ebd19a4caa0 (diff) | |
download | chromium_src-e95e40f8561c5231f475cba340e4c30424d8e0bf.zip chromium_src-e95e40f8561c5231f475cba340e4c30424d8e0bf.tar.gz chromium_src-e95e40f8561c5231f475cba340e4c30424d8e0bf.tar.bz2 |
Adding UV and vertex opacity to UIResourceLayer
We need UV and vertex opacity on the Android side.
Review URL: https://codereview.chromium.org/26948003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228719 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/layers/ui_resource_layer_impl.h')
-rw-r--r-- | cc/layers/ui_resource_layer_impl.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cc/layers/ui_resource_layer_impl.h b/cc/layers/ui_resource_layer_impl.h index 4c1ffb6..7f20050 100644 --- a/cc/layers/ui_resource_layer_impl.h +++ b/cc/layers/ui_resource_layer_impl.h @@ -32,6 +32,13 @@ class CC_EXPORT UIResourceLayerImpl : public LayerImpl { void SetImageBounds(gfx::Size image_bounds); + // Sets a UV transform to be used at draw time. Defaults to (0, 0) and (1, 1). + void SetUV(gfx::PointF top_left, gfx::PointF bottom_right); + + // Sets an opacity value per vertex. It will be multiplied by the layer + // opacity value. + void SetVertexOpacity(const float vertex_opacity[4]); + virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) OVERRIDE; virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE; @@ -51,6 +58,10 @@ class CC_EXPORT UIResourceLayerImpl : public LayerImpl { UIResourceId ui_resource_id_; + gfx::PointF uv_top_left_; + gfx::PointF uv_bottom_right_; + float vertex_opacity_[4]; + private: virtual const char* LayerTypeAsString() const OVERRIDE; |