Closed Bug 555835 Opened 11 years ago Closed 11 years ago

Optimize Core Graphics drawing model for OOPP

Categories

(Core :: IPC, defect)

All
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: BenWa, Assigned: BenWa)

References

Details

Attachments

(1 file, 4 obsolete files)

Currently the whole plug-in area is refreshed (and ignored by the parent clip). We need to support refreshing only the target area for efficiency.
I'm also working on a patch that optimizes the shared image allocation to SetWindow (to manage resizing) instead of doing it per frame.

I'm also investigating the best way to resolve the color matching slowdown.
Summary: Supports Invalidate Rectangles for CoreGraphics for OOPP on OSX → Optimize CoreGraphics for OOPP on OSX
Attached patch CG OOP Color Optimization (obsolete) — Splinter Review
This patch changes the color space of the OOP CGContext to use the system' color profile. This prevent needless generic->system color matching. It also changes CGColorSpaceRef/CGContextRef allocation so that they are made only once instead of per frame.

These changes lead to a significant speed improvement.
Attached patch CG OOP Color Optimization (obsolete) — Splinter Review
Made an addition to handle resizing the plug-in window correctly.
Attachment #436407 - Attachment is obsolete: true
Attachment #436420 - Flags: review?(joshmoz)
Summary: Optimize CoreGraphics for OOPP on OSX → Optimize Core Graphics drawing model for OOPP
Assignee: nobody → bgirard
Hardware: x86 → All
Attached patch CG OOP Color Optimization (obsolete) — Splinter Review
Fixed bitrot.
Attachment #436420 - Attachment is obsolete: true
Attachment #436420 - Flags: review?(joshmoz)
Attachment #436477 - Flags: review?(joshmoz)
Attachment #436477 - Flags: review?(joshmoz) → review+
Comment on attachment 436477 [details] [diff] [review]
CG OOP Color Optimization

bsmedberg, josh wanted me to ask you for superreview. In particular we need to include code from layout/generic/nsPluginUtilsOSX.h so we wanted to check this change with you. Currently we not using much code from it yet but with the upcoming out of process Core Animation patch we will be using a significant amount of code from it.

--- a/dom/plugins/Makefile.in
+++ b/dom/plugins/Makefile.in
@@ -117,6 +117,7 @@
 LOCAL_INCLUDES = \
   -I$(topsrcdir)/modules/plugin/base/public/ \
   -I$(topsrcdir)/modules/plugin/base/src/ \
+  -I$(topsrcdir)/layout/generic/ \
   $(NULL)
 
 include $(topsrcdir)/config/config.mk
Attachment #436477 - Flags: superreview?(benjamin)
Would it make more sense to export that header, rather than spread LOCAL_INCLUDES around?
Sure. I was under the impression that it would be less desirable to do that since it would be exporting that header to the whole project.
Attached patch CG OOP Color Optimization (obsolete) — Splinter Review
Attachment #436477 - Attachment is obsolete: true
Attachment #436477 - Flags: superreview?(benjamin)
Fixed spaces to tabs in layout/generic/Makefile.in
Attachment #436510 - Attachment is obsolete: true
pushed to mozilla-central

http://hg.mozilla.org/mozilla-central/rev/114b74248238
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
I still need to honor NPCocoaEventDraw rect to get good performance.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Duplicate of this bug: 558481
I tried drawing only the subrect but I did not see any performance improvements.
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.