aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/CPlusPlusEleven.cpp
Commit message (Collapse)AuthorAge
* IWYU for some more test files starting with 'C'.Gravatar Ben Wagner2018-04-17
| | | | | | | Change-Id: I010527b342cbfa0b425ef0d00966219413d9e77d Reviewed-on: https://skia-review.googlesource.com/121886 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* SkPDF: Glyph validation changeGravatar halcanary2016-08-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of mapping invaid glyphIDs to zero or maxGlyphID, don't draw them at all. Validate glyphs when glyph is written, not ahead of time. Don't allocate array to copy user-provided glyphs. Easy early exit from SkPDFDevice::internalDrawText() GlyphPositioner::flush() called ~GlyphPositioner() SkScopeExit class now exists. Assume SkTypeface* pointers are now never null in more places. precalculate alignmentFactor to clean up code. SkPDFDevice::updateFont must be called with validated glyphID. Skip bad glyphs to make this true. SkPDFDevice::updateFont always succeeds. SkPDFFont::GetFontResource always succeeds (preconditions are asserted). If GetMetrics fails, don't call GetFontResource. SkPDFFont::glyphsToPDFFontEncodingCount() becomes SkPDFFont::countStretch() and is inlined. SkPDFFont::glyphsToPDFFontEncoding now works one Glyph at a time and is inlined. SkPDFFont::noteGlyphUsage() operates one glyph at a time. Add SkScopeExit.h; also a unit test for it. SkPostConfig: Fix SK_UNUSED for Win32. No public API changes. TBR=reed@google.com BUG=625995 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2278703002 Review-Url: https://codereview.chromium.org/2278703002
* SkPDF: PDFShader code modernized.Gravatar halcanary2016-08-03
| | | | | | | | | | | | | | | | | | | | | | Motivation: reduce code complexity. SkCanon stores SkPDFShader::State next to SkDFObject, not inside. many places use sk_sp<T> rather than T* to represent ownership. SkPDFShader::State no longer holds bitmap. SkPDFShader::State gets move constructor, no longer heap-allocated. Classes removed: SkPDFFunctionShader SkPDFAlphaFunctionShader SkPDFImageShader BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2193973002 Review-Url: https://codereview.chromium.org/2193973002
* SkTypes: use constexpr when appropriateGravatar halcanary2016-05-23
| | | | | | | | motivation: https://codereview.chromium.org/2000853003 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2004073002 Review-Url: https://codereview.chromium.org/2004073002
* Use std::unique_ptr.Gravatar mtklein2016-03-16
| | | | | | | | | | | | | TBR=reed@google.com Committed: https://skia.googlesource.com/skia/+/20c1e3abfc681771f73eb19fde7284196e028940 Committed: https://skia.googlesource.com/skia/+/3dd9ed37c24611af86f0fe374bd3698b63f09450 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1780933003 Committed: https://skia.googlesource.com/skia/+/2691d76a06e1af6282f8b3a3140cc93361be10c4 Review URL: https://codereview.chromium.org/1780933003
* Revert of Use std::unique_ptr. (patchset #10 id:170001 of ↵Gravatar mtklein2016-03-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1780933003/ ) Reason for revert: aww jeez, I dropped ps 8... Original issue's description: > Use std::unique_ptr. > > TBR=reed@google.com > > Committed: https://skia.googlesource.com/skia/+/20c1e3abfc681771f73eb19fde7284196e028940 > > Committed: https://skia.googlesource.com/skia/+/3dd9ed37c24611af86f0fe374bd3698b63f09450 > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1780933003 > > Committed: https://skia.googlesource.com/skia/+/2691d76a06e1af6282f8b3a3140cc93361be10c4 TBR=bungeman@google.com,mtklein@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1809693002
* Use std::unique_ptr.Gravatar mtklein2016-03-16
| | | | | | | | | | | TBR=reed@google.com Committed: https://skia.googlesource.com/skia/+/20c1e3abfc681771f73eb19fde7284196e028940 Committed: https://skia.googlesource.com/skia/+/3dd9ed37c24611af86f0fe374bd3698b63f09450 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1780933003 Review URL: https://codereview.chromium.org/1780933003
* Revert of Use std::unique_ptr. (patchset #8 id:130001 of ↵Gravatar mtklein2016-03-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1780933003/ ) Reason for revert: Another Android ambiguity due to implicit bool... frameworks/base/core/jni/android/graphics/Utils.cpp:110:35: error: call of overloaded 'SkMemoryStream(SkAutoTUnref<SkData>&)' is ambiguous return new SkMemoryStream(data); Original issue's description: > Use std::unique_ptr. > > TBR=reed@google.com > > Committed: https://skia.googlesource.com/skia/+/20c1e3abfc681771f73eb19fde7284196e028940 > > Committed: https://skia.googlesource.com/skia/+/3dd9ed37c24611af86f0fe374bd3698b63f09450 TBR=bungeman@google.com,mtklein@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1785353002
* Use std::unique_ptr.Gravatar mtklein2016-03-11
| | | | | | | | TBR=reed@google.com Committed: https://skia.googlesource.com/skia/+/20c1e3abfc681771f73eb19fde7284196e028940 Review URL: https://codereview.chromium.org/1780933003
* Revert of Use std::unique_ptr. (patchset #7 id:120001 of ↵Gravatar mtklein2016-03-10
| | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1780933003/ ) Reason for revert: Now we remember! The problem was Clank: https://build.chromium.org/p/tryserver.chromium.android/builders/android_clang_dbg_recipe/builds/34329 Original issue's description: > Use std::unique_ptr. > > TBR=reed@google.com > > Committed: https://skia.googlesource.com/skia/+/20c1e3abfc681771f73eb19fde7284196e028940 TBR=bungeman@google.com,mtklein@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1782973002
* Use std::unique_ptr.Gravatar mtklein2016-03-10
| | | | | | TBR=reed@google.com Review URL: https://codereview.chromium.org/1780933003
* Revert of skstd -> std for unique_ptr (patchset #24 id:460001 of ↵Gravatar mtklein2016-01-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1436033003/ ) Reason for revert: Still need an answer for SkAdvancedTypefaceMetrics (at least for Google3 iOS build). Original issue's description: > skstd -> std for unique_ptr > > TBR=reed@google.com > No public API changes. > > BUG=skia:4564 > > Committed: https://skia.googlesource.com/skia/+/755c553c17b82bb5de3d9cc8d3b2a866ff9e9e50 > > CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Mac10.9-Clang-x86_64-Release-CMake-Trybot,Build-Ubuntu-GCC-x86_64-Debug-CrOS_Link-Trybot;client.skia:Perf-Mac10.9-Clang-MacMini6.2-CPU-AVX-x86_64-Release-Trybot,Test-iOS-Clang-iPad4-GPU-SGX554-Arm7-Release-Trybot > > Committed: https://skia.googlesource.com/skia/+/06189155d987db5c7e69015f6ea87c2168d6a065 > > Committed: https://skia.googlesource.com/skia/+/70e8dfca4a7f5bce97b8021a6e378c4828b09c8c > > Committed: https://skia.googlesource.com/skia/+/dadfc245cc9a0279ff7b73da3344f2ca5d139907 > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1436033003 > > Committed: https://skia.googlesource.com/skia/+/ccf1de0d9aa75f29829f1c4c462214b991fd8c9e TBR=bungeman@google.com,mtklein@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:4564 Review URL: https://codereview.chromium.org/1626873004
* skstd -> std for unique_ptrGravatar mtklein2016-01-24
| | | | | | | | | | | | | | | | | | | | TBR=reed@google.com No public API changes. BUG=skia:4564 Committed: https://skia.googlesource.com/skia/+/755c553c17b82bb5de3d9cc8d3b2a866ff9e9e50 CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Mac10.9-Clang-x86_64-Release-CMake-Trybot,Build-Ubuntu-GCC-x86_64-Debug-CrOS_Link-Trybot;client.skia:Perf-Mac10.9-Clang-MacMini6.2-CPU-AVX-x86_64-Release-Trybot,Test-iOS-Clang-iPad4-GPU-SGX554-Arm7-Release-Trybot Committed: https://skia.googlesource.com/skia/+/06189155d987db5c7e69015f6ea87c2168d6a065 Committed: https://skia.googlesource.com/skia/+/70e8dfca4a7f5bce97b8021a6e378c4828b09c8c Committed: https://skia.googlesource.com/skia/+/dadfc245cc9a0279ff7b73da3344f2ca5d139907 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1436033003 Review URL: https://codereview.chromium.org/1436033003
* Start using <type_traits> and <utility> (C++11).Gravatar bungeman2016-01-05
| | | | | | | | | | | | | | SkUtility.h and SkTLogic.h implement a number of type traits now available through <type_traits> and <utility>. This removes SkUtility.h, replacing it with <utility>, and moves a number of traits in SkTLogic.h to use the std:: equivelents. This change only uses C++11 parts of the standard library; SkTLogic.h will continue to provide C++14 and beyond for now in the skstd namespace. The changes to SkTLogic.h are being done gradually so that safe changes may be landed confidently, with more risky changes in the future. Review URL: https://codereview.chromium.org/1561683002
* Revert of skstd -> std for unique_ptr (patchset #17 id:320001 of ↵Gravatar mtklein2015-12-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1436033003/ ) Reason for revert: Chromium bots can't handle forward declared types, e.g. struct Foo { int x,y; std::unique_ptr<Foo> next; }; https://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/86497 Original issue's description: > skstd -> std for unique_ptr > > TBR=reed@google.com > No public API changes. > > BUG=skia:4564 > > Committed: https://skia.googlesource.com/skia/+/755c553c17b82bb5de3d9cc8d3b2a866ff9e9e50 > > CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Mac10.9-Clang-x86_64-Release-CMake-Trybot,Build-Ubuntu-GCC-x86_64-Debug-CrOS_Link-Trybot;client.skia:Perf-Mac10.9-Clang-MacMini6.2-CPU-AVX-x86_64-Release-Trybot,Test-iOS-Clang-iPad4-GPU-SGX554-Arm7-Release-Trybot > > Committed: https://skia.googlesource.com/skia/+/06189155d987db5c7e69015f6ea87c2168d6a065 > > Committed: https://skia.googlesource.com/skia/+/70e8dfca4a7f5bce97b8021a6e378c4828b09c8c > > Committed: https://skia.googlesource.com/skia/+/dadfc245cc9a0279ff7b73da3344f2ca5d139907 TBR=bungeman@google.com,mtklein@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:4564 Review URL: https://codereview.chromium.org/1498583002
* skstd -> std for unique_ptrGravatar mtklein2015-12-02
| | | | | | | | | | | | | | | | | TBR=reed@google.com No public API changes. BUG=skia:4564 Committed: https://skia.googlesource.com/skia/+/755c553c17b82bb5de3d9cc8d3b2a866ff9e9e50 CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Mac10.9-Clang-x86_64-Release-CMake-Trybot,Build-Ubuntu-GCC-x86_64-Debug-CrOS_Link-Trybot;client.skia:Perf-Mac10.9-Clang-MacMini6.2-CPU-AVX-x86_64-Release-Trybot,Test-iOS-Clang-iPad4-GPU-SGX554-Arm7-Release-Trybot Committed: https://skia.googlesource.com/skia/+/06189155d987db5c7e69015f6ea87c2168d6a065 Committed: https://skia.googlesource.com/skia/+/70e8dfca4a7f5bce97b8021a6e378c4828b09c8c Review URL: https://codereview.chromium.org/1436033003
* Revert of skstd -> std for unique_ptr (patchset #16 id:300001 of ↵Gravatar mtklein2015-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1436033003/ ) Reason for revert: Test-iOS-Clang-iPad4-GPU-SGX554-Arm7-Release Original issue's description: > skstd -> std for unique_ptr > > TBR=reed@google.com > No public API changes. > > BUG=skia:4564 > > Committed: https://skia.googlesource.com/skia/+/755c553c17b82bb5de3d9cc8d3b2a866ff9e9e50 > > CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Mac10.9-Clang-x86_64-Release-CMake-Trybot,Build-Ubuntu-GCC-x86_64-Debug-CrOS_Link-Trybot;client.skia:Perf-Mac10.9-Clang-MacMini6.2-CPU-AVX-x86_64-Release-Trybot > > Committed: https://skia.googlesource.com/skia/+/06189155d987db5c7e69015f6ea87c2168d6a065 > > Committed: https://skia.googlesource.com/skia/+/70e8dfca4a7f5bce97b8021a6e378c4828b09c8c TBR=bungeman@google.com,mtklein@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:4564 Review URL: https://codereview.chromium.org/1482343002
* skstd -> std for unique_ptrGravatar mtklein2015-11-30
| | | | | | | | | | | | | | | TBR=reed@google.com No public API changes. BUG=skia:4564 Committed: https://skia.googlesource.com/skia/+/755c553c17b82bb5de3d9cc8d3b2a866ff9e9e50 CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Mac10.9-Clang-x86_64-Release-CMake-Trybot,Build-Ubuntu-GCC-x86_64-Debug-CrOS_Link-Trybot;client.skia:Perf-Mac10.9-Clang-MacMini6.2-CPU-AVX-x86_64-Release-Trybot Committed: https://skia.googlesource.com/skia/+/06189155d987db5c7e69015f6ea87c2168d6a065 Review URL: https://codereview.chromium.org/1436033003
* Revert of skstd -> std for unique_ptr (patchset #16 id:300001 of ↵Gravatar mtklein2015-11-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1436033003/ ) Reason for revert: Perf-Mac10.9-Clang-MacMini6.2-CPU-AVX-x86_64-Release has not updated yet. Original issue's description: > skstd -> std for unique_ptr > > TBR=reed@google.com > No public API changes. > > BUG=skia:4564 > > Committed: https://skia.googlesource.com/skia/+/755c553c17b82bb5de3d9cc8d3b2a866ff9e9e50 > > CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Mac10.9-Clang-x86_64-Release-CMake-Trybot,Build-Ubuntu-GCC-x86_64-Debug-CrOS_Link-Trybot > > Committed: https://skia.googlesource.com/skia/+/06189155d987db5c7e69015f6ea87c2168d6a065 TBR=bungeman@google.com,mtklein@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:4564 Review URL: https://codereview.chromium.org/1467333002
* skstd -> std for unique_ptrGravatar mtklein2015-11-23
| | | | | | | | | | | | | TBR=reed@google.com No public API changes. BUG=skia:4564 Committed: https://skia.googlesource.com/skia/+/755c553c17b82bb5de3d9cc8d3b2a866ff9e9e50 CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Mac10.9-Clang-x86_64-Release-CMake-Trybot,Build-Ubuntu-GCC-x86_64-Debug-CrOS_Link-Trybot Review URL: https://codereview.chromium.org/1436033003
* Revert of skstd -> std for unique_ptr (patchset #9 id:160001 of ↵Gravatar mtklein2015-11-16
| | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1436033003/ ) Reason for revert: 10.9 bots are too old too. Original issue's description: > skstd -> std for unique_ptr > > TBR=reed@google.com > No public API changes. > > BUG=skia:4564 > > Committed: https://skia.googlesource.com/skia/+/755c553c17b82bb5de3d9cc8d3b2a866ff9e9e50 TBR=bungeman@google.com,mtklein@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:4564 Review URL: https://codereview.chromium.org/1446413002
* skstd -> std for unique_ptrGravatar mtklein2015-11-16
| | | | | | | | | TBR=reed@google.com No public API changes. BUG=skia:4564 Review URL: https://codereview.chromium.org/1436033003
* Replace SkFunction with std::functionGravatar mtklein2015-11-12
| | | | | | | TBR=reed@google.com No public API changes. Review URL: https://codereview.chromium.org/1441753002
* Add skstd::unique_ptr and use it.Gravatar bungeman2015-09-07
| | | | | | | TBR=bsalomon@google.com The one gpu include change is just to fix swap in implementation. Review URL: https://codereview.chromium.org/1330503006
* C++11 Unit Test for RValue semantics.Gravatar halcanary2015-02-13
Motivation: test that these works on all possible bots and for all possible clients (clients do run these unit tests, right?) Dear clients: if this unit test fails, let us know! BUG=skia:3427 Review URL: https://codereview.chromium.org/922043004