Closed
Bug 1105834
Opened 8 years ago
Closed 8 years ago
Add options to dump layers content with layers dump
Categories
(Core :: Graphics: Layers, defect)
Tracking
()
RESOLVED
FIXED
mozilla37
People
(Reporter: BenWa, Assigned: BenWa)
References
Details
Attachments
(4 files, 8 obsolete files)
271.40 KB,
image/png
|
Details | |
15.95 KB,
patch
|
bas.schouten
:
review+
|
Details | Diff | Splinter Review |
4.83 KB,
patch
|
jrmuizel
:
review+
|
Details | Diff | Splinter Review |
18.10 KB,
patch
|
Details | Diff | Splinter Review |
I want to separate layers.dump & layers.dump.texture into two separate options. It should allow us to just dump the layers tree for debug or also include the texture if there's correctness issues.
Assignee | ||
Updated•8 years ago
|
Attachment #8529853 -
Attachment is patch: true
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → bgirard
Assignee | ||
Comment 1•8 years ago
|
||
Assignee | ||
Comment 2•8 years ago
|
||
Attachment #8530411 -
Flags: review?(mstange)
Attachment #8530411 -
Flags: review?(bas)
Comment 3•8 years ago
|
||
Comment on attachment 8530411 [details] [diff] [review] Part 1: Add CreateDataSourceSurfaceByCloning to moz2d Review of attachment 8530411 [details] [diff] [review]: ----------------------------------------------------------------- DataSurfaceHelpers.h/.cpp looks like a good place to put CopyRect into.
Comment 4•8 years ago
|
||
Comment on attachment 8530411 [details] [diff] [review] Part 1: Add CreateDataSourceSurfaceByCloning to moz2d Review of attachment 8530411 [details] [diff] [review]: ----------------------------------------------------------------- Hrm, I'm not sure I feel we should expose this on the factory, separate functions in DataSurfaceHelpers.h as Markus has suggested seem like the way to go here.
Attachment #8530411 -
Flags: review?(bas) → review-
Assignee | ||
Comment 5•8 years ago
|
||
Attachment #8530424 -
Flags: review?(mstange)
Assignee | ||
Comment 6•8 years ago
|
||
Forgot qref. Added: // TODO We should combine the OnWhite/OnBlack here an just output a single image.
Comment 7•8 years ago
|
||
Comment on attachment 8530424 [details] [diff] [review] Part 2: Add layers.dump-texture feature Review of attachment 8530424 [details] [diff] [review]: ----------------------------------------------------------------- ::: gfx/layers/LayersLogging.cpp @@ +312,5 @@ > // we usually use std::stringstream to build up giant multi-line gobs > // of output. So to avoid the truncation we find the newlines and > // print the lines individually. > + std::string line; > + while (std::getline(aStr, line, '\n')) { '\n' is the default value of that argument, you can leave it out ::: gfx/layers/opengl/GrallocTextureHost.cpp @@ +383,5 @@ > return LayerRenderState(); > } > > TemporaryRef<gfx::DataSourceSurface> > GrallocTextureHostOGL::GetAsSurface() { Is GetAsSurface() only used for debugging and never in production? ::: gfx/thebes/gfxUtils.cpp @@ +1203,5 @@ > // Update the length of the vector without overwriting the new data. > imgData.growByUninitialized(numReadThisTime); > > imgSize += numReadThisTime; > + imgData.growByUninitialized(numReadThisTime); nope
Attachment #8530424 -
Flags: review?(mstange) → review+
Assignee | ||
Comment 8•8 years ago
|
||
(In reply to Markus Stange [:mstange] from comment #7) > ::: gfx/layers/opengl/GrallocTextureHost.cpp > @@ +383,5 @@ > > return LayerRenderState(); > > } > > > > TemporaryRef<gfx::DataSourceSurface> > > GrallocTextureHostOGL::GetAsSurface() { > > Is GetAsSurface() only used for debugging and never in production? > I might be for screenshoting and things like that.
Comment 9•8 years ago
|
||
(In reply to Benoit Girard (:BenWa) from comment #8) > (In reply to Markus Stange [:mstange] from comment #7) > > Is GetAsSurface() only used for debugging and never in production? > > > > I might be for screenshoting and things like that. As far as I know it is only used for debugging, and some TextureHost don't even implement it. But it
Assignee | ||
Comment 10•8 years ago
|
||
Attachment #8530411 -
Attachment is obsolete: true
Attachment #8530411 -
Flags: review?(mstange)
Attachment #8530442 -
Flags: review?(mstange)
Attachment #8530442 -
Flags: review?(bas)
Assignee | ||
Comment 11•8 years ago
|
||
Attachment #8530424 -
Attachment is obsolete: true
Attachment #8530425 -
Attachment is obsolete: true
Attachment #8530443 -
Flags: review+
Comment 12•8 years ago
|
||
Comment on attachment 8530442 [details] [diff] [review] Part 1: Add CreateDataSourceSurfaceByCloning to moz2d Review of attachment 8530442 [details] [diff] [review]: ----------------------------------------------------------------- ::: gfx/2d/Rect.h @@ +92,5 @@ > return IntRectTyped<UnknownUnits>(this->x, this->y, this->width, this->height); > } > + > + bool > + IntRectOverflows() const { Could just be called Overflows(), and doesn't need a line break after "bool"
Attachment #8530442 -
Flags: review?(mstange) → review+
Assignee | ||
Comment 13•8 years ago
|
||
Attachment #8530442 -
Attachment is obsolete: true
Attachment #8530442 -
Flags: review?(bas)
Attachment #8530448 -
Flags: review?(bas)
Assignee | ||
Comment 14•8 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=73036cca401c
Assignee | ||
Comment 15•8 years ago
|
||
You're right. This is -way- faster.
Attachment #8530486 -
Flags: review?(jmuizelaar)
Comment 16•8 years ago
|
||
Comment on attachment 8530448 [details] [diff] [review] Part 1: Add CreateDataSourceSurfaceByCloning to moz2d Review of attachment 8530448 [details] [diff] [review]: ----------------------------------------------------------------- I like it.
Attachment #8530448 -
Flags: review?(bas) → review+
Comment 17•8 years ago
|
||
Comment on attachment 8530486 [details] [diff] [review] Part 3: Add lz4 support Review of attachment 8530486 [details] [diff] [review]: ----------------------------------------------------------------- ::: gfx/thebes/gfxUtils.cpp @@ +1385,5 @@ > /* static */ nsCString > +gfxUtils::GetAsLZ4Base64Str(DataSourceSurface* aSourceSurface) > +{ > + int32_t datasize = aSourceSurface->GetSize().height * aSourceSurface->Stride(); > + auto compresseddata = MakeUnique<char[]>(LZ4::maxCompressedSize(datasize)); How come no camel case? @@ +1386,5 @@ > +gfxUtils::GetAsLZ4Base64Str(DataSourceSurface* aSourceSurface) > +{ > + int32_t datasize = aSourceSurface->GetSize().height * aSourceSurface->Stride(); > + auto compresseddata = MakeUnique<char[]>(LZ4::maxCompressedSize(datasize)); > + compresseddata.get()[0] = 0; What is this for?
Attachment #8530486 -
Flags: review?(jmuizelaar) → review-
![]() |
||
Comment 18•8 years ago
|
||
(In reply to Benoit Girard (:BenWa) from comment #10) > Part 1: Add CreateDataSourceSurfaceByCloning to moz2d Will gfxUtils::CopySurfaceToDataSourceSurfaceWithFormat do what you want?
Assignee | ||
Comment 20•8 years ago
|
||
(In reply to Jonathan Watt [:jwatt] from comment #18) > (In reply to Benoit Girard (:BenWa) from comment #10) > > Part 1: Add CreateDataSourceSurfaceByCloning to moz2d > > Will gfxUtils::CopySurfaceToDataSourceSurfaceWithFormat do what you want? * This function always creates a new surface. Do not call it if aSurface's * format is the same as aFormat. Such a non-conversion would just be an * unnecessary and wasteful copy (this function asserts to prevent that). I guess not? I'm not sure if the original function should really be asserting that but it clearly is meant for a very specific use case.
Assignee | ||
Comment 21•8 years ago
|
||
Attachment #8530486 -
Attachment is obsolete: true
Attachment #8533276 -
Flags: review?(jmuizelaar)
Assignee | ||
Comment 22•8 years ago
|
||
Attachment #8529853 -
Attachment is obsolete: true
Attachment #8533276 -
Attachment is obsolete: true
Attachment #8533276 -
Flags: review?(jmuizelaar)
Attachment #8533277 -
Flags: review?(jmuizelaar)
Assignee | ||
Updated•8 years ago
|
Attachment #8533277 -
Attachment description: patch → Part 3: Add lz4 support
Assignee | ||
Comment 24•8 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=211042a82d33
Updated•8 years ago
|
Attachment #8533277 -
Flags: review?(jmuizelaar) → review+
Assignee | ||
Comment 25•8 years ago
|
||
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/6aad17f431d1 remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/c3e505887e9f remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/33592fd41f1f
Backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/f2bd10f0159c for nonunified bustage: https://treeherder.mozilla.org/ui/logviewer.html#?job_id=4444262&repo=mozilla-inbound
Flags: needinfo?(bgirard)
Comment 27•8 years ago
|
||
Even though we all like backing out BenWa, this wasn't actually the cause of the non-unified bustage.
Comment 28•8 years ago
|
||
Oh, *cute*! This *was* the cause of the b2g non-unified bustage, while we had separate Android non-unified bustage which landed in the same interval.
Assignee | ||
Comment 29•8 years ago
|
||
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/f0226c3be051 remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/47ba9f1d4762 remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/7aca65122115
Flags: needinfo?(bgirard)
B2G-non-unified is still broken with the same error. Backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/7d799447add8
Flags: needinfo?(bgirard)
Assignee | ||
Comment 31•8 years ago
|
||
Args, the second instance of Factory was missing the gfx:: prefix. remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/95bb1d9c1fe2 remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/c73f386da429 remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/fe7d53430f42
Flags: needinfo?(bgirard)
https://hg.mozilla.org/mozilla-central/rev/95bb1d9c1fe2 https://hg.mozilla.org/mozilla-central/rev/c73f386da429 https://hg.mozilla.org/mozilla-central/rev/fe7d53430f42
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
You need to log in
before you can comment on or make changes to this bug.
Description
•