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

Side by Side Diff: ui/gfx/ipc/gfx_param_traits.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/ios/uikit_util_unittest.mm ('k') | ui/gfx/mac/io_surface_manager.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/ipc/gfx_param_traits.h" 5 #include "ui/gfx/ipc/gfx_param_traits.h"
6 6
7 #include <stddef.h>
8 #include <stdint.h>
9
7 #include <string> 10 #include <string>
8 11
9 #include "third_party/skia/include/core/SkBitmap.h" 12 #include "third_party/skia/include/core/SkBitmap.h"
10 #include "ui/gfx/geometry/point3_f.h" 13 #include "ui/gfx/geometry/point3_f.h"
11 #include "ui/gfx/geometry/rect.h" 14 #include "ui/gfx/geometry/rect.h"
12 #include "ui/gfx/geometry/rect_f.h" 15 #include "ui/gfx/geometry/rect_f.h"
13 #include "ui/gfx/geometry/scroll_offset.h" 16 #include "ui/gfx/geometry/scroll_offset.h"
14 #include "ui/gfx/range/range.h" 17 #include "ui/gfx/range/range.h"
15 18
16 namespace { 19 namespace {
17 20
18 struct SkBitmap_Data { 21 struct SkBitmap_Data {
19 // The color type for the bitmap (bits per pixel, etc). 22 // The color type for the bitmap (bits per pixel, etc).
20 SkColorType fColorType; 23 SkColorType fColorType;
21 24
22 // The alpha type for the bitmap (opaque, premul, unpremul). 25 // The alpha type for the bitmap (opaque, premul, unpremul).
23 SkAlphaType fAlphaType; 26 SkAlphaType fAlphaType;
24 27
25 // The width of the bitmap in pixels. 28 // The width of the bitmap in pixels.
26 uint32 fWidth; 29 uint32_t fWidth;
27 30
28 // The height of the bitmap in pixels. 31 // The height of the bitmap in pixels.
29 uint32 fHeight; 32 uint32_t fHeight;
30 33
31 void InitSkBitmapDataForTransfer(const SkBitmap& bitmap) { 34 void InitSkBitmapDataForTransfer(const SkBitmap& bitmap) {
32 const SkImageInfo& info = bitmap.info(); 35 const SkImageInfo& info = bitmap.info();
33 fColorType = info.colorType(); 36 fColorType = info.colorType();
34 fAlphaType = info.alphaType(); 37 fAlphaType = info.alphaType();
35 fWidth = info.width(); 38 fWidth = info.width();
36 fHeight = info.height(); 39 fHeight = info.height();
37 } 40 }
38 41
39 // Returns whether |bitmap| successfully initialized. 42 // Returns whether |bitmap| successfully initialized.
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 #undef UI_GFX_IPC_GFX_PARAM_TRAITS_MACROS_H_ 355 #undef UI_GFX_IPC_GFX_PARAM_TRAITS_MACROS_H_
353 #include "ui/gfx/ipc/gfx_param_traits_macros.h" 356 #include "ui/gfx/ipc/gfx_param_traits_macros.h"
354 } // namespace IPC 357 } // namespace IPC
355 358
356 // Generate param traits log methods. 359 // Generate param traits log methods.
357 #include "ipc/param_traits_log_macros.h" 360 #include "ipc/param_traits_log_macros.h"
358 namespace IPC { 361 namespace IPC {
359 #undef UI_GFX_IPC_GFX_PARAM_TRAITS_MACROS_H_ 362 #undef UI_GFX_IPC_GFX_PARAM_TRAITS_MACROS_H_
360 #include "ui/gfx/ipc/gfx_param_traits_macros.h" 363 #include "ui/gfx/ipc/gfx_param_traits_macros.h"
361 } // namespace IPC 364 } // namespace IPC
OLDNEW
« no previous file with comments | « ui/gfx/ios/uikit_util_unittest.mm ('k') | ui/gfx/mac/io_surface_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698