Closed
Bug 1105834
Opened 11 years ago
Closed 11 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•11 years ago
|
Attachment #8529853 -
Attachment is patch: true
| Assignee | ||
Updated•11 years ago
|
Assignee: nobody → bgirard
| Assignee | ||
Comment 1•11 years ago
|
||
| Assignee | ||
Comment 2•11 years ago
|
||
Attachment #8530411 -
Flags: review?(mstange)
Attachment #8530411 -
Flags: review?(bas)
Comment 3•11 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•11 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•11 years ago
|
||
Attachment #8530424 -
Flags: review?(mstange)
| Assignee | ||
Comment 6•11 years ago
|
||
Forgot qref. Added:
// TODO We should combine the OnWhite/OnBlack here an just output a single image.
Comment 7•11 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•11 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•11 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•11 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•11 years ago
|
||
Attachment #8530424 -
Attachment is obsolete: true
Attachment #8530425 -
Attachment is obsolete: true
Attachment #8530443 -
Flags: review+
Comment 12•11 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•11 years ago
|
||
Attachment #8530442 -
Attachment is obsolete: true
Attachment #8530442 -
Flags: review?(bas)
Attachment #8530448 -
Flags: review?(bas)
| Assignee | ||
Comment 14•11 years ago
|
||
| Assignee | ||
Comment 15•11 years ago
|
||
You're right. This is -way- faster.
Attachment #8530486 -
Flags: review?(jmuizelaar)
Comment 16•11 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•11 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•11 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•11 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•11 years ago
|
||
Attachment #8530486 -
Attachment is obsolete: true
Attachment #8533276 -
Flags: review?(jmuizelaar)
| Assignee | ||
Comment 22•11 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•11 years ago
|
Attachment #8533277 -
Attachment description: patch → Part 3: Add lz4 support
| Assignee | ||
Comment 24•11 years ago
|
||
Updated•11 years ago
|
Attachment #8533277 -
Flags: review?(jmuizelaar) → review+
| Assignee | ||
Comment 25•11 years ago
|
||
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•11 years ago
|
||
Even though we all like backing out BenWa, this wasn't actually the cause of the non-unified bustage.
Comment 28•11 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•11 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•11 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: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
You need to log in
before you can comment on or make changes to this bug.
Description
•