Closed
Bug 929513
Opened 11 years ago
Closed 11 years ago
Use gfxSize less in layers
Categories
(Core :: Graphics: Layers, defect)
Core
Graphics: Layers
Tracking
()
RESOLVED
FIXED
mozilla29
People
(Reporter: dzbarsky, Assigned: torarvid)
References
(Blocks 1 open bug)
Details
(Whiteboard: [qa-])
Attachments
(18 files, 14 obsolete files)
No description provided.
Reporter | ||
Comment 1•11 years ago
|
||
Assignee: nobody → dzbarsky
Status: NEW → ASSIGNED
Attachment #820375 -
Flags: review?(nical.bugzilla)
Updated•11 years ago
|
Attachment #820375 -
Flags: review?(nical.bugzilla) → review+
Reporter | ||
Updated•11 years ago
|
Summary: Use gfx::Size more in layers → Use gfxSize less in layers
Reporter | ||
Comment 2•11 years ago
|
||
Attachment #820879 -
Flags: review?(nical.bugzilla)
Reporter | ||
Comment 3•11 years ago
|
||
Attachment #820941 -
Flags: review?(nical.bugzilla)
Reporter | ||
Comment 4•11 years ago
|
||
Attachment #820944 -
Flags: review?(nical.bugzilla)
Reporter | ||
Comment 5•11 years ago
|
||
Attachment #820949 -
Flags: review?(nical.bugzilla)
Updated•11 years ago
|
Attachment #820879 -
Flags: review?(nical.bugzilla) → review+
Updated•11 years ago
|
Attachment #820941 -
Flags: review?(nical.bugzilla) → review+
Updated•11 years ago
|
Attachment #820944 -
Flags: review?(nical.bugzilla) → review+
Updated•11 years ago
|
Attachment #820949 -
Flags: review?(nical.bugzilla) → review+
Reporter | ||
Comment 6•11 years ago
|
||
Attachment #820972 -
Flags: review?(nical.bugzilla)
Reporter | ||
Comment 7•11 years ago
|
||
Attachment #820973 -
Flags: review?(nical.bugzilla)
Reporter | ||
Comment 8•11 years ago
|
||
Attachment #820979 -
Flags: review?(nical.bugzilla)
Reporter | ||
Comment 9•11 years ago
|
||
Attachment #820980 -
Flags: review?(nical.bugzilla)
Reporter | ||
Updated•11 years ago
|
Attachment #820980 -
Attachment is obsolete: true
Attachment #820980 -
Flags: review?(nical.bugzilla)
Updated•11 years ago
|
Attachment #820972 -
Flags: review?(nical.bugzilla) → review+
Updated•11 years ago
|
Attachment #820973 -
Flags: review?(nical.bugzilla) → review+
Updated•11 years ago
|
Attachment #820979 -
Flags: review?(nical.bugzilla) → review+
Reporter | ||
Comment 10•11 years ago
|
||
Attachment #821657 -
Flags: review?(nical.bugzilla)
Reporter | ||
Comment 11•11 years ago
|
||
Attachment #821658 -
Flags: review?(nical.bugzilla)
Reporter | ||
Comment 12•11 years ago
|
||
Attachment #821660 -
Flags: review?(nical.bugzilla)
Reporter | ||
Comment 13•11 years ago
|
||
Attachment #821661 -
Flags: review?(nical.bugzilla)
Updated•11 years ago
|
Attachment #821657 -
Flags: review?(nical.bugzilla) → review+
Updated•11 years ago
|
Attachment #821658 -
Flags: review?(nical.bugzilla) → review+
Updated•11 years ago
|
Attachment #821660 -
Flags: review?(nical.bugzilla) → review+
Updated•11 years ago
|
Attachment #821661 -
Flags: review?(nical.bugzilla) → review+
Reporter | ||
Comment 14•11 years ago
|
||
Last one seems to be failing try. Pushed the others
https://hg.mozilla.org/integration/mozilla-inbound/rev/9b86b4e60b29
https://hg.mozilla.org/integration/mozilla-inbound/rev/6efcb3826227
https://hg.mozilla.org/integration/mozilla-inbound/rev/02bc8f1178a6
https://hg.mozilla.org/integration/mozilla-inbound/rev/0fbcde0e9bbd
https://hg.mozilla.org/integration/mozilla-inbound/rev/51130b50a7df
https://hg.mozilla.org/integration/mozilla-inbound/rev/381baaf48bd2
https://hg.mozilla.org/integration/mozilla-inbound/rev/0f15e95da259
https://hg.mozilla.org/integration/mozilla-inbound/rev/491ba58e1d90
https://hg.mozilla.org/integration/mozilla-inbound/rev/4b587a48c792
https://hg.mozilla.org/integration/mozilla-inbound/rev/35a4cfc41965
https://hg.mozilla.org/integration/mozilla-inbound/rev/f872d288480b
Whiteboard: [leave open]
Comment 15•11 years ago
|
||
Backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/a2eecdb6d6b0 for failing to build on Windows.
Comment 16•11 years ago
|
||
Comment on attachment 820879 [details] [diff] [review]
More conversions, using LayerSize
Review of attachment 820879 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/layers/composite/CompositableHost.h
@@ +41,5 @@
> {
> nsIntRegion mVisibleRegion;
> nsIntRegion mValidRegion;
> gfxRect mDisplayPort;
> + LayerSize mEffectiveResolution;
This is not really a size. gfxSize was being abused before to store a two-axis resolution, but you shouldn't abuse LayerSize the same way, because LayerSize implies (and enforces at compile-time) that it is actually a size in Layer pixels, which this is not.
Attachment #820879 -
Flags: feedback-
Comment 17•11 years ago
|
||
A glance through some of the other patches also shows that LayerSize and LayerIntSize are being used for things that are not actually sizes in Layer pixels. Please don't do this.
Assignee | ||
Comment 18•11 years ago
|
||
Hi. Is anyone still working on this? Otherwise, would this be a good First Bug for me to work on?
From the existing patches and reviews, it seems that they are mostly OK - except for these LayerSize/LayerIntSize things that should be changed in certain areas. In addition, it seems that there is an issue with building for Windows. (Where can I see the details of the Windows build failures?)
Am I correct in assuming that these two things are the remaining TODOs for this bug?
Comment 20•11 years ago
|
||
Tor, in the mean time you can look at http://www.joshmatthews.net/bugsahoy/?gfx=1&layout=1&cpp=1
which shows shows a list of mentored bugs and see if there's something you would like to work on
Comment 21•11 years ago
|
||
I will speak for dzbarsky here and he is happy to give this bug to Tor :)
Reporter | ||
Comment 22•11 years ago
|
||
I won't have time to finish this up for a while. Tor, feel free to take this :)
Assignee: dzbarsky → nobody
Flags: needinfo?(dzbarsky)
Assignee | ||
Comment 23•11 years ago
|
||
Ok, thanks guys. I'm mostly offline until monday. Will look at it then. (I'm part of the Telenor team looking to help Firefox/ffos, btw)
Assignee | ||
Comment 24•11 years ago
|
||
Assignee | ||
Comment 25•11 years ago
|
||
Assignee | ||
Comment 26•11 years ago
|
||
The purpose of this patch is to replace usages of gfxIntSize with
gfx::IntSize in BasicCompositor.
The new class YUVUtils has two methods ported from gfxUtils in thebes.
BasicCompositor now uses these methods instead of the ones in gfxUtils.
Also changed gfxIntSize to gfx::IntSize and gfxImageFormat to
gfx::SurfaceFormat.
Assignee | ||
Comment 27•11 years ago
|
||
Assignee | ||
Comment 28•11 years ago
|
||
I have now attached 4 patches. There is more work to be done, but these patches are self-contained. Since this is my first mozilla contribution, I thought that it would be nice to get some reviews before I had 10++ patches ready.
Updated•11 years ago
|
Attachment #8343707 -
Flags: review+
Updated•11 years ago
|
Attachment #8343708 -
Flags: review+
Comment 29•11 years ago
|
||
Comment on attachment 8343710 [details] [diff] [review]
Add YUVUtils class and change gfxIntSize in BasicCompositor
Review of attachment 8343710 [details] [diff] [review]:
-----------------------------------------------------------------
I think YUVUtils should not be in the layers/ directory, gfx/ycbcr is a better place.
Also let's call the file YCbCrUtils instead (we have a history of inconsistently mixing "YUV" and "YCbCr" but we should use the term "YCbCr")
::: gfx/layers/YUVUtils.h
@@ +14,5 @@
> +namespace gfx {
> +
> +class YUVUtils {
> +public:
> + static void GetYCbCrToRGBDestFormatAndSize(const layers::PlanarYCbCrData& aData,
Please use plain functions instead of static methods if there will be no instance and the class has no state.
I know that gfxUtils is doing that too but I'd rather not add more of this pattern.
Attachment #8343710 -
Flags: review-
Comment 30•11 years ago
|
||
Comment on attachment 8343711 [details] [diff] [review]
Replace some instances of gfxIntSize with gfx::IntSize
Review of attachment 8343711 [details] [diff] [review]:
-----------------------------------------------------------------
Please go through the places where you included 2D.h and include mozilla/gfx/Points.h instead when you just need gfx::IntSize
The rest looks good.
Attachment #8343711 -
Flags: review-
Comment 31•11 years ago
|
||
(In reply to Tor Arvid Lund [:torarvid] from comment #28)
> I have now attached 4 patches. There is more work to be done, but these
> patches are self-contained. Since this is my first mozilla contribution, I
> thought that it would be nice to get some reviews before I had 10++ patches
> ready.
You should ask people for review specifically using the r? field when uploading the patches. Otherwise the risk is that people will not notice that there are patches ready for review (or some may notice it, but are busy enough to wait for someone else to do it and then everybody forgets).
Once the r? flag is set to someone it's harder to miss it because it shows up in the person's bugzilla dashboard.
If you don't know who to ask for review you can look at the names that show up a lot in the hg blame around the code that you are modifying.
Assignee | ||
Comment 32•11 years ago
|
||
The purpose of this patch is to replace usages of gfxIntSize with
gfx::IntSize in BasicCompositor.
The new class YCbCrUtils has two methods ported from gfxUtils in thebes.
BasicCompositor now uses these methods instead of the ones in gfxUtils.
Also changed gfxIntSize to gfx::IntSize and gfxImageFormat to
gfx::SurfaceFormat.
Attachment #8343710 -
Attachment is obsolete: true
Attachment #8344538 -
Flags: review?(nical.bugzilla)
Assignee | ||
Comment 33•11 years ago
|
||
Attachment #8343711 -
Attachment is obsolete: true
Attachment #8344539 -
Flags: review?(nical.bugzilla)
Assignee | ||
Comment 34•11 years ago
|
||
This rippled into other replacements in layers and in gfx/gl.
Attachment #8344540 -
Flags: review?(nical.bugzilla)
Comment 35•11 years ago
|
||
Comment on attachment 8344538 [details] [diff] [review]
Add YCbCrUtils class and change gfxIntSize in BasicCompositor
Review of attachment 8344538 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/ycbcr/YCbCrUtils.h
@@ +6,5 @@
> +#ifndef MOZILLA_GFX_UTILS_H_
> +#define MOZILLA_GFX_UTILS_H_
> +
> +#include "mozilla/gfx/Types.h"
> +#include "ImageContainer.h"
nit: Please use forward declarations in header files whenever possible. If you don't mind, I'll fix it locally just before pushing to try and landing so that we don't need another review cycle for a very small change like this.
Attachment #8344538 -
Flags: review?(nical.bugzilla) → review+
Updated•11 years ago
|
Attachment #8344539 -
Flags: review?(nical.bugzilla) → review+
Updated•11 years ago
|
Attachment #8344540 -
Flags: review?(nical.bugzilla) → review+
Assignee | ||
Comment 36•11 years ago
|
||
(In reply to Nicolas Silva [:nical] from comment #35)
> nit: Please use forward declarations in header files whenever possible. If
> you don't mind, I'll fix it locally just before pushing to try and landing
> so that we don't need another review cycle for a very small change like this.
Sure, feel free! I'll try and remember that next time :)
Comment 37•11 years ago
|
||
try push (last 5 patches) https://tbpl.mozilla.org/?tree=Try&rev=d07f4f34d197
Assignee | ||
Comment 38•11 years ago
|
||
Ok, I see from the try server that I have compile errors on Windows and B2G. Easy to fix, but I'll need to setup some other environments to reproduce it. Will fix tomorrow.
Assignee | ||
Comment 39•11 years ago
|
||
Attachment #8343707 -
Attachment is obsolete: true
Assignee | ||
Comment 40•11 years ago
|
||
Attachment #8343708 -
Attachment is obsolete: true
Attachment #8345772 -
Flags: review?(nical.bugzilla)
Assignee | ||
Comment 41•11 years ago
|
||
The purpose of this patch is to replace usages of gfxIntSize with
gfx::IntSize in BasicCompositor.
The new class YCbCrUtils has two methods ported from gfxUtils in thebes.
BasicCompositor now uses these methods instead of the ones in gfxUtils.
Also changed gfxIntSize to gfx::IntSize and gfxImageFormat to
gfx::SurfaceFormat.
Attachment #8344538 -
Attachment is obsolete: true
Attachment #8345773 -
Flags: review?(nical.bugzilla)
Assignee | ||
Comment 42•11 years ago
|
||
Attachment #8344539 -
Attachment is obsolete: true
Attachment #8345774 -
Flags: review?(nical.bugzilla)
Assignee | ||
Comment 43•11 years ago
|
||
This rippled into other replacements in layers and in gfx/gl.
Attachment #8344540 -
Attachment is obsolete: true
Attachment #8345775 -
Flags: review?(nical.bugzilla)
Assignee | ||
Updated•11 years ago
|
Attachment #8345771 -
Flags: review?(nical.bugzilla)
Assignee | ||
Comment 44•11 years ago
|
||
I rebased yesterday, and have attached new patches ready for another go at the try server
Updated•11 years ago
|
Attachment #8345771 -
Flags: review?(nical.bugzilla) → review+
Updated•11 years ago
|
Attachment #8345772 -
Flags: review?(nical.bugzilla) → review+
Updated•11 years ago
|
Attachment #8345773 -
Flags: review?(nical.bugzilla) → review+
Updated•11 years ago
|
Attachment #8345774 -
Flags: review?(nical.bugzilla) → review+
Updated•11 years ago
|
Attachment #8345775 -
Flags: review?(nical.bugzilla) → review+
Comment 45•11 years ago
|
||
Assignee | ||
Comment 46•11 years ago
|
||
Forgot an include in the ImageLayerD3D9.cpp file (though I am unable to
reproduce the issue on my own windows installation).
Also seems in my previous attempt to fix the build, I introduced a
breakage for Android. Hopefully this will fix things.
Assignee | ||
Updated•11 years ago
|
Attachment #8346501 -
Flags: review?(nical.bugzilla)
Assignee | ||
Comment 47•11 years ago
|
||
Btw, :kevsim has already pushed this patch to the try server for me: https://tbpl.mozilla.org/?tree=Try&rev=f69517501a38
Updated•11 years ago
|
Attachment #8346501 -
Flags: review?(nical.bugzilla) → review+
Comment 48•11 years ago
|
||
(In reply to Tor Arvid Lund [:torarvid] from comment #46)
> Forgot an include in the ImageLayerD3D9.cpp file (though I am unable to
> reproduce the issue on my own windows installation).
Now that we use unified builds, the build system concatenate batches .cpp files before building them, which means that sometimes we forget an include but it doesn't break. Then as the list of concatenated files is not set in stone, the missing #include error can appear with a different build configuration or after someone added/removed .cpp files.
Assignee | ||
Comment 49•11 years ago
|
||
(In reply to Nicolas Silva [:nical] from comment #48)
> Now that we use unified builds, the build system concatenate batches .cpp
> files before building them, which means that sometimes we forget an include
> but it doesn't break. Then as the list of concatenated files is not set in
> stone, the missing #include error can appear with a different build
> configuration or after someone added/removed .cpp files.
Riiiight :)
I have noticed that before. At that point, I set --disable-unified-compilation on my Mac - but I never did on Windows... That's probably the reason, then. Thanks.
This bug is a bit hard to test thoroughly on my local machine, so sorry for the many iterations.. It's easy to see that "when i touch <whatever>D3D9 files, I need to do a windows build", but not always easy to see when I change something that will only be compiled for android/linux/B2G... (And then I might make mistakes that I don't detect until on the try server).
Well, finger crossed that I'll get better with time :)
Comment 50•11 years ago
|
||
(In reply to Tor Arvid Lund [:torarvid] from comment #49)
> This bug is a bit hard to test thoroughly on my local machine, so sorry for
> the many iterations.. It's easy to see that "when i touch <whatever>D3D9
> files, I need to do a windows build", but not always easy to see when I
> change something that will only be compiled for android/linux/B2G... (And
> then I might make mistakes that I don't detect until on the try server).
Don't worry, that's why we have we have try servers. There isn't much you can do to facilitate this kind of task except turning your own desk into a build farm :)
Updated•11 years ago
|
Assignee: nobody → torarvid
Assignee | ||
Comment 51•11 years ago
|
||
Attachment #8345771 -
Attachment is obsolete: true
Attachment #8347118 -
Flags: review?(nical.bugzilla)
Assignee | ||
Comment 52•11 years ago
|
||
Attachment #8345772 -
Attachment is obsolete: true
Attachment #8347119 -
Flags: review?(nical.bugzilla)
Assignee | ||
Comment 53•11 years ago
|
||
The purpose of this patch is to replace usages of gfxIntSize with
gfx::IntSize in BasicCompositor.
The new class YCbCrUtils has two methods ported from gfxUtils in thebes.
BasicCompositor now uses these methods instead of the ones in gfxUtils.
Also changed gfxIntSize to gfx::IntSize and gfxImageFormat to
gfx::SurfaceFormat.
Attachment #8345773 -
Attachment is obsolete: true
Attachment #8347120 -
Flags: review?(nical.bugzilla)
Assignee | ||
Comment 54•11 years ago
|
||
Attachment #8345774 -
Attachment is obsolete: true
Attachment #8347121 -
Flags: review?(nical.bugzilla)
Assignee | ||
Comment 55•11 years ago
|
||
This rippled into other replacements in layers and in gfx/gl.
Attachment #8345775 -
Attachment is obsolete: true
Attachment #8347122 -
Flags: review?(nical.bugzilla)
Assignee | ||
Comment 56•11 years ago
|
||
Forgot an include in the ImageLayerD3D9.cpp file (though I am unable to
reproduce the issue on my own windows installation).
Also seems in my previous attempt to fix the build, I introduced a
breakage for Android. Hopefully this will fix things.
Attachment #8346501 -
Attachment is obsolete: true
Attachment #8347123 -
Flags: review?(nical.bugzilla)
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 57•11 years ago
|
||
nical: No changes in last patch set other than added "r=nical" to the commit msgs
Comment 58•11 years ago
|
||
Comment 59•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/8ef7a2f35d7b
https://hg.mozilla.org/integration/mozilla-inbound/rev/526236089c17
https://hg.mozilla.org/integration/mozilla-inbound/rev/a4ec1ee06e9d
https://hg.mozilla.org/integration/mozilla-inbound/rev/c4cb33486816
https://hg.mozilla.org/integration/mozilla-inbound/rev/ad2dde0902fd
https://hg.mozilla.org/integration/mozilla-inbound/rev/a39d288480a8
Updated•11 years ago
|
Attachment #8347118 -
Flags: review?(nical.bugzilla) → review+
Updated•11 years ago
|
Attachment #8347119 -
Flags: review?(nical.bugzilla) → review+
Updated•11 years ago
|
Attachment #8347120 -
Flags: review?(nical.bugzilla) → review+
Updated•11 years ago
|
Attachment #8347121 -
Flags: review?(nical.bugzilla) → review+
Updated•11 years ago
|
Attachment #8347122 -
Flags: review?(nical.bugzilla) → review+
Updated•11 years ago
|
Attachment #8347123 -
Flags: review?(nical.bugzilla) → review+
Comment 60•11 years ago
|
||
This bug is becoming a bit hard to follow so let's open new bugs for future patches.
Keywords: checkin-needed
Whiteboard: [leave open]
Comment 61•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/8ef7a2f35d7b
https://hg.mozilla.org/mozilla-central/rev/526236089c17
https://hg.mozilla.org/mozilla-central/rev/a4ec1ee06e9d
https://hg.mozilla.org/mozilla-central/rev/c4cb33486816
https://hg.mozilla.org/mozilla-central/rev/ad2dde0902fd
https://hg.mozilla.org/mozilla-central/rev/a39d288480a8
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
Comment 62•11 years ago
|
||
FYI - Either this bug or bug 893304 has just caused a large array of gfx layers crashes in bug 950589 that are blocking multiple smoketests.
Assignee | ||
Comment 63•11 years ago
|
||
As I've seen from the comments on 950589, Morris confirmed that 893304 was the cause of the crashes. Please comment again if I should investigate on my end.
Updated•11 years ago
|
Whiteboard: [qa-]
You need to log in
before you can comment on or make changes to this bug.
Description
•