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

Unified Diff: ui/gfx/mac/io_surface_manager.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 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/ipc/gfx_param_traits.cc ('k') | ui/gfx/mac/scoped_cocoa_disable_screen_updates.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/mac/io_surface_manager.cc
diff --git a/ui/gfx/mac/io_surface_manager.cc b/ui/gfx/mac/io_surface_manager.cc
index 580196eee77b607b8e5d6edf3a74f9aae2f9c663..9e3e9cfdb377418c7563a12024ce396f35f6cc29 100644
--- a/ui/gfx/mac/io_surface_manager.cc
+++ b/ui/gfx/mac/io_surface_manager.cc
@@ -5,9 +5,12 @@
#include "ui/gfx/mac/io_surface_manager.h"
#include <IOSurface/IOSurface.h>
+#include <stddef.h>
+#include <stdint.h>
#include "base/logging.h"
#include "base/mac/scoped_cftyperef.h"
+#include "base/macros.h"
#include "ui/gfx/buffer_format_util.h"
namespace gfx {
@@ -17,13 +20,13 @@ IOSurfaceManager* g_instance = NULL;
void AddIntegerValue(CFMutableDictionaryRef dictionary,
const CFStringRef key,
- int32 value) {
+ int32_t value) {
base::ScopedCFTypeRef<CFNumberRef> number(
CFNumberCreate(NULL, kCFNumberSInt32Type, &value));
CFDictionaryAddValue(dictionary, key, number.get());
}
-int32 BytesPerElement(gfx::BufferFormat format, int plane) {
+int32_t BytesPerElement(gfx::BufferFormat format, int plane) {
switch (format) {
case gfx::BufferFormat::R_8:
DCHECK_EQ(plane, 0);
@@ -33,7 +36,7 @@ int32 BytesPerElement(gfx::BufferFormat format, int plane) {
DCHECK_EQ(plane, 0);
return 4;
case gfx::BufferFormat::YUV_420_BIPLANAR:
- static int32 bytes_per_element[] = {1, 2};
+ static int32_t bytes_per_element[] = {1, 2};
DCHECK_LT(static_cast<size_t>(plane), arraysize(bytes_per_element));
return bytes_per_element[plane];
case gfx::BufferFormat::UYVY_422:
@@ -56,7 +59,7 @@ int32 BytesPerElement(gfx::BufferFormat format, int plane) {
return 0;
}
-int32 PixelFormat(gfx::BufferFormat format) {
+int32_t PixelFormat(gfx::BufferFormat format) {
switch (format) {
case gfx::BufferFormat::R_8:
return 'L008';
« no previous file with comments | « ui/gfx/ipc/gfx_param_traits.cc ('k') | ui/gfx/mac/scoped_cocoa_disable_screen_updates.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698