Reland "Remove skstd::optional entirely."

This is a reland of 0596094b81

Original change's description:
> Remove skstd::optional entirely.
>
> Change-Id: Id9862712ea3e769797abd654922879ce6bc4487c
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/504976
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>

Change-Id: Ie5bae44de729aabe50c4e51ad3c7cc476fbc5dc6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512358
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This commit is contained in:
John Stiles 2022-02-06 17:33:23 -05:00 committed by SkCQ
parent 32b1e5d861
commit 2c70a0f96b
7 changed files with 7 additions and 27 deletions

View File

@ -503,7 +503,6 @@ skia_core_sources = [
"$_include/private/SkTFitsIn.h",
"$_include/private/SkTHash.h",
"$_include/private/SkTLogic.h",
"$_include/private/SkTOptional.h",
"$_include/private/SkTemplates.h",
"$_include/private/SkThreadAnnotations.h",
"$_include/private/SkThreadID.h",

View File

@ -28,10 +28,10 @@
#include "include/core/SkTypes.h"
#include "include/private/SkDeque.h"
#include "include/private/SkMacros.h"
#include "include/private/SkTOptional.h"
#include <cstring>
#include <memory>
#include <optional>
#include <vector>
#ifndef SK_SUPPORT_LEGACY_GETTOTALMATRIX

View File

@ -15,11 +15,11 @@
#include "include/core/SkScalar.h"
#include "include/core/SkShader.h"
#include "include/core/SkTileMode.h"
#include "include/private/SkTOptional.h"
#if SK_SUPPORT_GPU
#include "include/gpu/GrTypes.h"
#endif
#include <functional> // std::function
#include <optional>
#if defined(SK_BUILD_FOR_ANDROID) && __ANDROID_API__ >= 26
#include <android/hardware_buffer.h>

View File

@ -13,7 +13,8 @@
#include "include/core/SkImage.h"
#include "include/core/SkImageInfo.h"
#include "include/core/SkYUVAPixmaps.h"
#include "include/private/SkTOptional.h"
#include <optional>
class GrRecordingContext;
class GrSurfaceProxyView;

View File

@ -11,9 +11,10 @@
#include "include/core/SkBlendMode.h"
#include "include/core/SkColor.h"
#include "include/core/SkRefCnt.h"
#include "include/private/SkTOptional.h"
#include "include/private/SkTo.h"
#include <optional>
class SkBlender;
class SkColorFilter;
class SkColorSpace;

View File

@ -18,9 +18,9 @@
#include "include/core/SkString.h"
#include "include/private/SkOnce.h"
#include "include/private/SkSLSampleUsage.h"
#include "include/private/SkTOptional.h"
#include <string>
#include <optional>
#include <vector>
#ifdef SK_ENABLE_SKSL

View File

@ -1,21 +0,0 @@
/*
* Copyright 2021 Google LLC.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkTOptional_DEFINED
#define SkTOptional_DEFINED
#include <optional>
namespace skstd {
template <typename T> using optional = std::optional<T>;
using nullopt_t = std::nullopt_t;
inline constexpr nullopt_t nullopt = std::nullopt;
} // namespace skstd
#endif