2016-10-27 16:21:40 +00:00
|
|
|
# Copyright 2016 Google Inc.
|
|
|
|
#
|
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
|
|
|
|
|
|
|
# Things are easiest for everyone if these source paths are absolute.
|
|
|
|
_samplecode = get_path_info("../samplecode", "abspath")
|
|
|
|
|
|
|
|
samples_sources = [
|
2018-08-08 15:36:17 +00:00
|
|
|
"$_samplecode/Sample.cpp",
|
|
|
|
"$_samplecode/Sample.h",
|
2016-10-27 16:21:40 +00:00
|
|
|
"$_samplecode/Sample2PtRadial.cpp",
|
2020-04-03 15:59:37 +00:00
|
|
|
"$_samplecode/Sample3D.cpp",
|
2016-10-27 16:21:40 +00:00
|
|
|
"$_samplecode/SampleAARectModes.cpp",
|
|
|
|
"$_samplecode/SampleAARects.cpp",
|
|
|
|
"$_samplecode/SampleAndroidShadows.cpp",
|
2020-04-03 15:59:37 +00:00
|
|
|
"$_samplecode/SampleAnimBlur.cpp",
|
2018-01-12 16:24:30 +00:00
|
|
|
"$_samplecode/SampleAnimatedImage.cpp",
|
2016-10-27 16:21:40 +00:00
|
|
|
"$_samplecode/SampleAnimatedText.cpp",
|
|
|
|
"$_samplecode/SampleArc.cpp",
|
|
|
|
"$_samplecode/SampleAtlas.cpp",
|
2020-08-13 13:14:24 +00:00
|
|
|
"$_samplecode/SampleAudio.cpp",
|
2016-10-27 16:21:40 +00:00
|
|
|
"$_samplecode/SampleCamera.cpp",
|
|
|
|
"$_samplecode/SampleChart.cpp",
|
2017-08-15 17:28:42 +00:00
|
|
|
"$_samplecode/SampleChineseFling.cpp",
|
2016-10-27 16:21:40 +00:00
|
|
|
"$_samplecode/SampleCircle.cpp",
|
|
|
|
"$_samplecode/SampleClip.cpp",
|
|
|
|
"$_samplecode/SampleClock.cpp",
|
|
|
|
"$_samplecode/SampleComplexClip.cpp",
|
2017-09-25 20:53:49 +00:00
|
|
|
"$_samplecode/SampleCowboy.cpp",
|
2018-08-31 19:07:51 +00:00
|
|
|
"$_samplecode/SampleCusp.cpp",
|
2016-10-27 16:21:40 +00:00
|
|
|
"$_samplecode/SampleDegenerateTwoPtRadials.cpp",
|
|
|
|
"$_samplecode/SampleEffects.cpp",
|
|
|
|
"$_samplecode/SampleEmboss.cpp",
|
|
|
|
"$_samplecode/SampleFatBits.cpp",
|
|
|
|
"$_samplecode/SampleFillType.cpp",
|
2020-10-14 19:59:02 +00:00
|
|
|
"$_samplecode/SampleFilterBounds.cpp",
|
2020-06-09 22:26:50 +00:00
|
|
|
"$_samplecode/SampleFitCubicToCircle.cpp",
|
2018-01-25 21:26:25 +00:00
|
|
|
"$_samplecode/SampleFlutterAnimate.cpp",
|
2018-06-01 17:46:46 +00:00
|
|
|
"$_samplecode/SampleGlyphTransform.cpp",
|
2016-10-27 16:21:40 +00:00
|
|
|
"$_samplecode/SampleGradients.cpp",
|
|
|
|
"$_samplecode/SampleHairCurves.cpp",
|
|
|
|
"$_samplecode/SampleHairModes.cpp",
|
2019-07-17 20:31:44 +00:00
|
|
|
"$_samplecode/SampleImageFilterDAG.cpp",
|
2020-04-03 15:59:37 +00:00
|
|
|
"$_samplecode/SampleLCD.cpp",
|
2016-10-27 16:21:40 +00:00
|
|
|
"$_samplecode/SampleLayers.cpp",
|
|
|
|
"$_samplecode/SampleManyRects.cpp",
|
2020-12-17 21:23:45 +00:00
|
|
|
"$_samplecode/SampleMaterialShadows.cpp",
|
2016-10-27 16:21:40 +00:00
|
|
|
"$_samplecode/SampleMegaStroke.cpp",
|
2019-02-15 18:49:01 +00:00
|
|
|
"$_samplecode/SampleMixer.cpp",
|
2016-10-27 16:21:40 +00:00
|
|
|
"$_samplecode/SamplePatch.cpp",
|
|
|
|
"$_samplecode/SamplePath.cpp",
|
|
|
|
"$_samplecode/SamplePathClip.cpp",
|
|
|
|
"$_samplecode/SamplePathEffects.cpp",
|
|
|
|
"$_samplecode/SamplePathOverstroke.cpp",
|
2020-04-03 15:59:37 +00:00
|
|
|
"$_samplecode/SamplePathText.cpp",
|
2016-10-27 16:21:40 +00:00
|
|
|
"$_samplecode/SamplePolyToPoly.cpp",
|
|
|
|
"$_samplecode/SampleQuadStroker.cpp",
|
|
|
|
"$_samplecode/SampleRectanizer.cpp",
|
|
|
|
"$_samplecode/SampleRepeatTile.cpp",
|
2019-02-12 16:31:27 +00:00
|
|
|
"$_samplecode/SampleSG.cpp",
|
2020-04-03 15:59:37 +00:00
|
|
|
"$_samplecode/SampleSVGFile.cpp",
|
2017-06-09 15:09:03 +00:00
|
|
|
"$_samplecode/SampleShadowColor.cpp",
|
2017-05-23 17:50:58 +00:00
|
|
|
"$_samplecode/SampleShadowReference.cpp",
|
2017-05-04 18:00:59 +00:00
|
|
|
"$_samplecode/SampleShadowUtils.cpp",
|
2016-10-27 16:21:40 +00:00
|
|
|
"$_samplecode/SampleShip.cpp",
|
2020-07-17 18:03:42 +00:00
|
|
|
"$_samplecode/SampleSimpleStroker.cpp",
|
2016-10-27 16:21:40 +00:00
|
|
|
"$_samplecode/SampleSlides.cpp",
|
|
|
|
"$_samplecode/SampleStringArt.cpp",
|
|
|
|
"$_samplecode/SampleStrokePath.cpp",
|
|
|
|
"$_samplecode/SampleStrokeRect.cpp",
|
2021-03-06 04:58:25 +00:00
|
|
|
"$_samplecode/SampleStrokeVerb.cpp",
|
2016-10-27 16:21:40 +00:00
|
|
|
"$_samplecode/SampleTextBox.cpp",
|
2019-08-07 15:22:13 +00:00
|
|
|
"$_samplecode/SampleTextureUpload.cpp",
|
2019-01-30 19:38:59 +00:00
|
|
|
"$_samplecode/SampleThinAA.cpp",
|
create a sample to demonstrate a timing attack
This sample attempts to re-create an image's alpha channel by drawing it
one pixel at a time and timing how long each pixel takes to draw.
The "abc" text should appear twice normally, and the third and fourth
versions are reconstructed from timing, one by timing 1:1 pixel draws,
the other by timing 1x1:1024x1024 upscale into an offscreen. It's not
meant to be an exact reconstruction, but you can easily see the shapes,
particularly at -O0, -O1, and -Os. Auto-vectorization from -O2/-O3 do
a good amount to cover up the problem.
The legacy CPU backend is the main place to look. I haven't been able
to reconstruct any images using SkRasterPipelineBlitter or SkVMBlitter,
and while on the GPU I do see non-random patterns in the timing, it
appears to be the same single pattern across devices, OSes, GPUs, GPU
APIs and content... I assume it's something like our resource caching
policy.
This can't really be a GM, given how it draws non-deterministically.
Bug: chromium:1088224
Change-Id: I2ec79c8dd407ecb104fd9bf0c8039cb6dd1fe436
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313466
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-08-26 17:26:06 +00:00
|
|
|
"$_samplecode/SampleTiming.cpp",
|
2020-10-22 19:40:49 +00:00
|
|
|
"$_samplecode/SampleVariableWidthStroker.cpp",
|
2016-10-27 16:21:40 +00:00
|
|
|
"$_samplecode/SampleVertices.cpp",
|
|
|
|
"$_samplecode/SampleWritePixels.cpp",
|
|
|
|
"$_samplecode/SampleXfer.cpp",
|
|
|
|
"$_samplecode/SampleXfermodesBlur.cpp",
|
|
|
|
"$_samplecode/vertexdump.cpp",
|
|
|
|
]
|
2021-06-16 16:05:54 +00:00
|
|
|
|
2021-08-11 19:43:50 +00:00
|
|
|
skgpu_v1_samples_sources = [
|
|
|
|
"$_samplecode/SampleDegenerateQuads.cpp",
|
|
|
|
"$_samplecode/SamplePathTessellators.cpp",
|
|
|
|
]
|
2021-06-16 16:05:54 +00:00
|
|
|
|
2021-07-01 16:12:52 +00:00
|
|
|
samples_sources += skgpu_v1_samples_sources
|