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

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

Issue 145313006: [#7] Pass gfx structs by const ref (gfx::Size) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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/layer_tiling_data.cc ('k') | cc/resources/picture_layer_tiling.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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 }; 42 };
43 43
44 LayerUpdater() {} 44 LayerUpdater() {}
45 45
46 virtual scoped_ptr<Resource> CreateResource( 46 virtual scoped_ptr<Resource> CreateResource(
47 PrioritizedResourceManager* manager) = 0; 47 PrioritizedResourceManager* manager) = 0;
48 // The |resulting_opaque_rect| gives back a region of the layer that was 48 // The |resulting_opaque_rect| gives back a region of the layer that was
49 // painted opaque. If the layer is marked opaque in the updater, then this 49 // painted opaque. If the layer is marked opaque in the updater, then this
50 // region should be ignored in preference for the entire layer's area. 50 // region should be ignored in preference for the entire layer's area.
51 virtual void PrepareToUpdate(const gfx::Rect& content_rect, 51 virtual void PrepareToUpdate(const gfx::Rect& content_rect,
52 gfx::Size tile_size, 52 const gfx::Size& tile_size,
53 float contents_width_scale, 53 float contents_width_scale,
54 float contents_height_scale, 54 float contents_height_scale,
55 gfx::Rect* resulting_opaque_rect) {} 55 gfx::Rect* resulting_opaque_rect) {}
56 virtual void ReduceMemoryUsage() {} 56 virtual void ReduceMemoryUsage() {}
57 57
58 // Set true by the layer when it is known that the entire output is going to 58 // Set true by the layer when it is known that the entire output is going to
59 // be opaque. 59 // be opaque.
60 virtual void SetOpaque(bool opaque) {} 60 virtual void SetOpaque(bool opaque) {}
61 61
62 protected: 62 protected:
63 virtual ~LayerUpdater() {} 63 virtual ~LayerUpdater() {}
64 64
65 private: 65 private:
66 friend class base::RefCounted<LayerUpdater>; 66 friend class base::RefCounted<LayerUpdater>;
67 67
68 DISALLOW_COPY_AND_ASSIGN(LayerUpdater); 68 DISALLOW_COPY_AND_ASSIGN(LayerUpdater);
69 }; 69 };
70 70
71 } // namespace cc 71 } // namespace cc
72 72
73 #endif // CC_RESOURCES_LAYER_UPDATER_H_ 73 #endif // CC_RESOURCES_LAYER_UPDATER_H_
OLDNEW
« no previous file with comments | « cc/resources/layer_tiling_data.cc ('k') | cc/resources/picture_layer_tiling.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698