Closed
Bug 960254
Opened 11 years ago
Closed 11 years ago
Add ability to properly manage write access for DataSourceSurfaces
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
mozilla29
People
(Reporter: bas.schouten, Assigned: bas.schouten)
Details
(Whiteboard: [qa-])
Attachments
(4 files)
2.48 KB,
patch
|
jrmuizel
:
review+
|
Details | Diff | Splinter Review |
5.92 KB,
patch
|
jrmuizel
:
review+
|
Details | Diff | Splinter Review |
1.63 KB,
patch
|
jrmuizel
:
review+
|
Details | Diff | Splinter Review |
7.25 KB,
patch
|
jrmuizel
:
review+
|
Details | Diff | Splinter Review |
Right now we have a GetData() caller on DataSourceSurfaces. This is not really what we want, in some cases you can write, in other cases you can't. An explicit Map/Unmap pair is much more like what we want.
Assignee | ||
Comment 1•11 years ago
|
||
Attachment #8360653 -
Flags: review?(jmuizelaar)
Assignee | ||
Comment 2•11 years ago
|
||
Attachment #8360656 -
Flags: review?(jmuizelaar)
Assignee | ||
Comment 3•11 years ago
|
||
Attachment #8360665 -
Flags: review?(jmuizelaar)
Assignee | ||
Comment 4•11 years ago
|
||
Attachment #8360666 -
Flags: review?(jmuizelaar)
Comment 5•11 years ago
|
||
Comment on attachment 8360653 [details] [diff] [review]
Part 1: Add Map/Unmap API to DataSourceSurface
Review of attachment 8360653 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/2d/2D.h
@@ +361,5 @@
> * Can return null if there was OOM allocating surface data.
> */
> virtual uint8_t *GetData() = 0;
>
> + /* [DEPTRECATED]
spelling is wrong.
Attachment #8360653 -
Flags: review?(jmuizelaar) → review+
Updated•11 years ago
|
Attachment #8360656 -
Flags: review?(jmuizelaar) → review+
Updated•11 years ago
|
Attachment #8360665 -
Flags: review?(jmuizelaar) → review+
Updated•11 years ago
|
Attachment #8360666 -
Flags: review?(jmuizelaar) → review+
Comment 6•11 years ago
|
||
Thanks. I really disliked MarkDirty() but I didn't have the right fix for it.
Assignee | ||
Comment 7•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/c1f6fbc397bd
https://hg.mozilla.org/integration/mozilla-inbound/rev/fd9b6b044a5a
https://hg.mozilla.org/integration/mozilla-inbound/rev/9f499e5f7954
https://hg.mozilla.org/integration/mozilla-inbound/rev/4aecc5ca2a19
https://hg.mozilla.org/integration/mozilla-inbound/rev/4441c32c724c
Assignee | ||
Comment 8•11 years ago
|
||
Backed out for wrong bug number:
https://hg.mozilla.org/integration/mozilla-inbound/rev/2628e64cf375
Relanded:
https://hg.mozilla.org/integration/mozilla-inbound/rev/b61f6abbd13d
https://hg.mozilla.org/integration/mozilla-inbound/rev/3ae8e5f144f1
https://hg.mozilla.org/integration/mozilla-inbound/rev/bbad01205856
https://hg.mozilla.org/integration/mozilla-inbound/rev/327d381e24c8
Comment 9•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/b61f6abbd13d
https://hg.mozilla.org/mozilla-central/rev/3ae8e5f144f1
https://hg.mozilla.org/mozilla-central/rev/bbad01205856
https://hg.mozilla.org/mozilla-central/rev/327d381e24c8
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
Shouldn't there be an RAII helper object for this?
Are we going to convert all users of Data/Stride to this?
Assignee | ||
Comment 11•11 years ago
|
||
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) (away January 20-24) from comment #10)
> Shouldn't there be an RAII helper object for this?
>
> Are we going to convert all users of Data/Stride to this?
Eventually I'd like to, yes. Also I have no objection to an RAII helper. Although personally I often to prefer explicit locking/unlocking because it makes us explicitly think about where we do the lock when we for example start adding a lot of branches that exit a function. On the other hand I've been guilty of forgetting to add an unlock in one of these branches regardless so I also see the value in using RAII helpers :). In this case all the locks/unlocks could occur close together so I didn't feel there was a lot of value in having a helper here.
Updated•11 years ago
|
Whiteboard: [qa-]
![]() |
||
Comment 12•11 years ago
|
||
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #10)
> Shouldn't there be an RAII helper object for this?
I think there should be. Bug 979853 comment 6 notes that we're already screwing up the Unmap() calls, and calling DataSourceSurfaceD2D::Unmap() seems guaranteed to crash debug builds. Probably best to discuss this in bug 980233 though.
You need to log in
before you can comment on or make changes to this bug.
Description
•