aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Jim Van Verth <jvanverth@google.com>2017-10-03 10:04:49 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-03 15:08:34 +0000
commit63272cfc19c73a19840bad9d66af5dbda737a859 (patch)
treea46d56ff7d5052a8d6e5088cc2293d6df3fccbc3
parentab7c56c95870ddbd3289443bda32a051f45829f6 (diff)
Potential fix for Android regression
Bug: skia: Change-Id: I1130084fd526f3cc0d39bfa5293d79ce408691b2 Reviewed-on: https://skia-review.googlesource.com/54361 Reviewed-by: Stan Iliev <stani@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
-rw-r--r--src/gpu/GrDrawOpAtlas.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gpu/GrDrawOpAtlas.cpp b/src/gpu/GrDrawOpAtlas.cpp
index 0d195635b9..5e91199a22 100644
--- a/src/gpu/GrDrawOpAtlas.cpp
+++ b/src/gpu/GrDrawOpAtlas.cpp
@@ -240,12 +240,17 @@ bool GrDrawOpAtlas::addToAtlas(AtlasID* id, GrDrawOp::Target* target, int width,
// flushed to the gpu if we're at max page allocation, or if the plot has aged out otherwise.
// We wait until we've grown to the full number of pages to begin evicting already flushed
// plots so that we can maximize the opportunity for reuse.
+ // Exception: On Android framework we simply check to see if the plot has been flushed.
// As before we prioritize this upload to the first pages, not the most recently used.
for (unsigned int pageIdx = 0; pageIdx < fNumPages; ++pageIdx) {
Plot* plot = fPages[pageIdx].fPlotList.tail();
SkASSERT(plot);
+#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
+ if (target->hasDrawBeenFlushed(plot->lastUseToken())) {
+#else
if ((fNumPages == kMaxPages && target->hasDrawBeenFlushed(plot->lastUseToken())) ||
plot->flushesSinceLastUsed() >= kRecentlyUsedCount) {
+#endif
this->processEvictionAndResetRects(plot);
SkASSERT(GrBytesPerPixel(fProxies[pageIdx]->config()) == plot->bpp());
SkDEBUGCODE(bool verify = )plot->addSubImage(width, height, image, loc);