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

Unified Diff: ui/accelerated_widget_mac/surface_handle_types.cc

Issue 1550483002: Switch to standard integer types in ui/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@int-ui-events
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
Index: ui/accelerated_widget_mac/surface_handle_types.cc
diff --git a/ui/accelerated_widget_mac/surface_handle_types.cc b/ui/accelerated_widget_mac/surface_handle_types.cc
index 22d2f6dc67a2f7bebcdf59fcbce37e6410738af4..356996299f43fc069333e90250df84b1f8be10d4 100644
--- a/ui/accelerated_widget_mac/surface_handle_types.cc
+++ b/ui/accelerated_widget_mac/surface_handle_types.cc
@@ -10,19 +10,19 @@ namespace ui {
namespace {
// The type of the handle is stored in the upper 64 bits.
-const uint64 kTypeMask = 0xFFFFFFFFull << 32;
+const uint64_t kTypeMask = 0xFFFFFFFFull << 32;
-const uint64 kTypeIOSurface = 0x01010101ull << 32;
-const uint64 kTypeCAContext = 0x02020202ull << 32;
+const uint64_t kTypeIOSurface = 0x01010101ull << 32;
+const uint64_t kTypeCAContext = 0x02020202ull << 32;
// To make it a bit less likely that we'll just cast off the top bits of the
// handle to get the ID, XOR lower bits with a type-specific mask.
-const uint32 kXORMaskIOSurface = 0x01010101;
-const uint32 kXORMaskCAContext = 0x02020202;
+const uint32_t kXORMaskIOSurface = 0x01010101;
+const uint32_t kXORMaskCAContext = 0x02020202;
} // namespace
-SurfaceHandleType GetSurfaceHandleType(uint64 surface_handle) {
+SurfaceHandleType GetSurfaceHandleType(uint64_t surface_handle) {
switch(surface_handle & kTypeMask) {
case kTypeIOSurface:
return kSurfaceHandleTypeIOSurface;
@@ -32,21 +32,21 @@ SurfaceHandleType GetSurfaceHandleType(uint64 surface_handle) {
return kSurfaceHandleTypeInvalid;
}
-IOSurfaceID IOSurfaceIDFromSurfaceHandle(uint64 surface_handle) {
+IOSurfaceID IOSurfaceIDFromSurfaceHandle(uint64_t surface_handle) {
DCHECK_EQ(kSurfaceHandleTypeIOSurface, GetSurfaceHandleType(surface_handle));
- return static_cast<uint32>(surface_handle) ^ kXORMaskIOSurface;
+ return static_cast<uint32_t>(surface_handle) ^ kXORMaskIOSurface;
}
-CAContextID CAContextIDFromSurfaceHandle(uint64 surface_handle) {
+CAContextID CAContextIDFromSurfaceHandle(uint64_t surface_handle) {
DCHECK_EQ(kSurfaceHandleTypeCAContext, GetSurfaceHandleType(surface_handle));
- return static_cast<uint32>(surface_handle) ^ kXORMaskCAContext;
+ return static_cast<uint32_t>(surface_handle) ^ kXORMaskCAContext;
}
-uint64 SurfaceHandleFromIOSurfaceID(IOSurfaceID io_surface_id) {
+uint64_t SurfaceHandleFromIOSurfaceID(IOSurfaceID io_surface_id) {
return kTypeIOSurface | (io_surface_id ^ kXORMaskIOSurface);
}
-uint64 SurfaceHandleFromCAContextID(CAContextID ca_context_id) {
+uint64_t SurfaceHandleFromCAContextID(CAContextID ca_context_id) {
return kTypeCAContext | (ca_context_id ^ kXORMaskCAContext);
}
« no previous file with comments | « ui/accelerated_widget_mac/surface_handle_types.h ('k') | ui/accelerated_widget_mac/window_resize_helper_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698