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

Side by Side Diff: cc/resources/layer_updater.h

Issue 132163009: [#6]Pass gfx structs by const ref (gfx::Vector2d) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on TOT Created 6 years, 10 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/resources/image_layer_updater.cc ('k') | cc/resources/prioritized_resource.h » ('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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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_RESOURCES_LAYER_UPDATER_H_ 5 #ifndef CC_RESOURCES_LAYER_UPDATER_H_
6 #define CC_RESOURCES_LAYER_UPDATER_H_ 6 #define CC_RESOURCES_LAYER_UPDATER_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "cc/base/cc_export.h" 10 #include "cc/base/cc_export.h"
(...skipping 12 matching lines...) Expand all
23 // Allows updaters to store per-resource update properties. 23 // Allows updaters to store per-resource update properties.
24 class CC_EXPORT Resource { 24 class CC_EXPORT Resource {
25 public: 25 public:
26 virtual ~Resource(); 26 virtual ~Resource();
27 27
28 PrioritizedResource* texture() { return texture_.get(); } 28 PrioritizedResource* texture() { return texture_.get(); }
29 // TODO(reveman): partial_update should be a property of this class 29 // TODO(reveman): partial_update should be a property of this class
30 // instead of an argument passed to Update(). 30 // instead of an argument passed to Update().
31 virtual void Update(ResourceUpdateQueue* queue, 31 virtual void Update(ResourceUpdateQueue* queue,
32 const gfx::Rect& source_rect, 32 const gfx::Rect& source_rect,
33 gfx::Vector2d dest_offset, 33 const gfx::Vector2d& dest_offset,
34 bool partial_update) = 0; 34 bool partial_update) = 0;
35
35 protected: 36 protected:
36 explicit Resource(scoped_ptr<PrioritizedResource> texture); 37 explicit Resource(scoped_ptr<PrioritizedResource> texture);
37 38
38 private: 39 private:
39 scoped_ptr<PrioritizedResource> texture_; 40 scoped_ptr<PrioritizedResource> texture_;
40 41
41 DISALLOW_COPY_AND_ASSIGN(Resource); 42 DISALLOW_COPY_AND_ASSIGN(Resource);
42 }; 43 };
43 44
44 LayerUpdater() {} 45 LayerUpdater() {}
(...skipping 19 matching lines...) Expand all
64 65
65 private: 66 private:
66 friend class base::RefCounted<LayerUpdater>; 67 friend class base::RefCounted<LayerUpdater>;
67 68
68 DISALLOW_COPY_AND_ASSIGN(LayerUpdater); 69 DISALLOW_COPY_AND_ASSIGN(LayerUpdater);
69 }; 70 };
70 71
71 } // namespace cc 72 } // namespace cc
72 73
73 #endif // CC_RESOURCES_LAYER_UPDATER_H_ 74 #endif // CC_RESOURCES_LAYER_UPDATER_H_
OLDNEW
« no previous file with comments | « cc/resources/image_layer_updater.cc ('k') | cc/resources/prioritized_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698