Closed Bug 782372 Opened 10 years ago Closed 10 years ago

Split ImageLayers.h into several files

Categories

(Core :: Graphics: Layers, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: nical, Assigned: nical)

References

(Blocks 1 open bug)

Details

Attachments

(2 files, 1 obsolete file)

ImageLayers.h contains a lot of classes that are not all used in the same contexts. 
For example, ImageContainer is used in many places where We don't use layers.
We should separate it into several files to avoid bad dependencies.
ImageLayers.h is splitted into the following files:
 - ImageLayers.h: contains ImageLayer
 - ImageContainer.h: contains Image, ImageContainer, and other classes derived from Image or used with Image (PlanarYCbCrImage, ImageFactory...)
 - ImageTypes.h: contains enum Image::Format, now enum ImageFormat to remove dependency between ImageLayers.h and ImageContainer.h

ImageContainer.h could be further splitted into several headers, but it would most likely be more in order to avoid a big grab-bag header rather than to have better dependencies and faster build (most users of the classes in ImageContainer.h also use ImageContainer itself fo instance, whereas most users of these classes don't use layers).

This may not be the final patch, I need to push to try once more to make sure that this does not break the build on windows (try is closed right now).
Attachment #651810 - Flags: review?(bgirard)
This version is rebased from this morning and passes try
Attachment #651810 - Attachment is obsolete: true
Attachment #651810 - Flags: review?(bgirard)
Attachment #652455 - Flags: review?(bgirard)
Comment on attachment 652455 [details] [diff] [review]
Splits ImageLayers.h into several headers

Nice! Thanks Nicolas.
Attachment #652455 - Flags: review?(bgirard) → review+
Blocks: 773440
Attached patch Fix buildSplinter Review
This patch broke my local clang builds (clang version 3.0). Attached patch fixes it :)
Attachment #653243 - Flags: review?(nsilva)
Comment on attachment 653243 [details] [diff] [review]
Fix build

Review of attachment 653243 [details] [diff] [review]:
-----------------------------------------------------------------

Doh! I'll land your fix asap
Attachment #653243 - Flags: review?(nsilva) → review+
Fwiw this also affects gcc 4.2, att #653243 will fix it.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [leave open]
Blocks: includehell
You need to log in before you can comment on or make changes to this bug.