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

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

Issue 2748263002: Move cc::DisplayItemList and related classes into cc/paint/ (Closed)
Patch Set: Merge branch 'master' into ccpaint Created 3 years, 9 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/resource_provider.h ('k') | cc/resources/returned_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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_RESOURCE_UTIL_H_ 5 #ifndef CC_RESOURCES_RESOURCE_UTIL_H_
6 #define CC_RESOURCES_RESOURCE_UTIL_H_ 6 #define CC_RESOURCES_RESOURCE_UTIL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <limits> 10 #include <limits>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/numerics/safe_math.h" 13 #include "base/numerics/safe_math.h"
14 #include "cc/base/cc_export.h"
15 #include "cc/base/math_util.h" 14 #include "cc/base/math_util.h"
15 #include "cc/cc_export.h"
16 #include "cc/resources/resource_format.h" 16 #include "cc/resources/resource_format.h"
17 #include "ui/gfx/geometry/size.h" 17 #include "ui/gfx/geometry/size.h"
18 18
19 namespace cc { 19 namespace cc {
20 20
21 class CC_EXPORT ResourceUtil { 21 class CC_EXPORT ResourceUtil {
22 public: 22 public:
23 // Returns true if the width is valid and fits in bytes, false otherwise. 23 // Returns true if the width is valid and fits in bytes, false otherwise.
24 template <typename T> 24 template <typename T>
25 static bool VerifyWidthInBytes(int width, ResourceFormat format); 25 static bool VerifyWidthInBytes(int width, ResourceFormat format);
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 bytes = MathUtil::UncheckedRoundUp<T>(bytes, 4); 204 bytes = MathUtil::UncheckedRoundUp<T>(bytes, 4);
205 if (verify_size) 205 if (verify_size)
206 bytes *= height; 206 bytes *= height;
207 207
208 return bytes; 208 return bytes;
209 } 209 }
210 210
211 } // namespace cc 211 } // namespace cc
212 212
213 #endif // CC_RESOURCES_RESOURCE_UTIL_H_ 213 #endif // CC_RESOURCES_RESOURCE_UTIL_H_
OLDNEW
« no previous file with comments | « cc/resources/resource_provider.h ('k') | cc/resources/returned_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698