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

Side by Side Diff: content/common/gpu/gpu_memory_allocation.h

Issue 11419224: Add missing (and remove superfluous) 'explicit' from constructors. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + remove non-straightforward changes Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_COMMON_GPU_GPU_MEMORY_ALLOCATION_H_ 5 #ifndef CONTENT_COMMON_GPU_GPU_MEMORY_ALLOCATION_H_
6 #define CONTENT_COMMON_GPU_GPU_MEMORY_ALLOCATION_H_ 6 #define CONTENT_COMMON_GPU_GPU_MEMORY_ALLOCATION_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 9
10 namespace content { 10 namespace content {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 GpuMemoryAllocationForRenderer() 45 GpuMemoryAllocationForRenderer()
46 : bytes_limit_when_visible(0), 46 : bytes_limit_when_visible(0),
47 priority_cutoff_when_visible(kPriorityCutoffAllowNothing), 47 priority_cutoff_when_visible(kPriorityCutoffAllowNothing),
48 bytes_limit_when_not_visible(0), 48 bytes_limit_when_not_visible(0),
49 priority_cutoff_when_not_visible(kPriorityCutoffAllowNothing), 49 priority_cutoff_when_not_visible(kPriorityCutoffAllowNothing),
50 have_backbuffer_when_not_visible(false), 50 have_backbuffer_when_not_visible(false),
51 enforce_but_do_not_keep_as_policy(false) { 51 enforce_but_do_not_keep_as_policy(false) {
52 } 52 }
53 53
54 GpuMemoryAllocationForRenderer(size_t bytes_limit_when_visible) 54 explicit GpuMemoryAllocationForRenderer(size_t bytes_limit_when_visible)
55 : bytes_limit_when_visible(bytes_limit_when_visible), 55 : bytes_limit_when_visible(bytes_limit_when_visible),
56 priority_cutoff_when_visible(kPriorityCutoffAllowEverything), 56 priority_cutoff_when_visible(kPriorityCutoffAllowEverything),
57 bytes_limit_when_not_visible(0), 57 bytes_limit_when_not_visible(0),
58 priority_cutoff_when_not_visible(kPriorityCutoffAllowNothing), 58 priority_cutoff_when_not_visible(kPriorityCutoffAllowNothing),
59 have_backbuffer_when_not_visible(false), 59 have_backbuffer_when_not_visible(false),
60 enforce_but_do_not_keep_as_policy(false) { 60 enforce_but_do_not_keep_as_policy(false) {
61 } 61 }
62 62
63 bool Equals(const GpuMemoryAllocationForRenderer& other) const { 63 bool Equals(const GpuMemoryAllocationForRenderer& other) const {
64 return bytes_limit_when_visible == 64 return bytes_limit_when_visible ==
(...skipping 10 matching lines...) Expand all
75 }; 75 };
76 76
77 // Memory Allocation which will be assigned to the browser. 77 // Memory Allocation which will be assigned to the browser.
78 struct GpuMemoryAllocationForBrowser { 78 struct GpuMemoryAllocationForBrowser {
79 bool suggest_have_frontbuffer; 79 bool suggest_have_frontbuffer;
80 80
81 GpuMemoryAllocationForBrowser() 81 GpuMemoryAllocationForBrowser()
82 : suggest_have_frontbuffer(false) { 82 : suggest_have_frontbuffer(false) {
83 } 83 }
84 84
85 GpuMemoryAllocationForBrowser(bool suggest_have_frontbuffer) 85 explicit GpuMemoryAllocationForBrowser(bool suggest_have_frontbuffer)
86 : suggest_have_frontbuffer(suggest_have_frontbuffer) { 86 : suggest_have_frontbuffer(suggest_have_frontbuffer) {
87 } 87 }
88 88
89 bool Equals(const GpuMemoryAllocationForBrowser& other) const { 89 bool Equals(const GpuMemoryAllocationForBrowser& other) const {
90 return suggest_have_frontbuffer == other.suggest_have_frontbuffer; 90 return suggest_have_frontbuffer == other.suggest_have_frontbuffer;
91 } 91 }
92 }; 92 };
93 93
94 // Combination of the above two Memory Allocations which will be created by the 94 // Combination of the above two Memory Allocations which will be created by the
95 // GpuMemoryManager. 95 // GpuMemoryManager.
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 return bytes_required == other.bytes_required && 155 return bytes_required == other.bytes_required &&
156 bytes_nice_to_have == other.bytes_nice_to_have && 156 bytes_nice_to_have == other.bytes_nice_to_have &&
157 bytes_allocated == other.bytes_allocated && 157 bytes_allocated == other.bytes_allocated &&
158 backbuffer_requested == other.backbuffer_requested; 158 backbuffer_requested == other.backbuffer_requested;
159 } 159 }
160 }; 160 };
161 161
162 } // namespace content 162 } // namespace content
163 163
164 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_ALLOCATION_H_ 164 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_ALLOCATION_H_
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_command_buffer_stub.cc ('k') | content/common/gpu/media/mac_video_decode_accelerator.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698