The default bug view has changed. See this FAQ.

Split ImageLayers.h into several files

RESOLVED FIXED

Status

()

Core
Graphics: Layers
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: nical, Assigned: nical)

Tracking

(Blocks: 1 bug)

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

(Assignee)

Description

5 years ago
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.
(Assignee)

Comment 1

5 years ago
Created attachment 651810 [details] [diff] [review]
Splits ImageLayers.h into several headers

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)
(Assignee)

Comment 2

5 years ago
Created attachment 652455 [details] [diff] [review]
Splits ImageLayers.h into several headers

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+
(Assignee)

Updated

5 years ago
Blocks: 773440
(Assignee)

Comment 4

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/54f5895b567a
Whiteboard: [leave open]
Created attachment 653243 [details] [diff] [review]
Fix build

This patch broke my local clang builds (clang version 3.0). Attached patch fixes it :)
Attachment #653243 - Flags: review?(nsilva)
(Assignee)

Comment 6

5 years ago
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+
(Assignee)

Comment 7

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/d948973975b7
https://hg.mozilla.org/mozilla-central/rev/54f5895b567a
Fwiw this also affects gcc 4.2, att #653243 will fix it.
https://hg.mozilla.org/mozilla-central/rev/d948973975b7
(Assignee)

Updated

5 years ago
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Whiteboard: [leave open]
(Assignee)

Updated

5 years ago
Blocks: 785103
You need to log in before you can comment on or make changes to this bug.