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

Side by Side Diff: cc/layers/ui_resource_layer.h

Issue 139233002: [#4] Pass gfx structs by const ref (gfx::PointF) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Corrected as per review comments! Created 6 years, 11 months 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
« no previous file with comments | « cc/layers/texture_layer_impl.h ('k') | cc/layers/ui_resource_layer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_LAYERS_UI_RESOURCE_LAYER_H_ 5 #ifndef CC_LAYERS_UI_RESOURCE_LAYER_H_
6 #define CC_LAYERS_UI_RESOURCE_LAYER_H_ 6 #define CC_LAYERS_UI_RESOURCE_LAYER_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "cc/base/cc_export.h" 9 #include "cc/base/cc_export.h"
10 #include "cc/layers/layer.h" 10 #include "cc/layers/layer.h"
(...skipping 14 matching lines...) Expand all
25 virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE; 25 virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE;
26 26
27 virtual void SetLayerTreeHost(LayerTreeHost* host) OVERRIDE; 27 virtual void SetLayerTreeHost(LayerTreeHost* host) OVERRIDE;
28 28
29 void SetBitmap(const SkBitmap& skbitmap); 29 void SetBitmap(const SkBitmap& skbitmap);
30 30
31 // An alternative way of setting the resource to allow for sharing. 31 // An alternative way of setting the resource to allow for sharing.
32 void SetUIResourceId(UIResourceId resource_id); 32 void SetUIResourceId(UIResourceId resource_id);
33 33
34 // Sets a UV transform to be used at draw time. Defaults to (0, 0) and (1, 1). 34 // Sets a UV transform to be used at draw time. Defaults to (0, 0) and (1, 1).
35 void SetUV(gfx::PointF top_left, gfx::PointF bottom_right); 35 void SetUV(const gfx::PointF& top_left, const gfx::PointF& bottom_right);
36 36
37 // Sets an opacity value per vertex. It will be multiplied by the layer 37 // Sets an opacity value per vertex. It will be multiplied by the layer
38 // opacity value. 38 // opacity value.
39 void SetVertexOpacity(float bottom_left, 39 void SetVertexOpacity(float bottom_left,
40 float top_left, 40 float top_left,
41 float top_right, 41 float top_right,
42 float bottom_right); 42 float bottom_right);
43 43
44 class UIResourceHolder { 44 class UIResourceHolder {
45 public: 45 public:
(...skipping 18 matching lines...) Expand all
64 void RecreateUIResourceHolder(); 64 void RecreateUIResourceHolder();
65 65
66 66
67 67
68 DISALLOW_COPY_AND_ASSIGN(UIResourceLayer); 68 DISALLOW_COPY_AND_ASSIGN(UIResourceLayer);
69 }; 69 };
70 70
71 } // namespace cc 71 } // namespace cc
72 72
73 #endif // CC_LAYERS_UI_RESOURCE_LAYER_H_ 73 #endif // CC_LAYERS_UI_RESOURCE_LAYER_H_
OLDNEW
« no previous file with comments | « cc/layers/texture_layer_impl.h ('k') | cc/layers/ui_resource_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698