Commit 9dce52eb authored by Mike Klein's avatar Mike Klein Committed by Commit Bot

remove bzero() define

While attempting to s/SK_BUILD_FOR_WIN32/SK_BUILD_FOR_WIN/g,
I stumbled upon this define for bzero.  Skia doesn't use bzero,
and there's no good reason for skia/ext to use it either.

Change-Id: I12cbc5d40c17491fe1d648540655fad156196549
Reviewed-on: https://chromium-review.googlesource.com/884007Reviewed-by: default avatarMike Reed <reed@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531916}
parent defc468f
......@@ -138,14 +138,7 @@ SK_API void SkDebugf_FileLine(const char* file, int line, bool fatal,
#define SK_B32_SHIFT 0
#endif
#if defined(SK_BUILD_FOR_WIN32)
#define SK_BUILD_FOR_WIN
// Skia uses this deprecated bzero function to fill zeros into a string.
#define bzero(str, len) memset(str, 0, len)
#elif defined(SK_BUILD_FOR_MAC)
#if defined(SK_BUILD_FOR_MAC)
#define SK_CPU_LENDIAN
#undef SK_CPU_BENDIAN
......
......@@ -3,8 +3,10 @@
// found in the LICENSE file.
#include <windows.h>
#include <psapi.h>
#include <stddef.h>
#include <string.h>
#include "base/debug/gdi_debug_util_win.h"
#include "base/memory/ptr_util.h"
......@@ -57,7 +59,7 @@ static bool Create(int width,
size_t row_bytes = skia::PlatformCanvasStrideForWidth(width);
if (do_clear)
bzero(pixels, row_bytes * height);
memset(pixels, 0, row_bytes * height);
HDC hdc = CreateCompatibleDC(nullptr);
if (!hdc) {
......
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