Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1774)

Issue 19591003: Add purgeAsNeeded calls before addResource calls (Closed)

Created:
7 years, 5 months ago by robertphillips
Modified:
7 years, 5 months ago
Reviewers:
bsalomon
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

It looks like a caller can arbitrarily exceed the cache limit by just issuing a series of drawBitmapRect calls with a new uploaded texture each time. This change (with the new IODB flushing capability) allows the cache to at least remain close to its budget.

Patch Set 1 #

Patch Set 2 : added extraCount & extraSize to account for future memory requirements #

Unified diffs Side-by-side diffs Delta from patch set Stats (+25 lines, -9 lines) Patch
M src/gpu/GrContext.cpp View 1 3 chunks +7 lines, -1 line 0 comments Download
M src/gpu/GrResourceCache.h View 1 2 chunks +6 lines, -2 lines 0 comments Download
M src/gpu/GrResourceCache.cpp View 1 2 chunks +12 lines, -6 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
robertphillips
7 years, 5 months ago (2013-07-17 14:29:08 UTC) #1
robertphillips
7 years, 5 months ago (2013-07-17 17:51:04 UTC) #2
bsalomon
LGTM. Can you file a bug to precompute the resource size and purge the cache ...
7 years, 5 months ago (2013-07-17 17:55:59 UTC) #3
robertphillips
Created: Move resource cache purging before allocation (rather than before insertion) https://code.google.com/p/skia/issues/detail?id=1429
7 years, 5 months ago (2013-07-17 18:02:46 UTC) #4
robertphillips
7 years, 5 months ago (2013-07-18 17:13:21 UTC) #5
committed as r10145 & 10146

Powered by Google App Engine
This is Rietveld 408576698