'<(skia_include_path)/private/SkTSearch.h',
'<(skia_include_path)/private/SkTLogic.h',
'<(skia_include_path)/private/SkUniquePtr.h',
- '<(skia_include_path)/private/SkUtility.h',
'<(skia_include_path)/private/SkWeakRefCnt.h',
# Path ops
#include "SkTypes.h"
#include <new>
+#include <utility>
template <typename T, bool MEM_COPY = false> class SkTArray;
*/
template<class... Args> T& emplace_back(Args&&... args) {
T* newT = reinterpret_cast<T*>(this->push_back_raw(1));
- return *new (newT) T(skstd::forward<Args>(args)...);
+ return *new (newT) T(std::forward<Args>(args)...);
}
/**
#include "../private/SkTemplates.h"
#include "SkTypes.h"
#include <new>
+#include <utility>
/**
* Efficient way to defer allocating/initializing a class until it is needed
if (this->isValid()) {
fPtr->~T();
}
- fPtr = new (SkTCast<T*>(fStorage.get())) T(skstd::forward<Args>(args)...);
+ fPtr = new (SkTCast<T*>(fStorage.get())) T(std::forward<Args>(args)...);
return fPtr;
}
* found in the LICENSE file.
*
*
- * This header provides some of the helpers (std::integral_constant) and
- * type transformations (std::conditional) which will become available with
- * C++11 in the type_traits header.
+ * This header provides some of the helpers (like std::enable_if_t) which will
+ * become available with C++14 in the type_traits header (in the skstd
+ * namespace). This header also provides several Skia specific additions such
+ * as SK_WHEN and the sknonstd namespace.
*/
#ifndef SkTLogic_DEFINED
#include <stddef.h>
#include <stdint.h>
+#include <type_traits>
+#include <utility>
namespace skstd {
-using nullptr_t = decltype(nullptr);
+template <bool B> using bool_constant = std::integral_constant<bool, B>;
-template <typename T, T v> struct integral_constant {
- static const/*expr*/ T value = v;
- using value_type = T;
- using type = integral_constant<T, v>;
- //constexpr operator value_type() const noexcept { return value; }
- //constexpr value_type operator()() const noexcept { return value; }
-};
-
-template <bool B> using bool_constant = integral_constant<bool, B>;
-
-using true_type = bool_constant<true>;
-using false_type = bool_constant<false>;
-
-template <bool B, typename T, typename F> struct conditional { using type = T; };
-template <typename T, typename F> struct conditional<false, T, F> { using type = F; };
-template <bool B, typename T, typename F> using conditional_t = typename conditional<B, T, F>::type;
-
-template <bool B, typename T = void> struct enable_if { using type = T; };
-template <typename T> struct enable_if<false, T> {};
-template <bool B, typename T = void> using enable_if_t = typename enable_if<B, T>::type;
-
-template <typename T> struct remove_const { using type = T; };
-template <typename T> struct remove_const<const T> { using type = T; };
-template <typename T> using remove_const_t = typename remove_const<T>::type;
-
-template <typename T> struct remove_volatile { using type = T; };
-template <typename T> struct remove_volatile<volatile T> { using type = T; };
-template <typename T> using remove_volatile_t = typename remove_volatile<T>::type;
+template <bool B, typename T, typename F> using conditional_t = typename std::conditional<B, T, F>::type;
+template <bool B, typename T = void> using enable_if_t = typename std::enable_if<B, T>::type;
-template <typename T> struct remove_cv { using type = remove_volatile_t<remove_const_t<T>>; };
-template <typename T> using remove_cv_t = typename remove_cv<T>::type;
+template <typename T> using remove_const_t = typename std::remove_const<T>::type;
+template <typename T> using remove_volatile_t = typename std::remove_volatile<T>::type;
+template <typename T> using remove_cv_t = typename std::remove_cv<T>::type;
+template <typename T> using remove_reference_t = typename std::remove_reference<T>::type;
+template <typename T> using remove_extent_t = typename std::remove_extent<T>::type;
-template <typename T> struct remove_reference { using type = T; };
-template <typename T> struct remove_reference<T&> { using type = T; };
-template <typename T> struct remove_reference<T&&> { using type = T; };
-template <typename T> using remove_reference_t = typename remove_reference<T>::type;
-
-template <typename T> struct remove_extent { using type = T; };
-template <typename T> struct remove_extent<T[]> { using type = T; };
-template <typename T, size_t N> struct remove_extent<T[N]> { using type = T;};
-template <typename T> using remove_extent_t = typename remove_extent<T>::type;
-
-template <typename T, typename U> struct is_same : false_type {};
-template <typename T> struct is_same<T, T> : true_type {};
+template <typename T, typename U> struct is_same : std::false_type {};
+template <typename T> struct is_same<T, T> : std::true_type {};
template <typename T> struct is_void : is_same<void, remove_cv_t<T>> {};
-template <typename T> struct is_const : false_type {};
-template <typename T> struct is_const<const T> : true_type {};
+template <typename T> struct is_const : std::false_type {};
+template <typename T> struct is_const<const T> : std::true_type {};
-template <typename T> struct is_volatile : false_type {};
-template <typename T> struct is_volatile<volatile T> : true_type {};
+template <typename T> struct is_volatile : std::false_type {};
+template <typename T> struct is_volatile<volatile T> : std::true_type {};
-template <typename T> struct is_pointer_detector : false_type {};
-template <typename T> struct is_pointer_detector<T*> : true_type {};
+template <typename T> struct is_pointer_detector : std::false_type {};
+template <typename T> struct is_pointer_detector<T*> : std::true_type {};
template <typename T> struct is_pointer : is_pointer_detector<remove_cv_t<T>> {};
-template <typename T> struct is_reference : false_type {};
-template <typename T> struct is_reference<T&> : true_type {};
-template <typename T> struct is_reference<T&&> : true_type {};
+template <typename T> struct is_reference : std::false_type {};
+template <typename T> struct is_reference<T&> : std::true_type {};
+template <typename T> struct is_reference<T&&> : std::true_type {};
-template <typename T> struct is_lvalue_reference : false_type {};
-template <typename T> struct is_lvalue_reference<T&> : true_type {};
+template <typename T> struct is_lvalue_reference : std::false_type {};
+template <typename T> struct is_lvalue_reference<T&> : std::true_type {};
-template <typename T> struct is_rvalue_reference : false_type {};
-template <typename T> struct is_rvalue_reference<T&&> : true_type {};
+template <typename T> struct is_rvalue_reference : std::false_type {};
+template <typename T> struct is_rvalue_reference<T&&> : std::true_type {};
template <typename T> struct is_class_detector {
using yes_type = uint8_t;
};
template <typename T> struct is_empty : bool_constant<is_empty_detector<T>::value> {};
-template <typename T> struct is_array : false_type {};
-template <typename T> struct is_array<T[]> : true_type {};
-template <typename T, size_t N> struct is_array<T[N]> : true_type {};
+template <typename T> struct is_array : std::false_type {};
+template <typename T> struct is_array<T[]> : std::true_type {};
+template <typename T, size_t N> struct is_array<T[N]> : std::true_type {};
// template<typename R, typename... Args> struct is_function<
-// R [calling-convention] (Args...[, ...]) [const] [volatile] [&|&&]> : true_type {};
+// R [calling-convention] (Args...[, ...]) [const] [volatile] [&|&&]> : std::true_type {};
// The cv and ref-qualified versions are strange types we're currently avoiding, so not supported.
// On all platforms, variadic functions only exist in the c calling convention.
-template <typename> struct is_function : false_type { };
+template <typename> struct is_function : std::false_type {};
#if !defined(SK_BUILD_FOR_WIN)
-template <typename R, typename... Args> struct is_function<R(Args...)> : true_type {};
+template <typename R, typename... Args> struct is_function<R(Args...)> : std::true_type {};
#else
#if defined(_M_IX86)
-template <typename R, typename... Args> struct is_function<R __cdecl (Args...)> : true_type {};
-template <typename R, typename... Args> struct is_function<R __stdcall (Args...)> : true_type {};
-template <typename R, typename... Args> struct is_function<R __fastcall (Args...)> : true_type {};
+template <typename R, typename... Args> struct is_function<R __cdecl (Args...)> : std::true_type {};
+template <typename R, typename... Args> struct is_function<R __stdcall (Args...)> : std::true_type {};
+template <typename R, typename... Args> struct is_function<R __fastcall (Args...)> : std::true_type {};
#if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2
-template <typename R, typename... Args> struct is_function<R __vectorcall (Args...)> : true_type {};
+template <typename R, typename... Args> struct is_function<R __vectorcall (Args...)> : std::true_type {};
#endif
#else
-template <typename R, typename... Args> struct is_function<R __cdecl (Args...)> : true_type {};
-template <typename R, typename... Args> struct is_function<R __vectorcall (Args...)> : true_type {};
+template <typename R, typename... Args> struct is_function<R __cdecl (Args...)> : std::true_type {};
+template <typename R, typename... Args> struct is_function<R __vectorcall (Args...)> : std::true_type {};
#endif
#endif
-template <typename R, typename... Args> struct is_function<R(Args..., ...)> : true_type {};
-
-template <typename T> struct add_const { using type = const T; };
-template <typename T> using add_const_t = typename add_const<T>::type;
+template <typename R, typename... Args> struct is_function<R(Args..., ...)> : std::true_type {};
-template <typename T> struct add_volatile { using type = volatile T; };
-template <typename T> using add_volatile_t = typename add_volatile<T>::type;
-
-template <typename T> struct add_cv { using type = add_volatile_t<add_const_t<T>>; };
-template <typename T> using add_cv_t = typename add_cv<T>::type;
-
-template <typename T> struct add_pointer { using type = remove_reference_t<T>*; };
-template <typename T> using add_pointer_t = typename add_pointer<T>::type;
+template <typename T> using add_const_t = typename std::add_const<T>::type;
+template <typename T> using add_volatile_t = typename std::add_volatile<T>::type;
+template <typename T> using add_cv_t = typename std::add_cv<T>::type;
+template <typename T> using add_pointer_t = typename std::add_pointer<T>::type;
template <typename T, bool=is_void<T>::value> struct add_lvalue_reference_init { using type = T; };
template <typename T> struct add_lvalue_reference_init<T, false> { using type = T&; };
-template <typename T> struct add_lvalue_reference : add_lvalue_reference_init<T> { };
+template <typename T> struct add_lvalue_reference : add_lvalue_reference_init<T> {};
template <typename T> using add_lvalue_reference_t = typename add_lvalue_reference<T>::type;
template <typename T, bool=is_void<T>::value> struct add_rvalue_reference_init { using type = T; };
template <typename T> struct add_rvalue_reference : add_rvalue_reference_init<T> {};
template <typename T> using add_rvalue_reference_t = typename add_rvalue_reference<T>::type;
-/* This is 'just' a forward declaration. */
-template <typename T> add_rvalue_reference_t<T> declval() /*noexcept*/;
-
template <typename S, typename D, bool=is_void<S>::value||is_function<D>::value||is_array<D>::value>
struct is_convertible_detector {
static const/*expr*/ bool value = is_void<D>::value;
template <typename To> static void param_convertable_to(To);
template <typename From, typename To>
- static decltype(param_convertable_to<To>(declval<From>()), yes_type()) convertible(int);
+ static decltype(param_convertable_to<To>(std::declval<From>()), yes_type()) convertible(int);
template <typename, typename> static no_type convertible(...);
static const/*expr*/ bool value = sizeof(convertible<S, D>(0)) == sizeof(yes_type);
};
template<typename S, typename D> struct is_convertible
- : bool_constant<is_convertible_detector<S, D>::value> { };
+ : bool_constant<is_convertible_detector<S, D>::value> {};
template <typename T> struct decay {
using U = remove_reference_t<T>;
#include "SkTLogic.h"
#include "SkTypes.h"
#include "SkUniquePtr.h"
-#include "SkUtility.h"
#include <limits.h>
#include <new>
#define SkUniquePtr_DEFINED
#include "SkTLogic.h"
-#include "SkUtility.h"
+#include <cstddef>
+#include <utility>
namespace skstd {
struct compressed_base : private B {
/*constexpr*/ compressed_base() : B() {}
/*constexpr*/ compressed_base(const B& b) : B(b) {}
- /*constexpr*/ compressed_base(const B&& b) : B(move(b)) {}
+ /*constexpr*/ compressed_base(B&& b) : B(std::move(b)) {}
/*constexpr*/ B& get() /*noexcept*/ { return *this; }
/*constexpr*/ B const& get() const /*noexcept*/ { return *this; }
void swap(compressed_base&) /*noexcept*/ { }
B fb;
/*constexpr*/ compressed_base() : B() {}
/*constexpr*/ compressed_base(const B& b) : fb(b) {}
- /*constexpr*/ compressed_base(const B&& b) : fb(move(b)) {}
+ /*constexpr*/ compressed_base(B&& b) : fb(std::move(b)) {}
/*constexpr*/ B& get() /*noexcept*/ { return fb; }
/*constexpr*/ B const& get() const /*noexcept*/ { return fb; }
void swap(compressed_base& that) /*noexcept*/ { SkTSwap(fb, that.fB); }
template <typename U1, typename U2, typename = enable_if_t<
is_convertible<U1, pointer>::value && is_convertible<U2, deleter_type>::value
>> /*constexpr*/ compressed_data(U1&& ptr, U2&& d)
- : compressed_base<deleter_type>(skstd::forward<U2>(d)), fPtr(skstd::forward<U1>(ptr)) {}
+ : compressed_base<deleter_type>(std::forward<U2>(d)), fPtr(std::forward<U1>(ptr)) {}
/*constexpr*/ pointer& getPointer() /*noexcept*/ { return fPtr; }
/*constexpr*/ pointer const& getPointer() const /*noexcept*/ { return fPtr; }
/*constexpr*/ deleter_type& getDeleter() /*noexcept*/ {
static_assert(!is_pointer<deleter_type>::value, "Deleter is nullptr function pointer!");
}
- /*constexpr*/ unique_ptr(skstd::nullptr_t) /*noexcept*/ : unique_ptr() { }
+ /*constexpr*/ unique_ptr(std::nullptr_t) /*noexcept*/ : unique_ptr() { }
explicit unique_ptr(pointer ptr) /*noexcept*/ : data(ptr, deleter_type()) {
static_assert(!is_pointer<deleter_type>::value, "Deleter is nullptr function pointer!");
{}
unique_ptr(pointer ptr, remove_reference_t<deleter_type>&& d) /*noexcept*/
- : data(move(ptr), move(d))
+ : data(std::move(ptr), std::move(d))
{
static_assert(!is_reference<deleter_type>::value,
"Binding an rvalue reference deleter as an lvalue reference deleter is not allowed.");
unique_ptr(unique_ptr&& that) /*noexcept*/
- : data(that.release(), forward<deleter_type>(that.get_deleter()))
+ : data(that.release(), std::forward<deleter_type>(that.get_deleter()))
{}
template <typename U, typename ThatD, typename = enable_if_t<
!is_array<U>::value &&
conditional_t<is_reference<D>::value, is_same<ThatD, D>, is_convertible<ThatD, D>>::value>>
unique_ptr(unique_ptr<U, ThatD>&& that) /*noexcept*/
- : data(that.release(), forward<ThatD>(that.get_deleter()))
+ : data(that.release(), std::forward<ThatD>(that.get_deleter()))
{}
~unique_ptr() /*noexcept*/ {
unique_ptr& operator=(unique_ptr&& that) /*noexcept*/ {
reset(that.release());
- get_deleter() = forward<deleter_type>(that.get_deleter());
+ get_deleter() = std::forward<deleter_type>(that.get_deleter());
return *this;
}
!is_array<U>::value,
unique_ptr&> operator=(unique_ptr<U, ThatD>&& that) /*noexcept*/ {
reset(that.release());
- get_deleter() = forward<ThatD>(that.get_deleter());
+ get_deleter() = std::forward<ThatD>(that.get_deleter());
return *this;
}
- unique_ptr& operator=(skstd::nullptr_t) /*noexcept*/ {
+ unique_ptr& operator=(std::nullptr_t) /*noexcept*/ {
reset();
return *this;
}
struct compressed_base : private B {
/*constexpr*/ compressed_base() : B() {}
/*constexpr*/ compressed_base(const B& b) : B(b) {}
- /*constexpr*/ compressed_base(const B&& b) : B(move(b)) {}
+ /*constexpr*/ compressed_base(B&& b) : B(std::move(b)) {}
/*constexpr*/ B& get() /*noexcept*/ { return *this; }
/*constexpr*/ B const& get() const /*noexcept*/ { return *this; }
void swap(compressed_base&) /*noexcept*/ { }
B fb;
/*constexpr*/ compressed_base() : B() {}
/*constexpr*/ compressed_base(const B& b) : fb(b) {}
- /*constexpr*/ compressed_base(const B&& b) : fb(move(b)) {}
+ /*constexpr*/ compressed_base(B&& b) : fb(std::move(b)) {}
/*constexpr*/ B& get() /*noexcept*/ { return fb; }
/*constexpr*/ B const& get() const /*noexcept*/ { return fb; }
void swap(compressed_base& that) /*noexcept*/ { SkTSwap(fb, that.fB); }
template <typename U1, typename U2, typename = enable_if_t<
is_convertible<U1, pointer>::value && is_convertible<U2, deleter_type>::value
>> /*constexpr*/ compressed_data(U1&& ptr, U2&& d)
- : compressed_base<deleter_type>(skstd::forward<U2>(d)), fPtr(skstd::forward<U1>(ptr)) {}
+ : compressed_base<deleter_type>(std::forward<U2>(d)), fPtr(std::forward<U1>(ptr)) {}
/*constexpr*/ pointer& getPointer() /*noexcept*/ { return fPtr; }
/*constexpr*/ pointer const& getPointer() const /*noexcept*/ { return fPtr; }
/*constexpr*/ deleter_type& getDeleter() /*noexcept*/ {
static_assert(!is_pointer<deleter_type>::value, "Deleter is nullptr function pointer!");
}
- /*constexpr*/ unique_ptr(skstd::nullptr_t) /*noexcept*/ : unique_ptr() { }
+ /*constexpr*/ unique_ptr(std::nullptr_t) /*noexcept*/ : unique_ptr() { }
explicit unique_ptr(pointer ptr) /*noexcept*/ : data(ptr, deleter_type()) {
static_assert(!is_pointer<deleter_type>::value, "Deleter is nullptr function pointer!");
{}
unique_ptr(pointer ptr, remove_reference_t<deleter_type>&& d) /*noexcept*/
- : data(move(ptr), move(d))
+ : data(std::move(ptr), std::move(d))
{
static_assert(!is_reference<deleter_type>::value,
"Binding an rvalue reference deleter as an lvalue reference deleter is not allowed.");
}
unique_ptr(unique_ptr&& that) /*noexcept*/
- : data(that.release(), forward<deleter_type>(that.get_deleter()))
+ : data(that.release(), std::forward<deleter_type>(that.get_deleter()))
{}
~unique_ptr() {
unique_ptr& operator=(unique_ptr&& that) /*noexcept*/ {
reset(that.release());
- get_deleter() = forward<deleter_type>(that.get_deleter());
+ get_deleter() = std::forward<deleter_type>(that.get_deleter());
return *this;
}
- unique_ptr& operator=(skstd::nullptr_t) /*noexcept*/ {
+ unique_ptr& operator=(std::nullptr_t) /*noexcept*/ {
reset();
return *this;
}
}
template <typename T, typename D>
-inline bool operator==(const unique_ptr<T, D>& a, skstd::nullptr_t) /*noexcept*/ {
+inline bool operator==(const unique_ptr<T, D>& a, std::nullptr_t) /*noexcept*/ {
//return !a;
return !a.is_attached();
}
template <typename T, typename D>
-inline bool operator==(skstd::nullptr_t, const unique_ptr<T, D>& b) /*noexcept*/ {
+inline bool operator==(std::nullptr_t, const unique_ptr<T, D>& b) /*noexcept*/ {
//return !b;
return !b.is_attached();
}
}
template <typename T, typename D>
-inline bool operator!=(const unique_ptr<T, D>& a, skstd::nullptr_t) /*noexcept*/ {
+inline bool operator!=(const unique_ptr<T, D>& a, std::nullptr_t) /*noexcept*/ {
//return (bool)a;
return a.is_attached();
}
template <typename T, typename D>
-inline bool operator!=(skstd::nullptr_t, const unique_ptr<T, D>& b) /*noexcept*/ {
+inline bool operator!=(std::nullptr_t, const unique_ptr<T, D>& b) /*noexcept*/ {
//return (bool)b;
return b.is_attached();
}
+++ /dev/null
-/*
- * Copyright 2015 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef SkUtility_DEFINED
-#define SkUtility_DEFINED
-
-#include "SkTLogic.h"
-
-namespace skstd {
-
-template <typename T> inline remove_reference_t<T>&& move(T&& t) {
- return static_cast<remove_reference_t<T>&&>(t);
-}
-
-template <typename T> inline T&& forward(remove_reference_t<T>& t) /*noexcept*/ {
- return static_cast<T&&>(t);
-}
-template <typename T> inline T&& forward(remove_reference_t<T>&& t) /*noexcept*/ {
- static_assert(!is_lvalue_reference<T>::value,
- "Forwarding an rvalue reference as an lvalue reference is not allowed.");
- return static_cast<T&&>(t);
-}
-
-template <typename T> add_rvalue_reference_t<T> declval();
-
-} // namespace skstd
-
-#endif
#include "SkScript.h"
#include "SkString.h"
#include "SkIntArray.h"
+#include <utility>
class SkAnimateMaker;
class SkDisplayable;
#define SK_MEMBER(_member, _type) \
{ #_member, SK_OFFSETOF(BASE_CLASS, _member), SkType_##_type, \
- sizeof(skstd::declval<BASE_CLASS>()._member) / sizeof(SkScalar) }
+ sizeof(std::declval<BASE_CLASS>()._member) / sizeof(SkScalar) }
#define SK_MEMBER_ALIAS(_member, _alias, _type) \
{ #_member, SK_OFFSETOF(BASE_CLASS, _alias), SkType_##_type, \
- sizeof(skstd::declval<BASE_CLASS>()._alias) / sizeof(SkScalar) }
+ sizeof(std::declval<BASE_CLASS>()._alias) / sizeof(SkScalar) }
#define SK_MEMBER_ARRAY(_member, _type) \
{ #_member, SK_OFFSETOF(BASE_CLASS, _member), SkType_Array, \
#include "SkTemplates.h"
#include "SkTextMapStateProc.h"
#include "SkTLazy.h"
-#include "SkUtility.h"
#include "SkUtils.h"
#include "SkVertState.h"
#include "SkPaint.h"
#include "SkTemplates.h"
#include "SkUtils.h"
+#include <utility>
// Calculate a type with the same size as the max of all the Ts.
// This must be top level because the is no specialization of inner classes.
#define alignof __alignof
#endif
SkASSERT(alignof(Variant) <= alignof(Space));
- new(&fSpace) Variant(skstd::forward<Args>(args)...);
+ new(&fSpace) Variant(std::forward<Args>(args)...);
}
private:
SkPoint mappedPoint = mapper.TranslationMapper::map(
positions.HorizontalPositions::nextPoint());
positioner.Positioner::findAndPositionGlyph(
- &cursor, mappedPoint, skstd::forward<ProcessOneGlyph>(processOneGlyph));
+ &cursor, mappedPoint, std::forward<ProcessOneGlyph>(processOneGlyph));
}
return;
}
while (text < stop) {
SkPoint mappedPoint = mapper->map(positionReader->nextPoint());
findAndPosition->findAndPositionGlyph(
- &text, mappedPoint, skstd::forward<ProcessOneGlyph>(processOneGlyph));
+ &text, mappedPoint, std::forward<ProcessOneGlyph>(processOneGlyph));
}
}
while (text < stop) {
current =
findAndPosition->findAndPositionGlyph(
- &text, current, skstd::forward<ProcessOneGlyph>(processOneGlyph));
+ &text, current, std::forward<ProcessOneGlyph>(processOneGlyph));
}
}
#include "glsl/GrGLSLProgramDataManager.h"
#include "glsl/GrGLSLUniformHandler.h"
#include "glsl/GrGLSLXferProcessor.h"
+#include <utility>
/**
* Wraps the shader outputs and HW blend state that comprise a Porter Duff blend mode with coverage.
*/
template<OutputType PrimaryOut, OutputType SecondaryOut,
GrBlendEquation BlendEquation, GrBlendCoeff SrcCoeff, GrBlendCoeff DstCoeff>
- struct get_properties : skstd::integral_constant<Properties, static_cast<Properties>(
+ struct get_properties : std::integral_constant<Properties, static_cast<Properties>(
(GR_BLEND_MODIFIES_DST(BlendEquation, SrcCoeff, DstCoeff) ?
kModifiesDst_Property : 0) |
#include "SkPDFMetadata.h"
#include "SkPDFTypes.h"
+#include <utility>
#ifdef SK_PDF_GENERATE_PDFA
#include "SkMD5.h"
va_end(args);
SkASSERT(check == length);
SkASSERT(string[length] == '\0');
- return skstd::move(string);
+ return std::move(string);
#else // C99/C++11 standard vsnprintf
// TODO: When all compilers support this, remove windows-specific code.
va_list args;
va_end(args);
SkASSERT(check == length);
SkASSERT(string[length] == '\0');
- return skstd::move(string);
+ return std::move(string);
#endif
}
namespace {
class PDFXMLObject final : public SkPDFObject {
public:
- PDFXMLObject(SkString xml) : fXML(skstd::move(xml)) {}
+ PDFXMLObject(SkString xml) : fXML(std::move(xml)) {}
void emitObject(SkWStream* stream,
const SkPDFObjNumMap& omap,
const SkPDFSubstituteMap& smap) const override {
// Validate that we haven't written outside of our string.
SkASSERT(out == &output.writable_str()[output.size()]);
*out = '\0';
- return skstd::move(output);
+ return std::move(output);
}
SkPDFObject* SkPDFMetadata::createXMPObject(const UUID& doc,
#include "SkTypes.h"
#include "SkTLogic.h"
#include <limits>
+#include <type_traits>
namespace sktfitsin {
namespace Private {
* that source values are in the range of the Destination.
*/
template <typename S> struct SkTOutOfRange_False {
- typedef skstd::false_type can_be_true;
+ typedef std::false_type can_be_true;
typedef S source_type;
static bool apply(S s) {
return false;
* Assumes that Min(S) <= Min(D).
*/
template <typename D, typename S> struct SkTOutOfRange_LT_MinD {
- typedef skstd::true_type can_be_true;
+ typedef std::true_type can_be_true;
typedef S source_type;
static bool apply(S s) {
typedef SkTHasMoreDigits<S, D> precondition;
/** A low side predicate which tests if the source value is less than 0. */
template <typename D, typename S> struct SkTOutOfRange_LT_Zero {
- typedef skstd::true_type can_be_true;
+ typedef std::true_type can_be_true;
typedef S source_type;
static bool apply(S s) {
return s < static_cast<S>(0);
* Assumes that Max(S) >= Max(D).
*/
template <typename D, typename S> struct SkTOutOfRange_GT_MaxD {
- typedef skstd::true_type can_be_true;
+ typedef std::true_type can_be_true;
typedef S source_type;
static bool apply(S s) {
typedef SkTHasMoreDigits<S, D> precondition;
* First checks OutOfRange_Low then, if in range, OutOfRange_High.
*/
template<class OutOfRange_Low, class OutOfRange_High> struct SkTOutOfRange_Either {
- typedef skstd::true_type can_be_true;
+ typedef std::true_type can_be_true;
typedef typename OutOfRange_Low::source_type source_type;
static bool apply(source_type s) {
bool outOfRange = OutOfRange_Low::apply(s);
*/
#include "Test.h"
#include "SkTemplates.h"
+#include <utility>
namespace {
class Moveable {
} // namespace
DEF_TEST(CPlusPlusEleven_RvalueAndMove, r) {
- Moveable src1; Moveable dst1(skstd::move(src1));
- Moveable src2, dst2; dst2 = skstd::move(src2);
+ Moveable src1; Moveable dst1(std::move(src1));
+ Moveable src2, dst2; dst2 = std::move(src2);
}
#define TOO_BIG "The unique_ptr was bigger than expected."
skstd::unique_ptr<Moveable, void(*)(Moveable*)> u(nullptr, deleter<Moveable>);
static_assert(sizeof(u) == sizeof(BigUniquePtr), WEIRD_SIZE);
- auto u2 = skstd::move(u);
+ auto u2 = std::move(u);
static_assert(sizeof(u2) == sizeof(BigUniquePtr), WEIRD_SIZE);
}
skstd::unique_ptr<Moveable, void(*)(Moveable*)> u(nullptr, [](Moveable* m){ deleter(m); });
static_assert(sizeof(u) == sizeof(BigUniquePtr), WEIRD_SIZE);
- auto u2 = skstd::move(u);
+ auto u2 = std::move(u);
static_assert(sizeof(u2) == sizeof(BigUniquePtr), WEIRD_SIZE);
}
skstd::unique_ptr<Moveable, decltype(d)> u(nullptr, d);
static_assert(sizeof(u) == sizeof(SmallUniquePtr), TOO_BIG);
- auto u2 = skstd::move(u);
+ auto u2 = std::move(u);
static_assert(sizeof(u2) == sizeof(SmallUniquePtr), TOO_BIG);
}
skstd::unique_ptr<Moveable, Deleter<Moveable>> u(nullptr, Deleter<Moveable>());
static_assert(sizeof(u) == sizeof(SmallUniquePtr), TOO_BIG);
- auto u2 = skstd::move(u);
+ auto u2 = std::move(u);
static_assert(sizeof(u2) == sizeof(SmallUniquePtr), TOO_BIG);
}
skstd::unique_ptr<Moveable, Deleter<Moveable>> u(new Moveable(), Deleter<Moveable>());
static_assert(sizeof(u) == sizeof(SmallUniquePtr), TOO_BIG);
- auto u2 = skstd::move(u);
+ auto u2 = std::move(u);
static_assert(sizeof(u2) == sizeof(SmallUniquePtr), TOO_BIG);
}
skstd::unique_ptr<const void, Deleter<const void>> u(new Moveable(), Deleter<const void>());
static_assert(sizeof(u) == sizeof(SmallUniquePtr), TOO_BIG);
- auto u2 = skstd::move(u);
+ auto u2 = std::move(u);
static_assert(sizeof(u2) == sizeof(SmallUniquePtr), TOO_BIG);
}
}
'include/private/SkTemplates.h',
'include/private/SkThreadID.h',
'include/private/SkUniquePtr.h',
- 'include/private/SkUtility.h',
'include/private/SkWeakRefCnt.h',
'src/android/SkBitmapRegionCanvas.cpp',
'src/android/SkBitmapRegionCanvas.h',