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

Side by Side Diff: cc/test/test_texture.cc

Issue 1539203002: Switch to standard integer types in cc/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more includes 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 | « cc/test/test_texture.h ('k') | cc/test/test_web_graphics_context_3d.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "cc/test/test_texture.h" 5 #include "cc/test/test_texture.h"
6 6
7 #include <stddef.h>
8 #include <stdint.h>
9
7 #include "gpu/GLES2/gl2extchromium.h" 10 #include "gpu/GLES2/gl2extchromium.h"
8 #include "third_party/khronos/GLES2/gl2ext.h" 11 #include "third_party/khronos/GLES2/gl2ext.h"
9 12
10 namespace cc { 13 namespace cc {
11 14
12 size_t TextureSizeBytes(const gfx::Size& size, ResourceFormat format) { 15 size_t TextureSizeBytes(const gfx::Size& size, ResourceFormat format) {
13 unsigned int components_per_pixel = 4; 16 unsigned int components_per_pixel = 4;
14 unsigned int bytes_per_component = 1; 17 unsigned int bytes_per_component = 1;
15 return size.width() * size.height() * components_per_pixel * 18 return size.width() * size.height() * components_per_pixel *
16 bytes_per_component; 19 bytes_per_component;
(...skipping 14 matching lines...) Expand all
31 this->size = size; 34 this->size = size;
32 this->format = format; 35 this->format = format;
33 this->data.reset(new uint8_t[TextureSizeBytes(size, format)]); 36 this->data.reset(new uint8_t[TextureSizeBytes(size, format)]);
34 } 37 }
35 38
36 bool TestTexture::IsValidParameter(GLenum pname) { 39 bool TestTexture::IsValidParameter(GLenum pname) {
37 return params.find(pname) != params.end(); 40 return params.find(pname) != params.end();
38 } 41 }
39 42
40 } // namespace cc 43 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/test_texture.h ('k') | cc/test/test_web_graphics_context_3d.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698