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

Side by Side Diff: cc/layers/ui_resource_layer_impl.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/ui_resource_layer.cc ('k') | cc/layers/ui_resource_layer_impl.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_IMPL_H_ 5 #ifndef CC_LAYERS_UI_RESOURCE_LAYER_IMPL_H_
6 #define CC_LAYERS_UI_RESOURCE_LAYER_IMPL_H_ 6 #define CC_LAYERS_UI_RESOURCE_LAYER_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "cc/base/cc_export.h" 10 #include "cc/base/cc_export.h"
(...skipping 15 matching lines...) Expand all
26 int id) { 26 int id) {
27 return make_scoped_ptr(new UIResourceLayerImpl(tree_impl, id)); 27 return make_scoped_ptr(new UIResourceLayerImpl(tree_impl, id));
28 } 28 }
29 virtual ~UIResourceLayerImpl(); 29 virtual ~UIResourceLayerImpl();
30 30
31 void SetUIResourceId(UIResourceId uid); 31 void SetUIResourceId(UIResourceId uid);
32 32
33 void SetImageBounds(gfx::Size image_bounds); 33 void SetImageBounds(gfx::Size image_bounds);
34 34
35 // Sets a UV transform to be used at draw time. Defaults to (0, 0) and (1, 1). 35 // Sets a UV transform to be used at draw time. Defaults to (0, 0) and (1, 1).
36 void SetUV(gfx::PointF top_left, gfx::PointF bottom_right); 36 void SetUV(const gfx::PointF& top_left, const gfx::PointF& bottom_right);
37 37
38 // Sets an opacity value per vertex. It will be multiplied by the layer 38 // Sets an opacity value per vertex. It will be multiplied by the layer
39 // opacity value. 39 // opacity value.
40 void SetVertexOpacity(const float vertex_opacity[4]); 40 void SetVertexOpacity(const float vertex_opacity[4]);
41 41
42 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) 42 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
43 OVERRIDE; 43 OVERRIDE;
44 virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE; 44 virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE;
45 45
46 virtual bool WillDraw(DrawMode draw_mode, 46 virtual bool WillDraw(DrawMode draw_mode,
(...skipping 17 matching lines...) Expand all
64 64
65 private: 65 private:
66 virtual const char* LayerTypeAsString() const OVERRIDE; 66 virtual const char* LayerTypeAsString() const OVERRIDE;
67 67
68 DISALLOW_COPY_AND_ASSIGN(UIResourceLayerImpl); 68 DISALLOW_COPY_AND_ASSIGN(UIResourceLayerImpl);
69 }; 69 };
70 70
71 } // namespace cc 71 } // namespace cc
72 72
73 #endif // CC_LAYERS_UI_RESOURCE_LAYER_IMPL_H_ 73 #endif // CC_LAYERS_UI_RESOURCE_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « cc/layers/ui_resource_layer.cc ('k') | cc/layers/ui_resource_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698