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

Issue 24222004: Don't reuse scratch textures patch (Closed)

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

Description

This CL adds a mechanism to GrResource so that the cache can hold a ref-of-obligation on the resource that will be removed when the deferred ref count goes to zero. This fixes the problem of scratch textures sitting in the cache b.c. of lingering deferred refs.

Patch Set 1 #

Patch Set 2 : update #

Patch Set 3 : cleaned up #

Patch Set 4 : cleaned up #

Total comments: 2

Patch Set 5 : check nothing changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+64 lines, -18 lines) Patch
M include/gpu/GrResource.h View 1 2 3 chunks +32 lines, -4 lines 0 comments Download
M src/gpu/GrContext.cpp View 1 2 3 2 chunks +31 lines, -8 lines 0 comments Download
M src/gpu/GrResource.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests/ClipCacheTest.cpp View 1 2 2 chunks +0 lines, -5 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
robertphillips
7 years, 1 month ago (2013-10-28 15:50:45 UTC) #1
bsalomon
lgtm, I guess. I've lost the ability to really understand how the cache works. Adding ...
7 years, 1 month ago (2013-10-28 17:37:20 UTC) #2
mtklein
I think I follow. LGTM with one question. https://codereview.chromium.org/24222004/diff/63001/include/gpu/GrResource.h File include/gpu/GrResource.h (right): https://codereview.chromium.org/24222004/diff/63001/include/gpu/GrResource.h#newcode128 include/gpu/GrResource.h:128: kWrapped_FlagBit ...
7 years, 1 month ago (2013-10-28 18:40:07 UTC) #3
robertphillips
7 years, 1 month ago (2013-10-29 14:07:09 UTC) #4
Message was sent while issue was closed.
committed as r11997

https://codereview.chromium.org/24222004/diff/63001/include/gpu/GrResource.h
File include/gpu/GrResource.h (right):

https://codereview.chromium.org/24222004/diff/63001/include/gpu/GrResource.h#...
include/gpu/GrResource.h:128: kWrapped_FlagBit         = 0x1,
I don't feel strongly either way. It was originally a bit flag so I just
extended it.

Powered by Google App Engine
This is Rietveld 408576698