Closed
Bug 1118105
Opened 10 years ago
Closed 10 years ago
SurfaceCache should let you know if you tried to insert a duplicate surface
Categories
(Core :: Graphics: ImageLib, defect)
Core
Graphics: ImageLib
Tracking
()
RESOLVED
FIXED
mozilla37
People
(Reporter: seth, Assigned: seth)
References
Details
Attachments
(1 file, 1 obsolete file)
In bug 1079627, we need to be able to detect when we're inserting a duplicate surface in the SurfaceCache.
In this bug we'll make SurfaceCache::Insert return an enumeration instead of a bool, and change the implementation of Insert to inform us when we encounter this situation.
Assignee | ||
Comment 1•10 years ago
|
||
Here's the patch. It's pretty straightforward.
Attachment #8544333 -
Flags: review?(dholbert)
Comment 2•10 years ago
|
||
Comment on attachment 8544333 [details] [diff] [review]
Make SurfaceCache::Insert let you know if you try to insert a duplicate surface
Review of attachment 8544333 [details] [diff] [review]:
-----------------------------------------------------------------
r=me, with one nit
::: image/src/SurfaceCache.h
@@ +117,5 @@
> +MOZ_BEGIN_ENUM_CLASS(InsertOutcome, uint8_t)
> + SUCCESS, // Success (but see Insert documentation).
> + FAILURE, // Couldn't insert (e.g., for capacity reasons).
> + FAILURE_ALREADY_PRESENT // A surface with the same key is already present.
> +MOZ_END_ENUM_CLASS(Opacity)
s/Opacity/InsertOutcome/
Attachment #8544333 -
Flags: review?(dholbert) → review+
Assignee | ||
Comment 3•10 years ago
|
||
Thanks for the review! Here's an updated version that fixes the nit above.
Assignee | ||
Updated•10 years ago
|
Attachment #8544333 -
Attachment is obsolete: true
Assignee | ||
Comment 4•10 years ago
|
||
This got blocked for a bit on a patch earlier in my queue, but it should be ready to go now. Pushed:
https://hg.mozilla.org/integration/mozilla-inbound/rev/c5c63ad85aa6
Comment 5•10 years ago
|
||
sorry had to back this out in https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=b74c9afa3b4b since one of this changes caused test failures on windows like:
https://treeherder.mozilla.org/logviewer.html#?job_id=5263429&repo=mozilla-inbound
and
https://treeherder.mozilla.org/logviewer.html#?job_id=5263747&repo=mozilla-inbound
Flags: needinfo?(seth)
Assignee | ||
Comment 6•10 years ago
|
||
Flags: needinfo?(seth)
Comment 7•10 years ago
|
||
Assignee | ||
Comment 8•10 years ago
|
||
Looks green on this try job:
https://tbpl.mozilla.org/?tree=Try&rev=aae64e1b4638
Repushed:
https://hg.mozilla.org/integration/mozilla-inbound/rev/0fe67aa7e9ac
Comment 9•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
You need to log in
before you can comment on or make changes to this bug.
Description
•