skia2/include/private/SkMacros.h
Brian Salomon 56c78f4d9e Reland "Add backend texture and backend render target versions snapshot GMs"
This is a reland of fa87f9c7b9

Went back to original approach of checking isFramebufferOnly outside
GrCopyRenderTask::Make().

Original change's description:
> Add backend texture and backend render target versions snapshot GMs
>
> GPU may behave differently depending on whether the SkSurface backing
> store is wrapped and whether it is a texture or not.
>
> Bug: skia:11208
> Change-Id: I5e9921d56c0840cfe34ed2926a55be7460409b23
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/364639
> Reviewed-by: Adlai Holler <adlai@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

Bug: skia:11208
Change-Id: I7af6078e904fdd772b97ad3a27e26cab577fc6a3
Cq-Include-Trybots: luci.skia.skia.primary:Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-PreAbandonGpuContext
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/365702
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-02-04 14:30:57 +00:00

44 lines
1.5 KiB
C

/*
* Copyright 2018 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkMacros_DEFINED
#define SkMacros_DEFINED
/*
* Usage: SK_MACRO_CONCAT(a, b) to construct the symbol ab
*
* SK_MACRO_CONCAT_IMPL_PRIV just exists to make this work. Do not use directly
*
*/
#define SK_MACRO_CONCAT(X, Y) SK_MACRO_CONCAT_IMPL_PRIV(X, Y)
#define SK_MACRO_CONCAT_IMPL_PRIV(X, Y) X ## Y
/*
* Usage: SK_MACRO_APPEND_LINE(foo) to make foo123, where 123 is the current
* line number. Easy way to construct
* unique names for local functions or
* variables.
*/
#define SK_MACRO_APPEND_LINE(name) SK_MACRO_CONCAT(name, __LINE__)
#define SK_MACRO_APPEND_COUNTER(name) SK_MACRO_CONCAT(name, __COUNTER__)
////////////////////////////////////////////////////////////////////////////////
// Can be used to bracket data types that must be dense, e.g. hash keys.
#if defined(__clang__) // This should work on GCC too, but GCC diagnostic pop didn't seem to work!
#define SK_BEGIN_REQUIRE_DENSE _Pragma("GCC diagnostic push") \
_Pragma("GCC diagnostic error \"-Wpadded\"")
#define SK_END_REQUIRE_DENSE _Pragma("GCC diagnostic pop")
#else
#define SK_BEGIN_REQUIRE_DENSE
#define SK_END_REQUIRE_DENSE
#endif
#define SK_INIT_TO_AVOID_WARNING = 0
#endif // SkMacros_DEFINED