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

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

Issue 1202843008: cc: Fix BytesPerPixel issue and refactor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moving few functions to their own files. Created 5 years, 6 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.cc ('k') | cc/resources/resource_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CC_RESOURCES_RESOURCE_UTIL_H_
6 #define CC_RESOURCES_RESOURCE_UTIL_H_
7
8 #include "cc/base/cc_export.h"
9 #include "cc/resources/resource_format.h"
10 #include "ui/gfx/geometry/size.h"
11
12 namespace cc {
13
14 class CC_EXPORT ResourceUtil {
15 public:
16 // Return true if the call to UncheckedMemorySizeBytes would return a value
17 // that fits in a size_t.
prashant.n 2015/06/25 15:23:04 These are just the functions moved out resource_pr
18 static bool VerifySizeInBytes(const gfx::Size& size, ResourceFormat format);
19 static size_t CheckedMemorySizeBytes(const gfx::Size& size,
20 ResourceFormat format);
21 static size_t UncheckedMemorySizeBytes(const gfx::Size& size,
22 ResourceFormat format);
23 static size_t UncheckedMemorySizeBytesAligned(const gfx::Size& size,
24 ResourceFormat format);
25
26 private:
27 DISALLOW_COPY_AND_ASSIGN(ResourceUtil);
28 };
29
30 } // namespace cc
31
32 #endif // CC_RESOURCES_RESOURCE_UTIL_H_
OLDNEW
« no previous file with comments | « cc/resources/resource_provider.cc ('k') | cc/resources/resource_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698