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

Side by Side Diff: ui/gfx/buffer_format_util.cc

Issue 1543183002: Switch to standard integer types in ui/gfx/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 | « ui/gfx/buffer_format_util.h ('k') | ui/gfx/canvas.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 #include "ui/gfx/buffer_format_util.h" 5 #include "ui/gfx/buffer_format_util.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/macros.h"
8 #include "base/numerics/safe_math.h" 9 #include "base/numerics/safe_math.h"
9 10
10 namespace gfx { 11 namespace gfx {
11 namespace { 12 namespace {
12 13
13 const BufferFormat kBufferFormats[] = {BufferFormat::ATC, 14 const BufferFormat kBufferFormats[] = {BufferFormat::ATC,
14 BufferFormat::ATCIA, 15 BufferFormat::ATCIA,
15 BufferFormat::DXT1, 16 BufferFormat::DXT1,
16 BufferFormat::DXT5, 17 BufferFormat::DXT5,
17 BufferFormat::ETC1, 18 BufferFormat::ETC1,
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 DCHECK_LT(plane, arraysize(offset_in_2x2_sub_sampling_sizes)); 208 DCHECK_LT(plane, arraysize(offset_in_2x2_sub_sampling_sizes));
208 return offset_in_2x2_sub_sampling_sizes[plane] * 209 return offset_in_2x2_sub_sampling_sizes[plane] *
209 (size.width() / 2 + size.height() / 2); 210 (size.width() / 2 + size.height() / 2);
210 } 211 }
211 } 212 }
212 NOTREACHED(); 213 NOTREACHED();
213 return 0; 214 return 0;
214 } 215 }
215 216
216 } // namespace gfx 217 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/buffer_format_util.h ('k') | ui/gfx/canvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698