Restructure flushing relationship between GrContext, GrDrawingManager, and GrResource...
authorbsalomon <bsalomon@google.com>
Wed, 7 Sep 2016 17:02:04 +0000 (10:02 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 7 Sep 2016 17:02:04 +0000 (10:02 -0700)
commitb77a907c2fb4402b7e70e9fff70eb71482354e67
tree692acfaad6a575969ceb547d617aa6bfcbc7a4d8
parent5edf2908a305d3365a1574a8358343bb26468b35
Restructure flushing relationship between GrContext, GrDrawingManager, and GrResourceCache.

Consolidates all flush actions into GrDrawingManager and makes GrContext::flush a passthrough.

Removes the unused and untested discard flush variation.

Replaces the indirect overbudget callback mechanism of GrResourceCache with a flag set by resource cache when it wants to flush that is checked after each draw by GrDrawContext.

Modifies GrResourceCache::notifyFlushOccurred() to take a param indicating whether it triggered the
flush that just occurred.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2307053002

Committed: https://skia.googlesource.com/skia/+/1dbb207babecdae8f1f74ed9d9900c73064df744
Review-Url: https://codereview.chromium.org/2307053002
include/gpu/GrContext.h
src/gpu/GrContext.cpp
src/gpu/GrDrawContext.cpp
src/gpu/GrDrawingManager.cpp
src/gpu/GrDrawingManager.h
src/gpu/GrResourceCache.cpp
src/gpu/GrResourceCache.h
src/gpu/SkGpuDevice.cpp
tests/ResourceCacheTest.cpp