Switch to standard integer types in ui/gl/.
BUG=138542
[email protected]
Review URL: https://codereview.chromium.org/1545113002
Cr-Commit-Position: refs/heads/master@{#366830}
diff --git a/ui/gl/android/gl_jni_registrar.cc b/ui/gl/android/gl_jni_registrar.cc
index 91ae65f..29a332b 100644
--- a/ui/gl/android/gl_jni_registrar.cc
+++ b/ui/gl/android/gl_jni_registrar.cc
@@ -6,6 +6,7 @@
#include "base/android/jni_android.h"
#include "base/android/jni_registrar.h"
+#include "base/macros.h"
#include "ui/gl/android/surface_texture.h"
#include "ui/gl/android/surface_texture_listener.h"
diff --git a/ui/gl/android/surface_texture.h b/ui/gl/android/surface_texture.h
index c6ae704..56282ff 100644
--- a/ui/gl/android/surface_texture.h
+++ b/ui/gl/android/surface_texture.h
@@ -9,6 +9,7 @@
#include "base/android/scoped_java_ref.h"
#include "base/callback.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "ui/gl/gl_export.h"
diff --git a/ui/gl/android/surface_texture_listener.h b/ui/gl/android/surface_texture_listener.h
index a11d2de2..c9d8ff5 100644
--- a/ui/gl/android/surface_texture_listener.h
+++ b/ui/gl/android/surface_texture_listener.h
@@ -9,6 +9,7 @@
#include "base/android/scoped_java_ref.h"
#include "base/callback.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/sequenced_task_runner_helpers.h"
#include "ui/gl/gl_export.h"
diff --git a/ui/gl/egl_util.cc b/ui/gl/egl_util.cc
index 17d91d1..77044f4 100644
--- a/ui/gl/egl_util.cc
+++ b/ui/gl/egl_util.cc
@@ -4,6 +4,8 @@
#include "ui/gl/egl_util.h"
+#include "build/build_config.h"
+
#if defined(OS_ANDROID)
#include <EGL/egl.h>
#else
diff --git a/ui/gl/egl_util.h b/ui/gl/egl_util.h
index e2b2ffc..d86e863 100644
--- a/ui/gl/egl_util.h
+++ b/ui/gl/egl_util.h
@@ -5,7 +5,8 @@
#ifndef UI_GL_EGL_UTIL_H_
#define UI_GL_EGL_UTIL_H_
-#include "base/basictypes.h"
+#include <stdint.h>
+
#include "ui/gl/gl_export.h"
namespace ui {
diff --git a/ui/gl/gl_api_unittest.cc b/ui/gl/gl_api_unittest.cc
index a5d1a9c1..08695b1 100644
--- a/ui/gl/gl_api_unittest.cc
+++ b/ui/gl/gl_api_unittest.cc
@@ -2,7 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <stdint.h>
+
#include "base/command_line.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gl/gl_context.h"
diff --git a/ui/gl/gl_bindings.cc b/ui/gl/gl_bindings.cc
index 0a1fd19..bb700c3 100644
--- a/ui/gl/gl_bindings.cc
+++ b/ui/gl/gl_bindings.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "build/build_config.h"
+
#if defined(OS_WIN) || defined(USE_X11) || defined(OS_ANDROID) || defined(USE_OZONE)
#include <EGL/egl.h>
#endif
diff --git a/ui/gl/gl_bindings.h b/ui/gl/gl_bindings.h
index 699d9fe..b570d00 100644
--- a/ui/gl/gl_bindings.h
+++ b/ui/gl/gl_bindings.h
@@ -5,6 +5,8 @@
#ifndef UI_GL_GL_BINDINGS_H_
#define UI_GL_GL_BINDINGS_H_
+#include <stdint.h>
+
#include <string>
// Includes the platform independent and platform dependent GL headers.
@@ -369,7 +371,7 @@
typedef void (*OSMESAproc)();
// Forward declare EGL types.
-typedef uint64 EGLuint64CHROMIUM;
+typedef uint64_t EGLuint64CHROMIUM;
#include "gl_bindings_autogen_gl.h"
#include "gl_bindings_autogen_osmesa.h"
diff --git a/ui/gl/gl_bindings_api_autogen_glx.h b/ui/gl/gl_bindings_api_autogen_glx.h
index 7efbae1..d36199ce 100644
--- a/ui/gl/gl_bindings_api_autogen_glx.h
+++ b/ui/gl/gl_bindings_api_autogen_glx.h
@@ -82,16 +82,16 @@
int* nelements) override;
bool glXGetMscRateOMLFn(Display* dpy,
GLXDrawable drawable,
- int32* numerator,
- int32* denominator) override;
+ int32_t* numerator,
+ int32_t* denominator) override;
void glXGetSelectedEventFn(Display* dpy,
GLXDrawable drawable,
unsigned long* mask) override;
bool glXGetSyncValuesOMLFn(Display* dpy,
GLXDrawable drawable,
- int64* ust,
- int64* msc,
- int64* sbc) override;
+ int64_t* ust,
+ int64_t* msc,
+ int64_t* sbc) override;
XVisualInfo* glXGetVisualFromFBConfigFn(Display* dpy,
GLXFBConfig config) override;
int glXIsDirectFn(Display* dpy, GLXContext ctx) override;
diff --git a/ui/gl/gl_bindings_autogen_glx.cc b/ui/gl/gl_bindings_autogen_glx.cc
index edd08f5..02aee398 100644
--- a/ui/gl/gl_bindings_autogen_glx.cc
+++ b/ui/gl/gl_bindings_autogen_glx.cc
@@ -502,8 +502,8 @@
static bool GL_BINDING_CALL Debug_glXGetMscRateOML(Display* dpy,
GLXDrawable drawable,
- int32* numerator,
- int32* denominator) {
+ int32_t* numerator,
+ int32_t* denominator) {
GL_SERVICE_LOG("glXGetMscRateOML"
<< "(" << static_cast<const void*>(dpy) << ", " << drawable
<< ", " << static_cast<const void*>(numerator) << ", "
@@ -525,9 +525,9 @@
static bool GL_BINDING_CALL Debug_glXGetSyncValuesOML(Display* dpy,
GLXDrawable drawable,
- int64* ust,
- int64* msc,
- int64* sbc) {
+ int64_t* ust,
+ int64_t* msc,
+ int64_t* sbc) {
GL_SERVICE_LOG("glXGetSyncValuesOML"
<< "(" << static_cast<const void*>(dpy) << ", " << drawable
<< ", " << static_cast<const void*>(ust) << ", "
@@ -1087,8 +1087,8 @@
bool GLXApiBase::glXGetMscRateOMLFn(Display* dpy,
GLXDrawable drawable,
- int32* numerator,
- int32* denominator) {
+ int32_t* numerator,
+ int32_t* denominator) {
return driver_->fn.glXGetMscRateOMLFn(dpy, drawable, numerator, denominator);
}
@@ -1100,9 +1100,9 @@
bool GLXApiBase::glXGetSyncValuesOMLFn(Display* dpy,
GLXDrawable drawable,
- int64* ust,
- int64* msc,
- int64* sbc) {
+ int64_t* ust,
+ int64_t* msc,
+ int64_t* sbc) {
return driver_->fn.glXGetSyncValuesOMLFn(dpy, drawable, ust, msc, sbc);
}
@@ -1386,8 +1386,8 @@
bool TraceGLXApi::glXGetMscRateOMLFn(Display* dpy,
GLXDrawable drawable,
- int32* numerator,
- int32* denominator) {
+ int32_t* numerator,
+ int32_t* denominator) {
TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXGetMscRateOML")
return glx_api_->glXGetMscRateOMLFn(dpy, drawable, numerator, denominator);
}
@@ -1401,9 +1401,9 @@
bool TraceGLXApi::glXGetSyncValuesOMLFn(Display* dpy,
GLXDrawable drawable,
- int64* ust,
- int64* msc,
- int64* sbc) {
+ int64_t* ust,
+ int64_t* msc,
+ int64_t* sbc) {
TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXGetSyncValuesOML")
return glx_api_->glXGetSyncValuesOMLFn(dpy, drawable, ust, msc, sbc);
}
diff --git a/ui/gl/gl_bindings_autogen_glx.h b/ui/gl/gl_bindings_autogen_glx.h
index 41baf29..fe2ae41 100644
--- a/ui/gl/gl_bindings_autogen_glx.h
+++ b/ui/gl/gl_bindings_autogen_glx.h
@@ -100,16 +100,16 @@
int* nelements);
typedef bool(GL_BINDING_CALL* glXGetMscRateOMLProc)(Display* dpy,
GLXDrawable drawable,
- int32* numerator,
- int32* denominator);
+ int32_t* numerator,
+ int32_t* denominator);
typedef void(GL_BINDING_CALL* glXGetSelectedEventProc)(Display* dpy,
GLXDrawable drawable,
unsigned long* mask);
typedef bool(GL_BINDING_CALL* glXGetSyncValuesOMLProc)(Display* dpy,
GLXDrawable drawable,
- int64* ust,
- int64* msc,
- int64* sbc);
+ int64_t* ust,
+ int64_t* msc,
+ int64_t* sbc);
typedef XVisualInfo*(GL_BINDING_CALL* glXGetVisualFromFBConfigProc)(
Display* dpy,
GLXFBConfig config);
@@ -304,16 +304,16 @@
int* nelements) = 0;
virtual bool glXGetMscRateOMLFn(Display* dpy,
GLXDrawable drawable,
- int32* numerator,
- int32* denominator) = 0;
+ int32_t* numerator,
+ int32_t* denominator) = 0;
virtual void glXGetSelectedEventFn(Display* dpy,
GLXDrawable drawable,
unsigned long* mask) = 0;
virtual bool glXGetSyncValuesOMLFn(Display* dpy,
GLXDrawable drawable,
- int64* ust,
- int64* msc,
- int64* sbc) = 0;
+ int64_t* ust,
+ int64_t* msc,
+ int64_t* sbc) = 0;
virtual XVisualInfo* glXGetVisualFromFBConfigFn(Display* dpy,
GLXFBConfig config) = 0;
virtual int glXIsDirectFn(Display* dpy, GLXContext ctx) = 0;
diff --git a/ui/gl/gl_context.h b/ui/gl/gl_context.h
index f7b971d1..2b4ec0e 100644
--- a/ui/gl/gl_context.h
+++ b/ui/gl/gl_context.h
@@ -8,8 +8,8 @@
#include <string>
#include <vector>
-#include "base/basictypes.h"
#include "base/cancelable_callback.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/synchronization/cancellation_flag.h"
diff --git a/ui/gl/gl_context_android.cc b/ui/gl/gl_context_android.cc
index 46f281b4..3c67b20 100644
--- a/ui/gl/gl_context_android.cc
+++ b/ui/gl/gl_context_android.cc
@@ -5,6 +5,7 @@
#include "ui/gl/gl_context.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/sys_info.h"
#include "ui/gl/gl_bindings.h"
diff --git a/ui/gl/gl_context_cgl.h b/ui/gl/gl_context_cgl.h
index 3cb850a..bb7a241 100644
--- a/ui/gl/gl_context_cgl.h
+++ b/ui/gl/gl_context_cgl.h
@@ -7,6 +7,7 @@
#include <OpenGL/CGLTypes.h>
+#include "base/macros.h"
#include "ui/gl/gl_context.h"
namespace gfx {
diff --git a/ui/gl/gl_context_egl.h b/ui/gl/gl_context_egl.h
index e86bcaa..4b1f42e 100644
--- a/ui/gl/gl_context_egl.h
+++ b/ui/gl/gl_context_egl.h
@@ -8,6 +8,7 @@
#include <string>
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "ui/gl/gl_context.h"
typedef void* EGLContext;
diff --git a/ui/gl/gl_context_glx.h b/ui/gl/gl_context_glx.h
index 3881b444..870f841 100644
--- a/ui/gl/gl_context_glx.h
+++ b/ui/gl/gl_context_glx.h
@@ -8,6 +8,7 @@
#include <string>
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "ui/gfx/x/x11_types.h"
#include "ui/gl/gl_context.h"
#include "ui/gl/gl_export.h"
diff --git a/ui/gl/gl_context_mac.mm b/ui/gl/gl_context_mac.mm
index b20cee28..864c61a9 100644
--- a/ui/gl/gl_context_mac.mm
+++ b/ui/gl/gl_context_mac.mm
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/basictypes.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/trace_event/trace_event.h"
diff --git a/ui/gl/gl_context_osmesa.h b/ui/gl/gl_context_osmesa.h
index 597e0143..d5612d6 100644
--- a/ui/gl/gl_context_osmesa.h
+++ b/ui/gl/gl_context_osmesa.h
@@ -5,8 +5,8 @@
#ifndef UI_GL_GL_CONTEXT_OSMESA_H_
#define UI_GL_GL_CONTEXT_OSMESA_H_
-#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "ui/gl/gl_context.h"
typedef struct osmesa_context* OSMesaContext;
diff --git a/ui/gl/gl_context_stub.h b/ui/gl/gl_context_stub.h
index 811f908..0d62509 100644
--- a/ui/gl/gl_context_stub.h
+++ b/ui/gl/gl_context_stub.h
@@ -5,6 +5,7 @@
#ifndef UI_GL_GL_CONTEXT_STUB_H_
#define UI_GL_GL_CONTEXT_STUB_H_
+#include "base/macros.h"
#include "ui/gl/gl_context.h"
namespace gfx {
diff --git a/ui/gl/gl_context_stub_with_extensions.h b/ui/gl/gl_context_stub_with_extensions.h
index d9da9d5..1bc1b3f 100644
--- a/ui/gl/gl_context_stub_with_extensions.h
+++ b/ui/gl/gl_context_stub_with_extensions.h
@@ -5,6 +5,7 @@
#ifndef UI_GL_GL_CONTEXT_STUB_WITH_EXTENSIONS_H_
#define UI_GL_GL_CONTEXT_STUB_WITH_EXTENSIONS_H_
+#include "base/macros.h"
#include "ui/gl/gl_context_stub.h"
namespace gfx {
diff --git a/ui/gl/gl_context_wgl.h b/ui/gl/gl_context_wgl.h
index 21b3840..69c7e5c0 100644
--- a/ui/gl/gl_context_wgl.h
+++ b/ui/gl/gl_context_wgl.h
@@ -7,6 +7,7 @@
#include <string>
+#include "base/macros.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gl/gl_context.h"
diff --git a/ui/gl/gl_enums.cc b/ui/gl/gl_enums.cc
index d43681e..fbe0446 100644
--- a/ui/gl/gl_enums.cc
+++ b/ui/gl/gl_enums.cc
@@ -9,7 +9,7 @@
namespace gfx {
-std::string GLEnums::GetStringEnum(uint32 value) {
+std::string GLEnums::GetStringEnum(uint32_t value) {
const EnumToString* entry = enum_to_string_table_;
const EnumToString* end = entry + enum_to_string_table_len_;
for (;entry < end; ++entry) {
@@ -24,13 +24,13 @@
return "0x" + ss.str();
}
-std::string GLEnums::GetStringError(uint32 value) {
+std::string GLEnums::GetStringError(uint32_t value) {
if (value == GL_NONE)
return "GL_NONE";
return GetStringEnum(value);
}
-std::string GLEnums::GetStringBool(uint32 value) {
+std::string GLEnums::GetStringBool(uint32_t value) {
return value ? "GL_TRUE" : "GL_FALSE";
}
diff --git a/ui/gl/gl_enums.h b/ui/gl/gl_enums.h
index 30dee6c46..1c2d7ed 100644
--- a/ui/gl/gl_enums.h
+++ b/ui/gl/gl_enums.h
@@ -5,9 +5,11 @@
#ifndef UI_GL_GL_ENUMS_H_
#define UI_GL_GL_ENUMS_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <string>
-#include "base/basictypes.h"
#include "ui/gl/gl_export.h"
namespace gfx {
diff --git a/ui/gl/gl_fence.cc b/ui/gl/gl_fence.cc
index 694f22d..92aba19 100644
--- a/ui/gl/gl_fence.cc
+++ b/ui/gl/gl_fence.cc
@@ -5,6 +5,7 @@
#include "ui/gl/gl_fence.h"
#include "base/compiler_specific.h"
+#include "build/build_config.h"
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_context.h"
#include "ui/gl/gl_fence_arb.h"
diff --git a/ui/gl/gl_fence.h b/ui/gl/gl_fence.h
index 76511f4..cc25a1d7 100644
--- a/ui/gl/gl_fence.h
+++ b/ui/gl/gl_fence.h
@@ -5,7 +5,7 @@
#ifndef UI_GL_GL_FENCE_H_
#define UI_GL_GL_FENCE_H_
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "ui/gl/gl_export.h"
namespace gfx {
diff --git a/ui/gl/gl_helper.h b/ui/gl/gl_helper.h
index e38ecf1a..bbe829e 100644
--- a/ui/gl/gl_helper.h
+++ b/ui/gl/gl_helper.h
@@ -5,7 +5,6 @@
#ifndef UI_GL_GL_HELPER_H_
#define UI_GL_GL_HELPER_H_
-#include "base/basictypes.h"
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_export.h"
diff --git a/ui/gl/gl_image.h b/ui/gl/gl_image.h
index c96d3d3..6b98fe9 100644
--- a/ui/gl/gl_image.h
+++ b/ui/gl/gl_image.h
@@ -5,8 +5,11 @@
#ifndef UI_GL_GL_IMAGE_H_
#define UI_GL_GL_IMAGE_H_
+#include <stdint.h>
+
#include <string>
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/rect.h"
diff --git a/ui/gl/gl_image_egl.h b/ui/gl/gl_image_egl.h
index bb68e10..b613182 100644
--- a/ui/gl/gl_image_egl.h
+++ b/ui/gl/gl_image_egl.h
@@ -5,6 +5,7 @@
#ifndef UI_GL_GL_IMAGE_EGL_H_
#define UI_GL_GL_IMAGE_EGL_H_
+#include "base/macros.h"
#include "base/threading/thread_checker.h"
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_image.h"
diff --git a/ui/gl/gl_image_glx.h b/ui/gl/gl_image_glx.h
index fa577f0..c685c501 100644
--- a/ui/gl/gl_image_glx.h
+++ b/ui/gl/gl_image_glx.h
@@ -5,6 +5,9 @@
#ifndef UI_GL_GL_IMAGE_GLX_H_
#define UI_GL_GL_IMAGE_GLX_H_
+#include <stdint.h>
+
+#include "base/macros.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/x/x11_types.h"
#include "ui/gl/gl_export.h"
diff --git a/ui/gl/gl_image_io_surface.h b/ui/gl/gl_image_io_surface.h
index 623ad21b..d8b7318 100644
--- a/ui/gl/gl_image_io_surface.h
+++ b/ui/gl/gl_image_io_surface.h
@@ -6,8 +6,10 @@
#define UI_GL_GL_IMAGE_IO_SURFACE_H_
#include <IOSurface/IOSurface.h>
+#include <stdint.h>
#include "base/mac/scoped_cftyperef.h"
+#include "base/macros.h"
#include "base/threading/thread_checker.h"
#include "ui/gfx/buffer_types.h"
#include "ui/gfx/generic_shared_memory_id.h"
diff --git a/ui/gl/gl_image_io_surface.mm b/ui/gl/gl_image_io_surface.mm
index dc03cd7b..d0ca06b 100644
--- a/ui/gl/gl_image_io_surface.mm
+++ b/ui/gl/gl_image_io_surface.mm
@@ -20,6 +20,7 @@
// Note that this must be included after gl_bindings.h to avoid conflicts.
#include <OpenGL/CGLIOSurface.h>
#include <Quartz/Quartz.h>
+#include <stddef.h>
using gfx::BufferFormat;
diff --git a/ui/gl/gl_image_io_surface_unittest.cc b/ui/gl/gl_image_io_surface_unittest.cc
index c9ca715b..8936ada 100644
--- a/ui/gl/gl_image_io_surface_unittest.cc
+++ b/ui/gl/gl_image_io_surface_unittest.cc
@@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <stddef.h>
+#include <stdint.h>
+
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/buffer_format_util.h"
#include "ui/gfx/mac/io_surface_manager.h"
diff --git a/ui/gl/gl_image_memory.cc b/ui/gl/gl_image_memory.cc
index c61f8e6..7cf74c8 100644
--- a/ui/gl/gl_image_memory.cc
+++ b/ui/gl/gl_image_memory.cc
@@ -4,6 +4,8 @@
#include "ui/gl/gl_image_memory.h"
+#include <stdint.h>
+
#include "base/logging.h"
#include "base/numerics/safe_conversions.h"
#include "base/trace_event/trace_event.h"
diff --git a/ui/gl/gl_image_memory.h b/ui/gl/gl_image_memory.h
index 5492ec3..4f6db9a2 100644
--- a/ui/gl/gl_image_memory.h
+++ b/ui/gl/gl_image_memory.h
@@ -7,6 +7,9 @@
#include "ui/gl/gl_image.h"
+#include <stddef.h>
+
+#include "base/macros.h"
#include "base/numerics/safe_math.h"
#include "ui/gfx/buffer_types.h"
diff --git a/ui/gl/gl_image_ozone_native_pixmap.cc b/ui/gl/gl_image_ozone_native_pixmap.cc
index 2c88d75..42e96a6 100644
--- a/ui/gl/gl_image_ozone_native_pixmap.cc
+++ b/ui/gl/gl_image_ozone_native_pixmap.cc
@@ -4,9 +4,9 @@
#include "ui/gl/gl_image_ozone_native_pixmap.h"
-#define FOURCC(a, b, c, d) \
- ((static_cast<uint32>(a)) | (static_cast<uint32>(b) << 8) | \
- (static_cast<uint32>(c) << 16) | (static_cast<uint32>(d) << 24))
+#define FOURCC(a, b, c, d) \
+ ((static_cast<uint32_t>(a)) | (static_cast<uint32_t>(b) << 8) | \
+ (static_cast<uint32_t>(c) << 16) | (static_cast<uint32_t>(d) << 24))
#define DRM_FORMAT_ARGB8888 FOURCC('A', 'R', '2', '4')
#define DRM_FORMAT_ABGR8888 FOURCC('A', 'B', '2', '4')
diff --git a/ui/gl/gl_image_ozone_native_pixmap.h b/ui/gl/gl_image_ozone_native_pixmap.h
index f76e98b..318c8ef3 100644
--- a/ui/gl/gl_image_ozone_native_pixmap.h
+++ b/ui/gl/gl_image_ozone_native_pixmap.h
@@ -5,6 +5,8 @@
#ifndef UI_GL_GL_IMAGE_OZONE_NATIVE_PIXMAP_H_
#define UI_GL_GL_IMAGE_OZONE_NATIVE_PIXMAP_H_
+#include <stdint.h>
+
#include "ui/gfx/buffer_types.h"
#include "ui/gl/gl_image_egl.h"
#include "ui/ozone/public/native_pixmap.h"
diff --git a/ui/gl/gl_image_ozone_native_pixmap_unittest.cc b/ui/gl/gl_image_ozone_native_pixmap_unittest.cc
index a21a444..a6784152 100644
--- a/ui/gl/gl_image_ozone_native_pixmap_unittest.cc
+++ b/ui/gl/gl_image_ozone_native_pixmap_unittest.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <stdint.h>
+
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/buffer_types.h"
#include "ui/gl/gl_image_ozone_native_pixmap.h"
diff --git a/ui/gl/gl_image_ref_counted_memory.cc b/ui/gl/gl_image_ref_counted_memory.cc
index 1831c08..eb93e3f 100644
--- a/ui/gl/gl_image_ref_counted_memory.cc
+++ b/ui/gl/gl_image_ref_counted_memory.cc
@@ -4,6 +4,8 @@
#include "ui/gl/gl_image_ref_counted_memory.h"
+#include <stddef.h>
+
#include "base/logging.h"
#include "base/memory/ref_counted_memory.h"
#include "base/trace_event/memory_allocator_dump.h"
diff --git a/ui/gl/gl_image_ref_counted_memory.h b/ui/gl/gl_image_ref_counted_memory.h
index 60497e1..0d73dcd 100644
--- a/ui/gl/gl_image_ref_counted_memory.h
+++ b/ui/gl/gl_image_ref_counted_memory.h
@@ -5,6 +5,9 @@
#ifndef UI_GL_GL_IMAGE_REF_COUNTED_MEMORY_H_
#define UI_GL_GL_IMAGE_REF_COUNTED_MEMORY_H_
+#include <stdint.h>
+
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "ui/gl/gl_image_memory.h"
diff --git a/ui/gl/gl_image_ref_counted_memory_unittest.cc b/ui/gl/gl_image_ref_counted_memory_unittest.cc
index 12f4fb8..5d5bdd3 100644
--- a/ui/gl/gl_image_ref_counted_memory_unittest.cc
+++ b/ui/gl/gl_image_ref_counted_memory_unittest.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <stdint.h>
+
#include <vector>
#include "base/memory/ref_counted_memory.h"
diff --git a/ui/gl/gl_image_shared_memory.h b/ui/gl/gl_image_shared_memory.h
index 3c1564ea..179011d 100644
--- a/ui/gl/gl_image_shared_memory.h
+++ b/ui/gl/gl_image_shared_memory.h
@@ -5,6 +5,10 @@
#ifndef UI_GL_GL_IMAGE_SHARED_MEMORY_H_
#define UI_GL_GL_IMAGE_SHARED_MEMORY_H_
+#include <stddef.h>
+#include <stdint.h>
+
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/shared_memory_handle.h"
#include "ui/gfx/generic_shared_memory_id.h"
diff --git a/ui/gl/gl_image_shared_memory_unittest.cc b/ui/gl/gl_image_shared_memory_unittest.cc
index f0e88239..57371ad 100644
--- a/ui/gl/gl_image_shared_memory_unittest.cc
+++ b/ui/gl/gl_image_shared_memory_unittest.cc
@@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <stddef.h>
+#include <stdint.h>
+
#include "base/memory/shared_memory.h"
#include "base/sys_info.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/ui/gl/gl_image_stub.h b/ui/gl/gl_image_stub.h
index b5f57445..8edadb6 100644
--- a/ui/gl/gl_image_stub.h
+++ b/ui/gl/gl_image_stub.h
@@ -5,6 +5,8 @@
#ifndef UI_GL_GL_IMAGE_STUB_H_
#define UI_GL_GL_IMAGE_STUB_H_
+#include <stdint.h>
+
#include "ui/gl/gl_image.h"
namespace gl {
diff --git a/ui/gl/gl_image_surface_texture.h b/ui/gl/gl_image_surface_texture.h
index 808f85b..c58ec8c7 100644
--- a/ui/gl/gl_image_surface_texture.h
+++ b/ui/gl/gl_image_surface_texture.h
@@ -5,6 +5,9 @@
#ifndef UI_GL_GL_IMAGE_SURFACE_TEXTURE_H_
#define UI_GL_GL_IMAGE_SURFACE_TEXTURE_H_
+#include <stdint.h>
+
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/threading/thread_checker.h"
#include "ui/gl/gl_bindings.h"
diff --git a/ui/gl/gl_implementation.cc b/ui/gl/gl_implementation.cc
index 66f22824..40aedde7 100644
--- a/ui/gl/gl_implementation.cc
+++ b/ui/gl/gl_implementation.cc
@@ -4,14 +4,18 @@
#include "ui/gl/gl_implementation.h"
+#include <stddef.h>
+
#include <algorithm>
#include <string>
#include "base/at_exit.h"
#include "base/command_line.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
+#include "build/build_config.h"
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_gl_api_implementation.h"
#include "ui/gl/gl_version_info.h"
diff --git a/ui/gl/gl_implementation_x11.cc b/ui/gl/gl_implementation_x11.cc
index b8a7246..5f0fc06b 100644
--- a/ui/gl/gl_implementation_x11.cc
+++ b/ui/gl/gl_implementation_x11.cc
@@ -7,6 +7,7 @@
#include "base/command_line.h"
#include "base/logging.h"
#include "base/threading/thread_restrictions.h"
+#include "build/build_config.h"
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_context_stub_with_extensions.h"
#include "ui/gl/gl_egl_api_implementation.h"
diff --git a/ui/gl/gl_share_group.cc b/ui/gl/gl_share_group.cc
index 8e8958b..dd424a54 100644
--- a/ui/gl/gl_share_group.cc
+++ b/ui/gl/gl_share_group.cc
@@ -5,6 +5,7 @@
#include "ui/gl/gl_share_group.h"
#include "base/logging.h"
+#include "build/build_config.h"
#include "ui/gl/gl_context.h"
namespace gfx {
diff --git a/ui/gl/gl_share_group.h b/ui/gl/gl_share_group.h
index 1deed63c5..86e03c1 100644
--- a/ui/gl/gl_share_group.h
+++ b/ui/gl/gl_share_group.h
@@ -7,8 +7,9 @@
#include <set>
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
+#include "build/build_config.h"
#include "ui/gl/gl_export.h"
namespace gfx {
diff --git a/ui/gl/gl_state_restorer.h b/ui/gl/gl_state_restorer.h
index 87ad7cc..dbeefff 100644
--- a/ui/gl/gl_state_restorer.h
+++ b/ui/gl/gl_state_restorer.h
@@ -5,7 +5,7 @@
#ifndef UI_GL_GL_STATE_RESTORER_H_
#define UI_GL_GL_STATE_RESTORER_H_
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "ui/gl/gl_export.h"
namespace gpu {
diff --git a/ui/gl/gl_surface.h b/ui/gl/gl_surface.h
index f91ef43..e4f3265 100644
--- a/ui/gl/gl_surface.h
+++ b/ui/gl/gl_surface.h
@@ -8,6 +8,7 @@
#include <string>
#include "base/callback.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "build/build_config.h"
#include "ui/gfx/geometry/rect.h"
diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc
index 9107bdd..f378cfd 100644
--- a/ui/gl/gl_surface_egl.cc
+++ b/ui/gl/gl_surface_egl.cc
@@ -4,12 +4,12 @@
#include "ui/gl/gl_surface_egl.h"
-#if defined(OS_ANDROID)
-#include <android/native_window_jni.h>
-#endif
+#include <stddef.h>
+#include <stdint.h>
#include "base/command_line.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/metrics/histogram_macros.h"
@@ -26,6 +26,10 @@
#include "ui/gl/scoped_make_current.h"
#include "ui/gl/sync_control_vsync_provider.h"
+#if defined(OS_ANDROID)
+#include <android/native_window_jni.h>
+#endif
+
#if defined (USE_OZONE)
#include "ui/ozone/public/ozone_platform.h"
#include "ui/ozone/public/surface_factory_ozone.h"
@@ -115,22 +119,22 @@
~EGLSyncControlVSyncProvider() override {}
protected:
- bool GetSyncValues(int64* system_time,
- int64* media_stream_counter,
- int64* swap_buffer_counter) override {
- uint64 u_system_time, u_media_stream_counter, u_swap_buffer_counter;
+ bool GetSyncValues(int64_t* system_time,
+ int64_t* media_stream_counter,
+ int64_t* swap_buffer_counter) override {
+ uint64_t u_system_time, u_media_stream_counter, u_swap_buffer_counter;
bool result = eglGetSyncValuesCHROMIUM(
g_display, surface_, &u_system_time,
&u_media_stream_counter, &u_swap_buffer_counter) == EGL_TRUE;
if (result) {
- *system_time = static_cast<int64>(u_system_time);
- *media_stream_counter = static_cast<int64>(u_media_stream_counter);
- *swap_buffer_counter = static_cast<int64>(u_swap_buffer_counter);
+ *system_time = static_cast<int64_t>(u_system_time);
+ *media_stream_counter = static_cast<int64_t>(u_media_stream_counter);
+ *swap_buffer_counter = static_cast<int64_t>(u_swap_buffer_counter);
}
return result;
}
- bool GetMscRate(int32* numerator, int32* denominator) override {
+ bool GetMscRate(int32_t* numerator, int32_t* denominator) override {
return false;
}
diff --git a/ui/gl/gl_surface_egl.h b/ui/gl/gl_surface_egl.h
index 7231aa59..232016d 100644
--- a/ui/gl/gl_surface_egl.h
+++ b/ui/gl/gl_surface_egl.h
@@ -13,7 +13,9 @@
#include "base/command_line.h"
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "base/time/time.h"
+#include "build/build_config.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/vsync_provider.h"
#include "ui/gl/gl_bindings.h"
diff --git a/ui/gl/gl_surface_egl_x11.h b/ui/gl/gl_surface_egl_x11.h
index 6ebbde5..67c151eb 100644
--- a/ui/gl/gl_surface_egl_x11.h
+++ b/ui/gl/gl_surface_egl_x11.h
@@ -5,6 +5,8 @@
#ifndef UI_GL_GL_SURFACE_EGL_X11_H_
#define UI_GL_GL_SURFACE_EGL_X11_H_
+#include <stdint.h>
+
#include <string>
#include "base/macros.h"
diff --git a/ui/gl/gl_surface_glx.cc b/ui/gl/gl_surface_glx.cc
index 2c060ec8..20a1177 100644
--- a/ui/gl/gl_surface_glx.cc
+++ b/ui/gl/gl_surface_glx.cc
@@ -8,9 +8,9 @@
#include "ui/gl/gl_surface_glx.h"
-#include "base/basictypes.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/message_loop/message_loop.h"
@@ -22,6 +22,7 @@
#include "base/threading/thread.h"
#include "base/time/time.h"
#include "base/trace_event/trace_event.h"
+#include "build/build_config.h"
#include "ui/events/platform/platform_event_source.h"
#include "ui/gfx/x/x11_connection.h"
#include "ui/gfx/x/x11_types.h"
@@ -125,14 +126,14 @@
~OMLSyncControlVSyncProvider() override {}
protected:
- bool GetSyncValues(int64* system_time,
- int64* media_stream_counter,
- int64* swap_buffer_counter) override {
+ bool GetSyncValues(int64_t* system_time,
+ int64_t* media_stream_counter,
+ int64_t* swap_buffer_counter) override {
return glXGetSyncValuesOML(g_display, glx_window_, system_time,
media_stream_counter, swap_buffer_counter);
}
- bool GetMscRate(int32* numerator, int32* denominator) override {
+ bool GetMscRate(int32_t* numerator, int32_t* denominator) override {
if (!g_glx_get_msc_rate_oml_supported)
return false;
diff --git a/ui/gl/gl_surface_glx.h b/ui/gl/gl_surface_glx.h
index 0b57bc4d..294773c 100644
--- a/ui/gl/gl_surface_glx.h
+++ b/ui/gl/gl_surface_glx.h
@@ -5,9 +5,12 @@
#ifndef UI_GL_GL_SURFACE_GLX_H_
#define UI_GL_GL_SURFACE_GLX_H_
+#include <stdint.h>
+
#include <string>
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "ui/events/platform/platform_event_dispatcher.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/native_widget_types.h"
diff --git a/ui/gl/gl_surface_mac.cc b/ui/gl/gl_surface_mac.cc
index 0aea62f..c481462c 100644
--- a/ui/gl/gl_surface_mac.cc
+++ b/ui/gl/gl_surface_mac.cc
@@ -6,8 +6,8 @@
#include <OpenGL/CGLRenderers.h>
-#include "base/basictypes.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/trace_event/trace_event.h"
#include "ui/gl/gl_bindings.h"
diff --git a/ui/gl/gl_surface_osmesa.cc b/ui/gl/gl_surface_osmesa.cc
index 8375d6b..6521bce 100644
--- a/ui/gl/gl_surface_osmesa.cc
+++ b/ui/gl/gl_surface_osmesa.cc
@@ -54,7 +54,7 @@
}
// Preserve the old buffer.
- scoped_ptr<int32[]> old_buffer(buffer_.release());
+ scoped_ptr<int32_t[]> old_buffer(buffer_.release());
base::CheckedNumeric<int> checked_size = sizeof(buffer_[0]);
checked_size *= new_size.width();
@@ -63,7 +63,7 @@
return false;
// Allocate a new one.
- buffer_.reset(new int32[new_size.GetArea()]);
+ buffer_.reset(new int32_t[new_size.GetArea()]);
if (!buffer_.get())
return false;
diff --git a/ui/gl/gl_surface_osmesa.h b/ui/gl/gl_surface_osmesa.h
index 63d8131a..dc56916 100644
--- a/ui/gl/gl_surface_osmesa.h
+++ b/ui/gl/gl_surface_osmesa.h
@@ -5,6 +5,9 @@
#ifndef UI_GL_GL_SURFACE_OSMESA_H_
#define UI_GL_GL_SURFACE_OSMESA_H_
+#include <stdint.h>
+
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gl/gl_surface.h"
@@ -38,7 +41,7 @@
private:
unsigned format_;
gfx::Size size_;
- scoped_ptr<int32[]> buffer_;
+ scoped_ptr<int32_t[]> buffer_;
DISALLOW_COPY_AND_ASSIGN(GLSurfaceOSMesa);
};
diff --git a/ui/gl/gl_surface_ozone.cc b/ui/gl/gl_surface_ozone.cc
index c596c29..b965552 100644
--- a/ui/gl/gl_surface_ozone.cc
+++ b/ui/gl/gl_surface_ozone.cc
@@ -4,10 +4,13 @@
#include "ui/gl/gl_surface.h"
+#include <stddef.h>
+
#include "base/bind.h"
#include "base/callback.h"
#include "base/location.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_vector.h"
#include "base/memory/weak_ptr.h"
diff --git a/ui/gl/gl_surface_wgl.h b/ui/gl/gl_surface_wgl.h
index 2626898..32c7f48a 100644
--- a/ui/gl/gl_surface_wgl.h
+++ b/ui/gl/gl_surface_wgl.h
@@ -5,6 +5,7 @@
#ifndef UI_GL_GL_SURFACE_WGL_H_
#define UI_GL_GL_SURFACE_WGL_H_
+#include "base/macros.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gl/gl_surface.h"
diff --git a/ui/gl/gl_surface_win.cc b/ui/gl/gl_surface_win.cc
index 2a934d4f..64b701e 100644
--- a/ui/gl/gl_surface_win.cc
+++ b/ui/gl/gl_surface_win.cc
@@ -8,6 +8,7 @@
#include "base/command_line.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/trace_event/trace_event.h"
#include "base/win/windows_version.h"
diff --git a/ui/gl/gl_surface_x11.cc b/ui/gl/gl_surface_x11.cc
index 66a4199..3a2a0da 100644
--- a/ui/gl/gl_surface_x11.cc
+++ b/ui/gl/gl_surface_x11.cc
@@ -4,7 +4,10 @@
#include "ui/gl/gl_surface.h"
+#include <stdint.h>
+
#include "base/logging.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/trace_event/trace_event.h"
@@ -200,13 +203,9 @@
}
// Copy the frame into the pixmap.
- gfx::PutARGBImage(xdisplay_,
- attributes.visual,
- attributes.depth,
- pixmap_,
+ gfx::PutARGBImage(xdisplay_, attributes.visual, attributes.depth, pixmap_,
pixmap_graphics_context_,
- static_cast<const uint8*>(GetHandle()),
- size.width(),
+ static_cast<const uint8_t*>(GetHandle()), size.width(),
size.height());
// Copy the pixmap to the window.
@@ -244,20 +243,10 @@
}
// Copy the frame into the pixmap.
- gfx::PutARGBImage(xdisplay_,
- attributes.visual,
- attributes.depth,
- pixmap_,
+ gfx::PutARGBImage(xdisplay_, attributes.visual, attributes.depth, pixmap_,
pixmap_graphics_context_,
- static_cast<const uint8*>(GetHandle()),
- size.width(),
- size.height(),
- x,
- y,
- x,
- y,
- width,
- height);
+ static_cast<const uint8_t*>(GetHandle()), size.width(),
+ size.height(), x, y, x, y, width, height);
// Copy the pixmap to the window.
XCopyArea(xdisplay_,
diff --git a/ui/gl/gl_switches.cc b/ui/gl/gl_switches.cc
index dc217ef..1b51531 100644
--- a/ui/gl/gl_switches.cc
+++ b/ui/gl/gl_switches.cc
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/macros.h"
#include "ui/gl/gl_switches.h"
-#include "base/basictypes.h"
namespace gfx {
diff --git a/ui/gl/gl_version_info.h b/ui/gl/gl_version_info.h
index 593ed15c..c56825e8 100644
--- a/ui/gl/gl_version_info.h
+++ b/ui/gl/gl_version_info.h
@@ -7,7 +7,8 @@
#include <set>
#include <string>
-#include "base/basictypes.h"
+#include "base/macros.h"
+#include "build/build_config.h"
#include "ui/gl/gl_export.h"
namespace gfx {
diff --git a/ui/gl/gpu_switching_manager.cc b/ui/gl/gpu_switching_manager.cc
index a178509..0f87470 100644
--- a/ui/gl/gpu_switching_manager.cc
+++ b/ui/gl/gpu_switching_manager.cc
@@ -6,6 +6,7 @@
#include "base/command_line.h"
#include "base/logging.h"
+#include "build/build_config.h"
#include "ui/gl/gl_switches.h"
#if defined(OS_MACOSX)
@@ -105,7 +106,7 @@
// vendor's GPU. Otherwise we don't understand the
// configuration and don't deal well with it (an example being
// the dual AMD GPUs in recent Mac Pros).
- const uint32 intel = 0x8086;
+ const uint32_t intel = 0x8086;
flag = ((vendor_ids_[0] == intel && vendor_ids_[1] != intel) ||
(vendor_ids_[0] != intel && vendor_ids_[1] == intel));
}
@@ -118,7 +119,7 @@
}
void GpuSwitchingManager::SetGpuVendorIds(
- const std::vector<uint32>& vendor_ids) {
+ const std::vector<uint32_t>& vendor_ids) {
vendor_ids_ = vendor_ids;
}
diff --git a/ui/gl/gpu_switching_manager.h b/ui/gl/gpu_switching_manager.h
index 6327798..7849d4a 100644
--- a/ui/gl/gpu_switching_manager.h
+++ b/ui/gl/gpu_switching_manager.h
@@ -5,10 +5,14 @@
#ifndef UI_GL_GPU_SWITCHING_MANAGER_H_
#define UI_GL_GPU_SWITCHING_MANAGER_H_
+#include <stdint.h>
+
#include <vector>
+#include "base/macros.h"
#include "base/memory/singleton.h"
#include "base/observer_list.h"
+#include "build/build_config.h"
#include "ui/gl/gl_export.h"
#include "ui/gl/gpu_preference.h"
#include "ui/gl/gpu_switching_observer.h"
@@ -38,7 +42,7 @@
// Sets the vendor IDs of the GPUs on the system. The length of this
// vector defines the count of GPUs.
- void SetGpuVendorIds(const std::vector<uint32>& vendor_ids);
+ void SetGpuVendorIds(const std::vector<uint32_t>& vendor_ids);
void AddObserver(GpuSwitchingObserver* observer);
void RemoveObserver(GpuSwitchingObserver* observer);
@@ -63,7 +67,7 @@
gfx::GpuPreference gpu_switching_option_;
bool gpu_switching_option_set_;
- std::vector<uint32> vendor_ids_;
+ std::vector<uint32_t> vendor_ids_;
bool supports_dual_gpus_;
bool supports_dual_gpus_set_;
diff --git a/ui/gl/gpu_timing.cc b/ui/gl/gpu_timing.cc
index 6def78e..8989bd5 100644
--- a/ui/gl/gpu_timing.cc
+++ b/ui/gl/gpu_timing.cc
@@ -4,6 +4,7 @@
#include "ui/gl/gpu_timing.h"
+#include "base/macros.h"
#include "base/time/time.h"
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_context.h"
@@ -30,19 +31,19 @@
GPUTiming::TimerType GetTimerType() const { return timer_type_; }
uint32_t GetDisjointCount();
- int64 CalculateTimerOffset();
+ int64_t CalculateTimerOffset();
scoped_refptr<QueryResult> BeginElapsedTimeQuery();
void EndElapsedTimeQuery(scoped_refptr<QueryResult> result);
scoped_refptr<QueryResult> DoTimeStampQuery();
- int64 GetCurrentCPUTime() {
+ int64_t GetCurrentCPUTime() {
return cpu_time_for_testing_.is_null()
? (base::TimeTicks::Now() - base::TimeTicks()).InMicroseconds()
: cpu_time_for_testing_.Run();
}
- void SetCpuTimeForTesting(const base::Callback<int64(void)>& cpu_time) {
+ void SetCpuTimeForTesting(const base::Callback<int64_t(void)>& cpu_time) {
cpu_time_for_testing_ = cpu_time;
}
@@ -66,10 +67,10 @@
private:
scoped_refptr<GPUTimingClient> CreateGPUTimingClient() override;
- base::Callback<int64(void)> cpu_time_for_testing_;
+ base::Callback<int64_t(void)> cpu_time_for_testing_;
GPUTiming::TimerType timer_type_ = GPUTiming::kTimerTypeInvalid;
uint32_t disjoint_counter_ = 0;
- int64 offset_ = 0; // offset cache when timer_type_ == kTimerTypeARB
+ int64_t offset_ = 0; // offset cache when timer_type_ == kTimerTypeARB
bool offset_valid_ = false;
bool force_time_elapsed_query_ = false;
@@ -291,7 +292,7 @@
glGetQueryObjectui64v(gl_query_id_, GL_QUERY_RESULT, &result_value);
const int64_t micro_results = NanoToMicro(result_value);
- const int64 offset = gpu_timing->CalculateTimerOffset();
+ const int64_t offset = gpu_timing->CalculateTimerOffset();
const int64_t adjusted_result = micro_results + offset;
DCHECK(query_result_.get());
query_result_->SetStartValue(adjusted_result);
@@ -335,7 +336,7 @@
return disjoint_counter_;
}
-int64 GPUTimingImpl::CalculateTimerOffset() {
+int64_t GPUTimingImpl::CalculateTimerOffset() {
if (!offset_valid_) {
if (timer_type_ == GPUTiming::kTimerTypeDisjoint ||
timer_type_ == GPUTiming::kTimerTypeARB) {
@@ -534,7 +535,7 @@
return (timer_state_ == kTimerState_ResultAvailable);
}
-void GPUTimer::GetStartEndTimestamps(int64* start, int64* end) {
+void GPUTimer::GetStartEndTimestamps(int64_t* start, int64_t* end) {
DCHECK(start && end);
DCHECK(elapsed_timer_result_.get() || time_stamp_result_.get());
DCHECK(IsAvailable());
@@ -549,7 +550,7 @@
*end = time_stamp + elapsed_time;
}
-int64 GPUTimer::GetDeltaElapsed() {
+int64_t GPUTimer::GetDeltaElapsed() {
DCHECK(IsAvailable());
if (elapsed_timer_result_.get())
return elapsed_timer_result_->GetDelta();
@@ -606,13 +607,13 @@
return false;
}
-int64 GPUTimingClient::GetCurrentCPUTime() {
+int64_t GPUTimingClient::GetCurrentCPUTime() {
DCHECK(gpu_timing_);
return gpu_timing_->GetCurrentCPUTime();
}
void GPUTimingClient::SetCpuTimeForTesting(
- const base::Callback<int64(void)>& cpu_time) {
+ const base::Callback<int64_t(void)>& cpu_time) {
DCHECK(gpu_timing_);
gpu_timing_->SetCpuTimeForTesting(cpu_time);
}
diff --git a/ui/gl/gpu_timing.h b/ui/gl/gpu_timing.h
index 4082b91..d17dd5d 100644
--- a/ui/gl/gpu_timing.h
+++ b/ui/gl/gpu_timing.h
@@ -5,10 +5,13 @@
#ifndef UI_GL_GPU_TIMING_H_
#define UI_GL_GPU_TIMING_H_
+#include <stdint.h>
+
#include <memory>
#include <queue>
#include "base/callback.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "ui/gl/gl_export.h"
@@ -96,8 +99,8 @@
bool IsAvailable();
- void GetStartEndTimestamps(int64* start, int64* end);
- int64 GetDeltaElapsed();
+ void GetStartEndTimestamps(int64_t* start, int64_t* end);
+ int64_t GetDeltaElapsed();
private:
friend class GPUTimingClient;
@@ -138,8 +141,8 @@
// discarded.
bool CheckAndResetTimerErrors();
- int64 GetCurrentCPUTime();
- void SetCpuTimeForTesting(const base::Callback<int64(void)>& cpu_time);
+ int64_t GetCurrentCPUTime();
+ void SetCpuTimeForTesting(const base::Callback<int64_t(void)>& cpu_time);
bool IsForceTimeElapsedQuery();
void ForceTimeElapsedQuery();
diff --git a/ui/gl/gpu_timing_fake.h b/ui/gl/gpu_timing_fake.h
index 33d7bc3d..4f206e0 100644
--- a/ui/gl/gpu_timing_fake.h
+++ b/ui/gl/gpu_timing_fake.h
@@ -5,6 +5,8 @@
#ifndef UI_GL_GPU_TIMING_FAKE_H_
#define UI_GL_GPU_TIMING_FAKE_H_
+#include <stdint.h>
+
#include <map>
#include <set>
diff --git a/ui/gl/gpu_timing_unittest.cc b/ui/gl/gpu_timing_unittest.cc
index 865eb24..222fa55 100644
--- a/ui/gl/gpu_timing_unittest.cc
+++ b/ui/gl/gpu_timing_unittest.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <stdint.h>
+
#include "base/bind.h"
#include "base/memory/scoped_ptr.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -125,7 +127,7 @@
EXPECT_EQ(0, gpu_timer->GetDeltaElapsed());
- int64 start, end;
+ int64_t start, end;
gpu_timer->GetStartEndTimestamps(&start, &end);
EXPECT_EQ(begin_cpu_time, start);
EXPECT_EQ(begin_cpu_time, end);
@@ -155,7 +157,7 @@
EXPECT_TRUE(gpu_timer->IsAvailable());
EXPECT_EQ(0, gpu_timer->GetDeltaElapsed());
- int64 start, end;
+ int64_t start, end;
gpu_timer->GetStartEndTimestamps(&start, &end);
EXPECT_EQ(begin_cpu_time, start);
EXPECT_EQ(begin_cpu_time, end);
diff --git a/ui/gl/scoped_api.h b/ui/gl/scoped_api.h
index dd9af50..d17076bc 100644
--- a/ui/gl/scoped_api.h
+++ b/ui/gl/scoped_api.h
@@ -5,7 +5,7 @@
#ifndef UI_GL_SCOPED_API_H_
#define UI_GL_SCOPED_API_H_
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "ui/gl/gl_export.h"
namespace gfx {
diff --git a/ui/gl/scoped_binders.h b/ui/gl/scoped_binders.h
index 102e47e..5c32721 100644
--- a/ui/gl/scoped_binders.h
+++ b/ui/gl/scoped_binders.h
@@ -5,7 +5,7 @@
#ifndef UI_GL_SCOPED_BINDERS_H_
#define UI_GL_SCOPED_BINDERS_H_
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "ui/gl/gl_export.h"
namespace gfx {
diff --git a/ui/gl/scoped_cgl.h b/ui/gl/scoped_cgl.h
index 71af2bd..071b658 100644
--- a/ui/gl/scoped_cgl.h
+++ b/ui/gl/scoped_cgl.h
@@ -8,6 +8,7 @@
#include <OpenGL/OpenGL.h>
#include "base/mac/scoped_typeref.h"
+#include "base/macros.h"
#include "ui/gl/gl_export.h"
namespace base {
diff --git a/ui/gl/scoped_make_current.h b/ui/gl/scoped_make_current.h
index 59f34d7..ce4c7a8 100644
--- a/ui/gl/scoped_make_current.h
+++ b/ui/gl/scoped_make_current.h
@@ -5,7 +5,7 @@
#ifndef UI_GL_SCOPED_MAKE_CURRENT_H_
#define UI_GL_SCOPED_MAKE_CURRENT_H_
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "ui/gl/gl_export.h"
diff --git a/ui/gl/sync_control_vsync_provider.cc b/ui/gl/sync_control_vsync_provider.cc
index 9fee368..836ec21 100644
--- a/ui/gl/sync_control_vsync_provider.cc
+++ b/ui/gl/sync_control_vsync_provider.cc
@@ -9,12 +9,13 @@
#include "base/logging.h"
#include "base/time/time.h"
#include "base/trace_event/trace_event.h"
+#include "build/build_config.h"
#if defined(OS_LINUX)
// These constants define a reasonable range for a calculated refresh interval.
// Calculating refreshes out of this range will be considered a fatal error.
-const int64 kMinVsyncIntervalUs = base::Time::kMicrosecondsPerSecond / 400;
-const int64 kMaxVsyncIntervalUs = base::Time::kMicrosecondsPerSecond / 10;
+const int64_t kMinVsyncIntervalUs = base::Time::kMicrosecondsPerSecond / 400;
+const int64_t kMaxVsyncIntervalUs = base::Time::kMicrosecondsPerSecond / 10;
// How much noise we'll tolerate between successive computed intervals before
// we think the latest computed interval is invalid (noisey due to
@@ -47,9 +48,9 @@
// was produced by the clock whose current time is closest to it, subject
// to the restriction that the returned time must not be in the future
// (since it is the time of a vblank that has already occurred).
- int64 system_time;
- int64 media_stream_counter;
- int64 swap_buffer_counter;
+ int64_t system_time;
+ int64_t media_stream_counter;
+ int64_t swap_buffer_counter;
if (!GetSyncValues(&system_time, &media_stream_counter, &swap_buffer_counter))
return;
@@ -69,10 +70,10 @@
clock_gettime(CLOCK_REALTIME, &real_time);
clock_gettime(CLOCK_MONOTONIC, &monotonic_time);
- int64 real_time_in_microseconds =
+ int64_t real_time_in_microseconds =
real_time.tv_sec * base::Time::kMicrosecondsPerSecond +
real_time.tv_nsec / base::Time::kNanosecondsPerMicrosecond;
- int64 monotonic_time_in_microseconds =
+ int64_t monotonic_time_in_microseconds =
monotonic_time.tv_sec * base::Time::kMicrosecondsPerSecond +
monotonic_time.tv_nsec / base::Time::kNanosecondsPerMicrosecond;
@@ -86,7 +87,7 @@
system_time += monotonic_time_in_microseconds - real_time_in_microseconds;
// Return if |system_time| is more than 1 frames in the future.
- int64 interval_in_microseconds = last_good_interval_.InMicroseconds();
+ int64_t interval_in_microseconds = last_good_interval_.InMicroseconds();
if (system_time > monotonic_time_in_microseconds + interval_in_microseconds)
return;
@@ -106,13 +107,13 @@
while (last_computed_intervals_.size() > 1)
last_computed_intervals_.pop();
- int32 numerator, denominator;
+ int32_t numerator, denominator;
if (GetMscRate(&numerator, &denominator)) {
last_computed_intervals_.push(base::TimeDelta::FromSeconds(denominator) /
numerator);
} else if (!last_timebase_.is_null()) {
base::TimeDelta timebase_diff = timebase - last_timebase_;
- int64 counter_diff = media_stream_counter - last_media_stream_counter_;
+ int64_t counter_diff = media_stream_counter - last_media_stream_counter_;
if (counter_diff > 0 && timebase > last_timebase_)
last_computed_intervals_.push(timebase_diff / counter_diff);
}
diff --git a/ui/gl/sync_control_vsync_provider.h b/ui/gl/sync_control_vsync_provider.h
index 302980d..8314ed2 100644
--- a/ui/gl/sync_control_vsync_provider.h
+++ b/ui/gl/sync_control_vsync_provider.h
@@ -5,8 +5,11 @@
#ifndef UI_GL_SYNC_CONTROL_VSYNC_PROVIDER_H_
#define UI_GL_SYNC_CONTROL_VSYNC_PROVIDER_H_
+#include <stdint.h>
+
#include <queue>
+#include "base/macros.h"
#include "ui/gfx/vsync_provider.h"
namespace gfx {
@@ -21,15 +24,15 @@
void GetVSyncParameters(const UpdateVSyncCallback& callback) override;
protected:
- virtual bool GetSyncValues(int64* system_time,
- int64* media_stream_counter,
- int64* swap_buffer_counter) = 0;
+ virtual bool GetSyncValues(int64_t* system_time,
+ int64_t* media_stream_counter,
+ int64_t* swap_buffer_counter) = 0;
- virtual bool GetMscRate(int32* numerator, int32* denominator) = 0;
+ virtual bool GetMscRate(int32_t* numerator, int32_t* denominator) = 0;
private:
base::TimeTicks last_timebase_;
- uint64 last_media_stream_counter_;
+ uint64_t last_media_stream_counter_;
base::TimeDelta last_good_interval_;
bool invalid_msc_;
diff --git a/ui/gl/test/gl_image_test_support.h b/ui/gl/test/gl_image_test_support.h
index 41258fc0..65708b2 100644
--- a/ui/gl/test/gl_image_test_support.h
+++ b/ui/gl/test/gl_image_test_support.h
@@ -5,6 +5,8 @@
#ifndef UI_GL_TEST_GL_IMAGE_TEST_SUPPORT_H_
#define UI_GL_TEST_GL_IMAGE_TEST_SUPPORT_H_
+#include <stdint.h>
+
#include "ui/gfx/buffer_types.h"
#include "ui/gl/gl_bindings.h"
diff --git a/ui/gl/test/gl_image_test_template.h b/ui/gl/test/gl_image_test_template.h
index 8b146445..9f2b0716 100644
--- a/ui/gl/test/gl_image_test_template.h
+++ b/ui/gl/test/gl_image_test_template.h
@@ -8,7 +8,8 @@
#ifndef UI_GL_TEST_GL_IMAGE_TEST_TEMPLATE_H_
#define UI_GL_TEST_GL_IMAGE_TEST_TEMPLATE_H_
-#include "base/basictypes.h"
+#include <stdint.h>
+
#include "base/memory/scoped_ptr.h"
#include "base/strings/stringize_macros.h"
#include "base/strings/stringprintf.h"
diff --git a/ui/gl/test/gl_surface_test_support.cc b/ui/gl/test/gl_surface_test_support.cc
index 99ae718..c969e94e 100644
--- a/ui/gl/test/gl_surface_test_support.cc
+++ b/ui/gl/test/gl_surface_test_support.cc
@@ -6,6 +6,7 @@
#include "base/command_line.h"
#include "base/logging.h"
+#include "build/build_config.h"
#include "ui/gl/gl_context.h"
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_surface.h"
diff --git a/ui/gl/test/gl_test_helper.h b/ui/gl/test/gl_test_helper.h
index 98b2e0e..4f8f7502 100644
--- a/ui/gl/test/gl_test_helper.h
+++ b/ui/gl/test/gl_test_helper.h
@@ -5,7 +5,8 @@
#ifndef UI_GL_TEST_GL_TEST_HELPER_H_
#define UI_GL_TEST_GL_TEST_HELPER_H_
-#include "base/basictypes.h"
+#include <stdint.h>
+
#include "ui/gl/gl_bindings.h"
namespace gl {
diff --git a/ui/gl/test/run_all_unittests.cc b/ui/gl/test/run_all_unittests.cc
index e84d8c39..e9af318 100644
--- a/ui/gl/test/run_all_unittests.cc
+++ b/ui/gl/test/run_all_unittests.cc
@@ -3,8 +3,10 @@
// found in the LICENSE file.
#include "base/bind.h"
+#include "base/macros.h"
#include "base/test/launcher/unit_test_launcher.h"
#include "base/test/test_suite.h"
+#include "build/build_config.h"
#if defined(OS_MACOSX) && !defined(OS_IOS)
#include "base/test/mock_chrome_application_mac.h"
diff --git a/ui/gl/trace_util.h b/ui/gl/trace_util.h
index fa7ab19..7a9b60a 100644
--- a/ui/gl/trace_util.h
+++ b/ui/gl/trace_util.h
@@ -5,6 +5,8 @@
#ifndef UI_GL_TRACE_UTIL_H_
#define UI_GL_TRACE_UTIL_H_
+#include <stdint.h>
+
#include "base/trace_event/memory_allocator_dump.h"
#include "ui/gl/gl_export.h"