skia2/tools
kkinnunen 2e6055b3ea Refactor to separate backend object lifecycle and GpuResource budget decision
Refactor GrGpuResource to contain two different pieces of state:
 a) instance is budgeted or not budgeted
 b) instance references wrapped backend objects or not

The "object lifecycle" was also attached to backend object
handles (ids), which made the code a bit unclear. Backend objects
would be associated with GrGpuResource::LifeCycle, even though
GrGpuResource::LifeCycle refers to the GpuResource, and individual
backend objects in one GpuResource might be governed with different
"lifecycle".

Mark the budgeted/not budgeted with SkBudgeted::kYes, SkBudgeted::kNo.
This was previously GrGpuResource::kCached_LifeCycle,
GrGpuResource::kUncached_LifeCycle.

Mark the "references wrapped object" with boolean. This was previously
GrGpuResource::kBorrowed_LifeCycle,
GrGpuResource::kAdopted_LifeCycle for GrGpuResource.

Associate the backend object ownership status with
GrBackendObjectOwnership for the backend object handles.

The resource type leaf constuctors, such has GrGLTexture or
GrGLTextureRenderTarget take "budgeted" parameter. This parameter
is passed to GrGpuResource::registerWithCache().

The resource type intermediary constructors, such as GrGLTexture
constructors for class GrGLTextureRenderTarget do not take "budgeted"
parameters, intermediary construtors do not call registerWithCache.

Removes the need for tagging GrGpuResource -derived subclass
constructors with "Derived" parameter.

Makes instances that wrap backend objects be registered with
a new function GrGpuResource::registerWithCacheWrapped().

Removes "budgeted" parameter from classes such as StencilAttahment, as
they are always cached and never wrap any external backend objects.

Removes the use of concept "external" from the member function names.
The API refers to the objects as "wrapped", so make all related
functions use the term consistently.

No change in functionality. Resources referencing wrapped objects are
always inserted to the cache with budget decision kNo.

BUG=594928
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1862043002

