Commit dfddb983 by Jamie Madill Committed by Commit Bot

Fix warnings that show up in Skia with MSVC.

Bug: skia:7647 Change-Id: I6951dcfc1eacd0426dfa7f8142780a5065fae1b0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2380715Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent a1d05e35
{ {
"src/libANGLE/Overlay_autogen.cpp": "src/libANGLE/Overlay_autogen.cpp":
"eb42853f05350cb01919d63fffdafc5e", "6c9c7df59562390505222145c1f32277",
"src/libANGLE/Overlay_autogen.h": "src/libANGLE/Overlay_autogen.h":
"03ac72d8286f1f933696fa3dabb75eb1", "03ac72d8286f1f933696fa3dabb75eb1",
"src/libANGLE/gen_overlay_widgets.py": "src/libANGLE/gen_overlay_widgets.py":
"e596822a0a7ba713510c5427c82ce938", "f4395481db010c82af2e2981353e8592",
"src/libANGLE/overlay_widgets.json": "src/libANGLE/overlay_widgets.json":
"dd9d2a72035e754bbc5f614410e76df1" "dd9d2a72035e754bbc5f614410e76df1"
} }
\ No newline at end of file
...@@ -18,7 +18,19 @@ typedef struct native_handle ...@@ -18,7 +18,19 @@ typedef struct native_handle
int version; /* sizeof(native_handle_t) */ int version; /* sizeof(native_handle_t) */
int numFds; /* number of file-descriptors at &data[0] */ int numFds; /* number of file-descriptors at &data[0] */
int numInts; /* number of ints at &data[numFds] */ int numInts; /* number of ints at &data[numFds] */
#if defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wzero-length-array"
#elif defined(_MSC_VER)
# pragma warning(push)
# pragma warning(disable : 4200)
#endif
int data[0]; /* numFds + numInts ints */ int data[0]; /* numFds + numInts ints */
#if defined(__clang__)
# pragma clang diagnostic pop
#elif defined(_MSC_VER)
# pragma warning(pop)
#endif
} native_handle_t; } native_handle_t;
// Taken from nativebase/nativebase.h // Taken from nativebase/nativebase.h
......
...@@ -48,10 +48,10 @@ void Overlay::initOverlayWidgets() ...@@ -48,10 +48,10 @@ void Overlay::initOverlayWidgets()
widget->coords[1] = offsetY; widget->coords[1] = offsetY;
widget->coords[2] = offsetX + width; widget->coords[2] = offsetX + width;
widget->coords[3] = offsetY + height; widget->coords[3] = offsetY + height;
widget->color[0] = 0.498039215686; widget->color[0] = 0.498039215686f;
widget->color[1] = 0.749019607843; widget->color[1] = 0.749019607843f;
widget->color[2] = 1.0; widget->color[2] = 1.0f;
widget->color[3] = 1.0; widget->color[3] = 1.0f;
} }
mState.mOverlayWidgets[WidgetId::FPS].reset(widget); mState.mOverlayWidgets[WidgetId::FPS].reset(widget);
} }
...@@ -71,10 +71,10 @@ void Overlay::initOverlayWidgets() ...@@ -71,10 +71,10 @@ void Overlay::initOverlayWidgets()
widget->coords[1] = offsetY - height; widget->coords[1] = offsetY - height;
widget->coords[2] = offsetX + width; widget->coords[2] = offsetX + width;
widget->coords[3] = offsetY; widget->coords[3] = offsetY;
widget->color[0] = 1.0; widget->color[0] = 1.0f;
widget->color[1] = 0.0; widget->color[1] = 0.0f;
widget->color[2] = 0.0; widget->color[2] = 0.0f;
widget->color[3] = 1.0; widget->color[3] = 1.0f;
} }
mState.mOverlayWidgets[WidgetId::VulkanLastValidationMessage].reset(widget); mState.mOverlayWidgets[WidgetId::VulkanLastValidationMessage].reset(widget);
} }
...@@ -95,10 +95,10 @@ void Overlay::initOverlayWidgets() ...@@ -95,10 +95,10 @@ void Overlay::initOverlayWidgets()
widget->coords[1] = offsetY - height; widget->coords[1] = offsetY - height;
widget->coords[2] = offsetX + width; widget->coords[2] = offsetX + width;
widget->coords[3] = offsetY; widget->coords[3] = offsetY;
widget->color[0] = 1.0; widget->color[0] = 1.0f;
widget->color[1] = 0.0; widget->color[1] = 0.0f;
widget->color[2] = 0.0; widget->color[2] = 0.0f;
widget->color[3] = 1.0; widget->color[3] = 1.0f;
} }
mState.mOverlayWidgets[WidgetId::VulkanValidationMessageCount].reset(widget); mState.mOverlayWidgets[WidgetId::VulkanValidationMessageCount].reset(widget);
} }
...@@ -118,10 +118,10 @@ void Overlay::initOverlayWidgets() ...@@ -118,10 +118,10 @@ void Overlay::initOverlayWidgets()
widget->coords[1] = offsetY; widget->coords[1] = offsetY;
widget->coords[2] = offsetX + width; widget->coords[2] = offsetX + width;
widget->coords[3] = offsetY + height; widget->coords[3] = offsetY + height;
widget->color[0] = 0.294117647059; widget->color[0] = 0.294117647059f;
widget->color[1] = 0.78431372549; widget->color[1] = 0.78431372549f;
widget->color[2] = 0.0; widget->color[2] = 0.0f;
widget->color[3] = 0.78431372549; widget->color[3] = 0.78431372549f;
} }
mState.mOverlayWidgets[WidgetId::VulkanRenderPassCount].reset(widget); mState.mOverlayWidgets[WidgetId::VulkanRenderPassCount].reset(widget);
{ {
...@@ -139,10 +139,10 @@ void Overlay::initOverlayWidgets() ...@@ -139,10 +139,10 @@ void Overlay::initOverlayWidgets()
widget->description.coords[1] = std::max(offsetY - height, 1); widget->description.coords[1] = std::max(offsetY - height, 1);
widget->description.coords[2] = offsetX + width; widget->description.coords[2] = offsetX + width;
widget->description.coords[3] = offsetY; widget->description.coords[3] = offsetY;
widget->description.color[0] = 0.294117647059; widget->description.color[0] = 0.294117647059f;
widget->description.color[1] = 0.78431372549; widget->description.color[1] = 0.78431372549f;
widget->description.color[2] = 0.0; widget->description.color[2] = 0.0f;
widget->description.color[3] = 1.0; widget->description.color[3] = 1.0f;
} }
} }
...@@ -161,10 +161,10 @@ void Overlay::initOverlayWidgets() ...@@ -161,10 +161,10 @@ void Overlay::initOverlayWidgets()
widget->coords[1] = offsetY; widget->coords[1] = offsetY;
widget->coords[2] = offsetX; widget->coords[2] = offsetX;
widget->coords[3] = offsetY + height; widget->coords[3] = offsetY + height;
widget->color[0] = 1.0; widget->color[0] = 1.0f;
widget->color[1] = 0.78431372549; widget->color[1] = 0.78431372549f;
widget->color[2] = 0.294117647059; widget->color[2] = 0.294117647059f;
widget->color[3] = 0.78431372549; widget->color[3] = 0.78431372549f;
} }
mState.mOverlayWidgets[WidgetId::VulkanRenderPassBufferCount].reset(widget); mState.mOverlayWidgets[WidgetId::VulkanRenderPassBufferCount].reset(widget);
{ {
...@@ -182,10 +182,10 @@ void Overlay::initOverlayWidgets() ...@@ -182,10 +182,10 @@ void Overlay::initOverlayWidgets()
widget->description.coords[1] = std::max(offsetY - height, 1); widget->description.coords[1] = std::max(offsetY - height, 1);
widget->description.coords[2] = std::min(offsetX + width, -1); widget->description.coords[2] = std::min(offsetX + width, -1);
widget->description.coords[3] = offsetY; widget->description.coords[3] = offsetY;
widget->description.color[0] = 1.0; widget->description.color[0] = 1.0f;
widget->description.color[1] = 0.78431372549; widget->description.color[1] = 0.78431372549f;
widget->description.color[2] = 0.294117647059; widget->description.color[2] = 0.294117647059f;
widget->description.color[3] = 1.0; widget->description.color[3] = 1.0f;
} }
} }
...@@ -204,10 +204,10 @@ void Overlay::initOverlayWidgets() ...@@ -204,10 +204,10 @@ void Overlay::initOverlayWidgets()
widget->coords[1] = offsetY; widget->coords[1] = offsetY;
widget->coords[2] = offsetX; widget->coords[2] = offsetX;
widget->coords[3] = offsetY + height; widget->coords[3] = offsetY + height;
widget->color[0] = 1.0; widget->color[0] = 1.0f;
widget->color[1] = 0.78431372549; widget->color[1] = 0.78431372549f;
widget->color[2] = 0.294117647059; widget->color[2] = 0.294117647059f;
widget->color[3] = 0.78431372549; widget->color[3] = 0.78431372549f;
} }
mState.mOverlayWidgets[WidgetId::VulkanSecondaryCommandBufferPoolWaste].reset(widget); mState.mOverlayWidgets[WidgetId::VulkanSecondaryCommandBufferPoolWaste].reset(widget);
{ {
...@@ -225,10 +225,10 @@ void Overlay::initOverlayWidgets() ...@@ -225,10 +225,10 @@ void Overlay::initOverlayWidgets()
widget->description.coords[1] = std::max(offsetY - height, 1); widget->description.coords[1] = std::max(offsetY - height, 1);
widget->description.coords[2] = std::min(offsetX + width, -1); widget->description.coords[2] = std::min(offsetX + width, -1);
widget->description.coords[3] = offsetY; widget->description.coords[3] = offsetY;
widget->description.color[0] = 1.0; widget->description.color[0] = 1.0f;
widget->description.color[1] = 0.78431372549; widget->description.color[1] = 0.78431372549f;
widget->description.color[2] = 0.294117647059; widget->description.color[2] = 0.294117647059f;
widget->description.color[3] = 1.0; widget->description.color[3] = 1.0f;
} }
} }
...@@ -247,10 +247,10 @@ void Overlay::initOverlayWidgets() ...@@ -247,10 +247,10 @@ void Overlay::initOverlayWidgets()
widget->coords[1] = offsetY; widget->coords[1] = offsetY;
widget->coords[2] = offsetX + width; widget->coords[2] = offsetX + width;
widget->coords[3] = offsetY + height; widget->coords[3] = offsetY + height;
widget->color[0] = 0.294117647059; widget->color[0] = 0.294117647059f;
widget->color[1] = 0.78431372549; widget->color[1] = 0.78431372549f;
widget->color[2] = 0.0; widget->color[2] = 0.0f;
widget->color[3] = 0.78431372549; widget->color[3] = 0.78431372549f;
} }
mState.mOverlayWidgets[WidgetId::VulkanWriteDescriptorSetCount].reset(widget); mState.mOverlayWidgets[WidgetId::VulkanWriteDescriptorSetCount].reset(widget);
{ {
...@@ -268,10 +268,10 @@ void Overlay::initOverlayWidgets() ...@@ -268,10 +268,10 @@ void Overlay::initOverlayWidgets()
widget->description.coords[1] = std::max(offsetY - height, 1); widget->description.coords[1] = std::max(offsetY - height, 1);
widget->description.coords[2] = offsetX + width; widget->description.coords[2] = offsetX + width;
widget->description.coords[3] = offsetY; widget->description.coords[3] = offsetY;
widget->description.color[0] = 0.294117647059; widget->description.color[0] = 0.294117647059f;
widget->description.color[1] = 0.78431372549; widget->description.color[1] = 0.78431372549f;
widget->description.color[2] = 0.0; widget->description.color[2] = 0.0f;
widget->description.color[3] = 1.0; widget->description.color[3] = 1.0f;
} }
} }
} }
......
...@@ -99,10 +99,10 @@ widget->{subwidget}coords[0] = {coord0}; ...@@ -99,10 +99,10 @@ widget->{subwidget}coords[0] = {coord0};
widget->{subwidget}coords[1] = {coord1}; widget->{subwidget}coords[1] = {coord1};
widget->{subwidget}coords[2] = {coord2}; widget->{subwidget}coords[2] = {coord2};
widget->{subwidget}coords[3] = {coord3}; widget->{subwidget}coords[3] = {coord3};
widget->{subwidget}color[0] = {color_r}; widget->{subwidget}color[0] = {color_r}f;
widget->{subwidget}color[1] = {color_g}; widget->{subwidget}color[1] = {color_g}f;
widget->{subwidget}color[2] = {color_b}; widget->{subwidget}color[2] = {color_b}f;
widget->{subwidget}color[3] = {color_a}; widget->{subwidget}color[3] = {color_a}f;
}} }}
""" """
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment