For now, remove json functionality and do not depend on json. This
allows us to build and run until solving skbug.com/2448.
bench/DeferredSurfaceCopyBench.cpp:
Include GrRenderTarget last, so SK_SUPPORT_GPU will be set properly.
bench/ResultsWriter.h:
bench/benchmain.cpp:
Remove JSONResultsWriter when SK_BUILD_JSON_WRITER is not defined,
which is the case for the Android framework build.
gyp/bench.gyp:
Depend on skia and cutils (for android_atomic_inc etc).
gyp/common_conditions.gypi:
Define SK_BUILD_JSON_WRITER when skia_build_json_writer is set.
gyp/common_variables.gypi:
Add a flag for skia_build_json_writer, and set it only when
skia_android_framework is not set.
gyp/jsoncpp.gyp:
Do not build jsoncpp when skia_build_json_writer is not defined.
include/utils/SkJSONCPP.h:
Do not include json headers when SK_BUILD_JSON_WRITER is not defined.
platform_tools/android/bin/gyp_to_android.py:
Generate bench/Android.mk.
platform_tools/android/gyp_gen/gypd_parser.py:
Skip dest_dir when checking for include_dirs.
platform_tools/android/gyp_gen/makefile_writer.py:
Build bench/Android.mk when building external/skia.
platform_tools/android/gyp_gen/tool_makefile_writer.py:
Add a parameter for putting the binary into /data/local/tmp.
BUG=skia:2447
BUG=skia:2448
R=halcanary@google.com, reed@google.com
Author: scroggo@google.com
Review URL: https://codereview.chromium.org/282053002
git-svn-id: http://skia.googlecode.com/svn/trunk@14760 2bbb7eff-a529-9590-31e7-b0007b416f81
Prints microsecond timing for each command in the left-hand column:
optimized flat/http___mobile_news_sandbox_google_com_news_pt0_scroll_layer_7.skp
4.0 1 Save
2075.0 2 DrawRect
104.0 3 BoundedDrawPosTextH
135.4 4 DrawRect
9.4 5 DrawRect
5.6 6 DrawRect
8.2 7 DrawRect
6.8 8 DrawRect
...
(I'm sure Rietveld will just mangle the crap out of that. It's helpfully right-aligned.)
To do this, I made Draw from SkRecordDraw Skia-public as SkRecords::Draw,
and time it command-by-command.
BUG=skia:2378
R=fmalita@chromium.org, mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/272723007
git-svn-id: http://skia.googlecode.com/svn/trunk@14672 2bbb7eff-a529-9590-31e7-b0007b416f81
The cubic line intersection math empirically works 99.99% of the time (fails 3100 out of 1B random tests) but when it fails, an intersection may be missed altogether.
The binary search is may not find a solution if the cubic line failed to find any solutions at all, but so far that case hasn't arisen.
BUG=skia:2504
TBR=reed@google.com
Author: caryclark@google.com
Review URL: https://codereview.chromium.org/266063003
git-svn-id: http://skia.googlecode.com/svn/trunk@14614 2bbb7eff-a529-9590-31e7-b0007b416f81
This is a mid-level library for finding patterns of commands in an SkRecord. At the API level, it's a bit regex inspired. Some examples:
- Pattern1<Is<DrawRect>> matches a single DrawRect
- Pattern1<Star<Is<DrawRect>>> matches 0 or more DrawRects
- Pattern2<Is<ClipRect>, Is<DrawRect>> matches a single clip rect followed by a single draw rect
- Pattern3<Is<Save>, Star<IsDraw>, Is<Restore>> matches a single Save, followed by any number of Draws, followed by Restore
- Pattern1<Or<Is<DrawRect>, Is<ClipRect>>> matches a DrawRect or a ClipRect
- Pattern1<Not<Is<ClipRect>>> matches a command that's notClipRect.
Once you have a pattern, you can call .search() on it to step through ranges of matching commands. This means patterns can replace most of the custom iteration logic for optimization passes: the generic pattern searching steps through all the optimization candidates, which optimization-specific code further inspects and mutates.
SkRecordTraits is now unused. Bye bye!
Generated code and performance of SkRecordOpts is very similar to what it was before. (I had to use SK_ALWAYS_INLINE in a few places to make this so.)
BUG=skia:2378
R=fmalita@chromium.org, bungeman@google.com, mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/263063002
git-svn-id: http://skia.googlecode.com/svn/trunk@14582 2bbb7eff-a529-9590-31e7-b0007b416f81
Before this change, an object needed to inherit from GrResource (and
thus be a GPU object) in order to live in the GrResourceCache. That
was a problem for caching items that weren't GPU objects themselves,
but owned GPU objects.
This change splits GrResource into two classes:
1. GrCacheable: The base class for objects that can live in the
GrResourceCache.
2. GrGpuObject, which inherits from GrCacheable: The base class for
objects that get tracked by GrGpu.
This change is purely a refactor; there is no change in functionality.
Change-Id: I3e8daeb1f123041f414aa306c1366e959ae9e39e
BUG=skia:
R=bsalomon@google.com
Author: cdalton@nvidia.com
Review URL: https://codereview.chromium.org/251013002
git-svn-id: http://skia.googlecode.com/svn/trunk@14553 2bbb7eff-a529-9590-31e7-b0007b416f81
- Rename TileGrid -> Quilt to avoid the name overload.
- Tag all failing GMs with kSkipTiled_Flag.
You may be wondering, do any GMs pass? Yes, some do! And that trends towards all of them as we increase --quiltTile.
Two GMs only fail in --quilt mode in 565. Otherwise all GMs which fail are skipped, and those which don't fail aren't. (The 8888 variants of those two GMs are skipped even though they pass.)
BUG=skia:2477
R=reed@google.com, mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/256373002
git-svn-id: http://skia.googlecode.com/svn/trunk@14457 2bbb7eff-a529-9590-31e7-b0007b416f81
gyp/apptype_console.gypi:
Don't include console app dependencies when building for Android framework.
gyp/tests.gyp:
Add/remove libraries for framework build.
platform_tools/android/bin/android_framework_gyp.py:
Moved to gyp_gen.
clean_up_gypd_files moved to this script.
platform_tools/android/bin/gyp_to_android.py:
Call new function for generating tool makefile.
Set LOCAL_MODULE.
platform_tools/android/gyp_gen/gypd_parser.py:
Support relative paths.
platform_tools/android/gyp_gen/makefile_writer.py:
Factor out helper functions to be used by tool writer.
LOCAL_MODULE is set elsewhere.
platform_tools/android/gyp_gen/tool_makefile_writer.py:
Multipurpose file for writing makefiles for tools. Should be able to use
it mostly unchanged for bench, gm, etc.
platform_tools/android/gyp_gen/vars_dict_lib.py:
Make the comments follow the style guide.
Add set().
Rename __li to __ordered_set
More/update tests:
platform_tools/android/tests/android_framework_gyp_tests.py
platform_tools/android/tests/expectations/Android.mk
platform_tools/android/tests/expectations/tool/Android.mk
platform_tools/android/tests/expectations/write_local_vars_append_arm
platform_tools/android/tests/expectations/write_local_vars_append_foo
platform_tools/android/tests/expectations/write_local_vars_append_no_name
platform_tools/android/tests/expectations/write_local_vars_no_append_arm
platform_tools/android/tests/expectations/write_local_vars_no_append_foo
platform_tools/android/tests/expectations/write_local_vars_no_append_no_name
platform_tools/android/tests/gyp_to_android_tests.py
platform_tools/android/tests/makefile_writer_tests.py
platform_tools/android/tests/ordered_set_tests.py
platform_tools/android/tests/test_variables.py
BUG=skia:2447
May require an update to the bot to remove pyc files.
R=halcanary@google.com, djsollen@google.com
Author: scroggo@google.com
Review URL: https://codereview.chromium.org/235883015
git-svn-id: http://skia.googlecode.com/svn/trunk@14408 2bbb7eff-a529-9590-31e7-b0007b416f81