Review URL: https://codereview.chromium.org/1862043002
2016-04-22 01:48:29 -07:00
..
android Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
copyright
debugger Rein in the use of SkDevice.h 2016-04-20 05:29:51 -07:00
fiddle experimental/fiddle -> tools/fiddle 2016-04-18 11:50:07 -07:00
flags Vulkan config in dm 2016-04-11 14:21:33 -07:00
gpu Refactor to separate backend object lifecycle and GpuResource budget decision 2016-04-22 01:48:29 -07:00
kilobench Rename enums in GrContextFactory to remove "GL" 2016-04-05 11:06:27 -07:00
lua Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
skiaserve Get skiaserve working on Windows. 2016-04-20 10:52:54 -07:00
skp Add catapult to RecreateSKPs bot's PYTHONPATH 2016-02-27 10:04:57 -08:00
timer SkTime::GetNSecs() 2015-10-23 07:02:06 -07:00
VisualBench Hide SkCanvas::LayerIter 2016-04-21 11:05:33 -07:00
vulkan Revise WSI setup. 2016-04-21 11:46:23 -07:00
__init__.py
add_codereview_message.py
AndroidSkDebugToStdOut.cpp Change how SkDebugf is sent to stdout on Android. 2014-12-10 10:23:06 -08:00
BigPathBench.inc Factor out VisualBench timing code into a helper class 2015-10-05 07:23:30 -07:00
build_command_buffer.py Fixes for CommandBuffer bot 2016-04-11 10:16:01 -07:00
build_shaderc.py VulkanViewer on Android 2016-04-21 07:59:44 -07:00
BUILD_simulator.py Fix Google3 fonts. Use fontconfig rather than custom_directory_factory. Add Google3 font caching. 2015-12-01 11:12:05 -08:00
buildbot_spec.json GYP_DEFINES and DM flags for Vulkan bot 2016-04-12 08:13:57 -07:00
buildbot_spec.py Do not do compile steps for Coverage 2016-04-18 04:14:17 -07:00
builder_name_schema.json Add builder_spec.py 2015-07-29 07:38:49 -07:00
builder_name_schema.py Add builder_spec.py 2015-07-29 07:38:49 -07:00
chrome_fuzz.cpp Revert of Delete SkFlattenable::Type (patchset #2 id:20001 of https://codereview.chromium.org/1834303003/ ) 2016-04-04 14:57:19 -07:00
compare_codereview.py
coverage.sh
CrashHandler.cpp Don't convert DWORD to int. 2016-03-19 15:51:05 -07:00
CrashHandler.h rewrite ambiguous comment 2015-02-10 07:47:31 -08:00
create_test_font.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
dm_flags.json Fix CommandBuffer bot's DM config 2016-04-13 06:00:42 -07:00
dm_flags.py Fix CommandBuffer bot's DM config 2016-04-13 06:00:42 -07:00
doxygen_footer.txt
dump_record.cpp return pictures as sk_sp 2016-03-18 07:25:55 -07:00
DumpRecord.cpp SkRecord: infer return type for visit() and mutate(). 2016-03-22 11:46:53 -07:00
DumpRecord.h
embed_resources.py Add option to embed font data into executable. 2015-03-30 12:53:48 -07:00
find_run_binary.py
fix_pythonpath.py
gcov_shim
gen_bench_expectations_from_codereview.py
generate_fir_coeff.py
generate_includes_cpp.py fix for the msvs gyp generator that produces nonposix path separators 2014-11-25 08:25:29 -08:00
generate_vk_interface.sh Add vulkan files into skia repo. This is an incomplete backend with only partial functionality at this time. 2016-02-22 09:56:40 -05:00
get_images_from_skps.cpp return pictures as sk_sp 2016-03-18 07:25:55 -07:00
git-skia-verify
git-sync-deps tools/git-sync-deps: fix error in git syntax for changing origin 2016-01-28 09:12:52 -08:00
gpuveto.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
imgblur.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
imgslice.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
install_dependencies.sh doc: add quickstart to linux and macos 2015-04-28 13:06:54 -07:00
iOSShell.cpp Make SkGraphics::Term a no-op, stop calling it. 2015-09-09 07:35:42 -07:00
iOSShell.h C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla} 2015-03-25 18:17:32 -07:00
jsondiff.py tools: Remove reference to svndiff. 2014-10-24 17:21:41 -02:00
llvm_coverage_build llvm_coverage_build: Use CC and CXX variables by default 2015-07-17 07:31:07 -07:00
llvm_coverage_run.py Split llvm_coverage_run into two scripts 2015-07-20 09:43:36 -07:00
llvm_coverage.sh Add scripts for running LLVM coverage 2015-07-06 07:43:58 -07:00
lsan.supp Suppress mystery leak. 2014-09-05 10:36:40 -07:00
merge_static_libs.py
milestone.py SkPDF: milestone in metadata, also SkMilestone.h 2016-03-29 09:09:29 -07:00
mirror-dev.sh Land Ben's 32-bit symlink script. 2015-02-03 10:43:28 -05:00
misc_utils.py
nanobench_flags.json Add exclusion for keymobi_shop_mobileweb_ebay_com.skp on N5 2016-04-06 08:35:15 -07:00
nanobench_flags.py Add exclusion for keymobi_shop_mobileweb_ebay_com.skp on N5 2016-04-06 08:35:15 -07:00
OverwriteLine.h
parse_llvm_coverage.py Walk through files in parse_llvm_coverage.py instead of using 'git ls-files' 2016-04-18 04:18:56 -07:00
pathops_sorter.htm More conic-specific tests revealed a few conic-specific bugs. Because javascript / canvas make visualizing conics tricky, new native tools are required. 2015-10-30 12:03:06 -07:00
pathops_visualizer.htm More conic-specific tests revealed a few conic-specific bugs. Because javascript / canvas make visualizing conics tricky, new native tools are required. 2015-10-30 12:03:06 -07:00
picture_utils.cpp Move DM png code to picture_utils, for use by other tools. 2016-04-19 09:18:11 -07:00
picture_utils.h Move DM png code to picture_utils, for use by other tools. 2016-04-19 09:18:11 -07:00
pinspect.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
ProcStats.cpp Looks like rssPages * pageSize is overflowing on 32-bit Linux... 2015-04-30 07:35:28 -07:00
ProcStats.h DM+nanobench: print both current and max RSS. 2015-04-30 07:11:22 -07:00
random_parse_path.cpp Add unit test to feed valid SVG sequences to make sure that 2016-02-09 10:30:22 -08:00
random_parse_path.h Add unit test to feed valid SVG sequences to make sure that 2016-02-09 10:30:22 -08:00
reformat-json.py
Resources.cpp update callsites for Make image factories 2016-03-17 10:51:11 -07:00
Resources.h update callsites for Make image factories 2016-03-17 10:51:11 -07:00
retrieve_from_googlesource.py
sanitize_source_files.py
sk_tool_utils_flags.h Add standard fonts to all GMs. 2014-07-31 08:58:44 -04:00
sk_tool_utils_font.cpp Remove SK_VERY_LEGACY_CREATE_TYPEFACE. 2016-04-13 05:23:35 -07:00
sk_tool_utils.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
sk_tool_utils.h Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
skdiff_html.cpp
skdiff_html.h
skdiff_image.cpp Remove uses of SkImageDecoder from skdiff 2016-03-17 07:17:54 -07:00
skdiff_main.cpp Create output directory in skdiff 2016-04-05 11:37:49 -07:00
skdiff_utils.cpp Remove uses of SkImageDecoder from skdiff 2016-03-17 07:17:54 -07:00
skdiff_utils.h Remove uses of SkImageDecoder from skdiff 2016-03-17 07:17:54 -07:00
skdiff.cpp
skdiff.h Move SkTDArray to private. 2016-02-18 08:53:33 -08:00
skhello.cpp switch surface to sk_sp 2016-03-23 18:59:25 -07:00
skpinfo.cpp Make skpinfo more human friendly 2016-04-19 09:29:01 -07:00
skpmaker.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
Stats.h Consolidate SK_CRASH and sk_throw into SK_ABORT 2016-01-29 08:51:04 -08:00
test_all.py skimage, die die die 2014-12-15 12:47:52 -08:00
test_font_data_chars.cpp Add standard fonts to all GMs. 2014-07-31 08:58:44 -04:00
test_font_data.cpp Style Change: NULL->nullptr 2015-08-27 07:41:16 -07:00
test_font_index.cpp Style Change: NULL->nullptr 2015-08-27 07:41:16 -07:00
test_font_monospace.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
test_font_sans_serif.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
test_font_serif.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
test_gpuveto.py
test_pdfs.py
ThermalManager.cpp enable ThermalManager on Android 2016-02-11 11:42:19 -08:00
ThermalManager.h Move SkTArray to include/private. 2016-02-17 13:13:44 -08:00
tsan.supp SkPDF: remove suppression 2015-10-02 12:15:55 -07:00
ubsan.supp Add tools/ubsan.supp. 2015-08-05 10:12:33 -04:00
UrlDataManager.cpp Create image cache for use by json canvas 2016-02-08 07:08:21 -08:00
UrlDataManager.h Create image cache for use by json canvas 2016-02-08 07:08:21 -08:00
valgrind.supp Suppress jpeg valgrind errors 2016-01-27 12:05:27 -08:00
whitelist_typefaces.cpp Suppress embedding fonts when the skp's fonts match the OS fonts. 2015-08-31 09:22:38 -07:00
win_dbghelp.cpp Style Change: NULL->nullptr 2015-08-27 07:41:16 -07:00
win_dbghelp.h
win_lcid.cpp Style Change: NULL->nullptr 2015-08-27 07:41:16 -07:00
xsan_build MSAN: build libc++ with MSAN, link to it. 2016-02-16 14:03:15 -08:00
xsan.blacklist Remove size check from SkCodec 2016-01-13 10:54:20 -08:00