Skip to content

Commit

Permalink
skia: Use BUILDFLAG for OS checking
Browse files Browse the repository at this point in the history
Use BUILDFLAG(IS_XXX) instead of defined(OS_XXX).

Generated by `os_buildflag_migration.py` (https://crrev.com/c/3311983).

R=thakis@chromium.org

Bug: 1234043
Test: No functionality change
Change-Id: I8bc4a9ba545f91477fc8ea6d3ad97eec3ef53a71
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3373989
Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Owners-Override: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#956777}
  • Loading branch information
xhwang-chromium authored and Chromium LUCI CQ committed Jan 8, 2022
1 parent 3f622b8 commit b62e968
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion skia/ext/convolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

// We can build SSE2 optimized versions for all x86 CPUs
// except when building for the IOS emulator.
#if defined(ARCH_CPU_X86_FAMILY) && !defined(OS_IOS)
#if defined(ARCH_CPU_X86_FAMILY) && !BUILDFLAG(IS_IOS)
#define SIMD_SSE2 1
#define SIMD_PADDING 8 // 8 * int16_t
#endif
Expand Down
2 changes: 1 addition & 1 deletion skia/ext/image_operations_bench.cc
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ bool Benchmark::ParseArgs(const base::CommandLine* command_line) {
++iter) {
const std::string& s = iter->first;
std::string value;
#if defined(OS_WIN)
#if BUILDFLAG(IS_WIN)
value = base::WideToUTF8(iter->second);
#else
value = iter->second;
Expand Down
2 changes: 1 addition & 1 deletion skia/ext/platform_canvas.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#include "build/build_config.h"

#if defined(OS_WIN)
#if BUILDFLAG(IS_WIN)
#include <windows.h>
#endif

Expand Down
6 changes: 3 additions & 3 deletions skia/ext/platform_canvas_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "third_party/skia/include/core/SkPixelRef.h"

// Native drawing context is only used/supported on Windows.
#if defined(OS_WIN)
#if BUILDFLAG(IS_WIN)

namespace skia {

Expand Down Expand Up @@ -75,7 +75,7 @@ bool VerifyRect(const SkCanvas& canvas,
return true;
}

#if !defined(USE_AURA) && !defined(OS_MAC)
#if !defined(USE_AURA) && !BUILDFLAG(IS_MAC)
// Return true if canvas has something that passes for a rounded-corner
// rectangle. Basically, we're just checking to make sure that the pixels in the
// middle are of rect_color and pixels in the corners are of canvas_color.
Expand Down Expand Up @@ -367,4 +367,4 @@ TEST(PlatformCanvas, TranslateLayer) {

} // namespace skia

#endif // defined(OS_WIN)
#endif // BUILDFLAG(IS_WIN)

0 comments on commit b62e968

Please sign in to comment.