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 = [
|
|
|
|
"$_samplecode/PerlinPatch.cpp",
|
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/SampleAAClip.cpp",
|
|
|
|
"$_samplecode/SampleAAGeometry.cpp",
|
|
|
|
"$_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",
|
2019-09-04 21:39:42 +00:00
|
|
|
"$_samplecode/SampleBackdropBounds.cpp",
|
2016-10-27 16:21:40 +00:00
|
|
|
"$_samplecode/SampleBitmapRect.cpp",
|
|
|
|
"$_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/SampleClipDrawMatch.cpp",
|
|
|
|
"$_samplecode/SampleClock.cpp",
|
|
|
|
"$_samplecode/SampleColorFilter.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",
|
2019-03-07 16:24:32 +00:00
|
|
|
"$_samplecode/SampleDegenerateQuads.cpp",
|
2016-10-27 16:21:40 +00:00
|
|
|
"$_samplecode/SampleDegenerateTwoPtRadials.cpp",
|
|
|
|
"$_samplecode/SampleEffects.cpp",
|
|
|
|
"$_samplecode/SampleEmboss.cpp",
|
|
|
|
"$_samplecode/SampleFatBits.cpp",
|
|
|
|
"$_samplecode/SampleFillType.cpp",
|
|
|
|
"$_samplecode/SampleFilter2.cpp",
|
|
|
|
"$_samplecode/SampleFilterQuality.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",
|
2020-04-03 15:59:37 +00:00
|
|
|
"$_samplecode/SampleHT.cpp",
|
2016-10-27 16:21:40 +00:00
|
|
|
"$_samplecode/SampleHairCurves.cpp",
|
|
|
|
"$_samplecode/SampleHairModes.cpp",
|
2020-04-03 15:59:37 +00:00
|
|
|
"$_samplecode/SampleHairline.cpp",
|
2016-10-27 16:21:40 +00:00
|
|
|
"$_samplecode/SampleIdentityScale.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/SampleLayerMask.cpp",
|
|
|
|
"$_samplecode/SampleLayers.cpp",
|
|
|
|
"$_samplecode/SampleManyRects.cpp",
|
|
|
|
"$_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/SampleRegion.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",
|
2016-10-27 16:21:40 +00:00
|
|
|
"$_samplecode/SampleShaders.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",
|
|
|
|
"$_samplecode/SampleSubpixelTranslate.cpp",
|
2020-01-07 02:49:37 +00:00
|
|
|
"$_samplecode/SampleTessellatedWedge.cpp",
|
2016-10-27 16:21:40 +00:00
|
|
|
"$_samplecode/SampleTextBox.cpp",
|
2018-08-08 15:36:17 +00:00
|
|
|
"$_samplecode/SampleTextEffects.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",
|
2016-10-27 16:21:40 +00:00
|
|
|
"$_samplecode/SampleUnpremul.cpp",
|
|
|
|
"$_samplecode/SampleVertices.cpp",
|
|
|
|
"$_samplecode/SampleWritePixels.cpp",
|
|
|
|
"$_samplecode/SampleXfer.cpp",
|
|
|
|
"$_samplecode/SampleXfermodesBlur.cpp",
|
|
|
|
"$_samplecode/vertexdump.cpp",
|
|
|
|
]
|
2020-03-25 16:50:35 +00:00
|
|
|
|
|
|
|
samples_sources_ccpr = [ "$_samplecode/SampleCCPRGeometry.cpp" ]
|