BasicLayers Paint ignore NULL Clip when render with groupTarget

RESOLVED FIXED in mozilla15

Status

()

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

People

(Reporter: romaxa, Assigned: romaxa)

Tracking

({perf})

unspecified
mozilla15
x86
Linux
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 4 obsolete attachments)

(Assignee)

Description

5 years ago
Created attachment 625955 [details] [diff] [review]
:bas

in bug 725925 I tried to avoid rendering into 1x1 surface by setting clip(0,0,0,0) to target context, and that trick does not work when we render with group target !2d case.
http://mxr.mozilla.org/mozilla-central/source/gfx/layers/basic/BasicLayers.cpp#1986
groupTarget surface created even if we don't need to render anything... that is also breaking NO_COMPOSITE rendering for bug 539356.

mattwoodrow suggested to not create group target if clip is empty.
Attachment #625955 - Flags: review?(bas.schouten)
(Assignee)

Updated

5 years ago
Blocks: 725925
Comment on attachment 625955 [details] [diff] [review]
:bas

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

::: gfx/layers/basic/BasicLayers.cpp
@@ +2029,5 @@
>  
>    nsRefPtr<gfxContext> groupTarget;
>    nsRefPtr<gfxASurface> untransformedSurface;
> +  gfxRect clipExtents;
> +  clipExtents = aTarget->GetClipExtents();

nit: Let's just use an initializer.

@@ +2109,1 @@
>        clipExtents = aTarget->GetClipExtents();

There shouldn't be any point in this still if we're already getting the clip extents at line 2032, right?
(Assignee)

Comment 2

5 years ago
Created attachment 626518 [details] [diff] [review]
Check clip before create group target
Assignee: nobody → romaxa
Attachment #625955 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #625955 - Flags: review?(bas.schouten)
Attachment #626518 - Flags: review?(bas.schouten)
Comment on attachment 626518 [details] [diff] [review]
Check clip before create group target

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

Looks fine if you remove the line that'll probably make the compile fail.

::: gfx/layers/basic/BasicLayers.cpp
@@ +1987,5 @@
>  
>    nsRefPtr<gfxContext> groupTarget;
>    nsRefPtr<gfxASurface> untransformedSurface;
> +  bool clipIsEmpty = aTarget->GetClipExtents().IsEmpty();
> +  clipExtents = aTarget->GetClipExtents();

I don't think this will compile.. clipExtents isn't declared here.
Attachment #626518 - Flags: review?(bas.schouten) → review+
(Assignee)

Comment 4

5 years ago
Created attachment 626524 [details] [diff] [review]
Check clip before create group target

err, forgot to remove that line, sorry
Attachment #626518 - Attachment is obsolete: true
Attachment #626524 - Flags: review+
(Assignee)

Updated

5 years ago
Keywords: checkin-needed, perf
https://hg.mozilla.org/integration/mozilla-inbound/rev/f987a378672f
Flags: in-testsuite-
Keywords: checkin-needed
Target Milestone: --- → mozilla15
http://mozillamemes.tumblr.com/post/19498220636/try-server-takes-the-beatings-so-mozilla-inbound

And backed out due to M4 crashes.
https://hg.mozilla.org/integration/mozilla-inbound/rev/85f66ce3ebb8

https://tbpl.mozilla.org/php/getParsedLog.php?id=12009635&tree=Mozilla-Inbound

TEST-UNEXPECTED-FAIL | /tests/layout/base/tests/test_bug93077-1.html | Exited with code 1 during test run
INFO | automation.py | Application ran for: 0:06:49.603970
INFO | automation.py | Reading PID log: /tmp/tmpaa4772pidlog
==> process 2140 launched child process 2283
INFO | automation.py | Checking for orphan process with PID: 2283
Downloading symbols from: http://ftp.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds/mozilla-inbound-linux-debug/1337822875/firefox-15.0a1.en-US.linux-i686.crashreporter-symbols.zip
PROCESS-CRASH | /tests/layout/base/tests/test_bug93077-1.html | application crashed (minidump found)
Crash dump filename: /tmp/tmpuRhPdH/minidumps/19cadecf-c48b-6f55-769b8c76-50b393db.dmp
Operating system: Linux
                  0.0.0 Linux 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686
CPU: x86
     GenuineIntel family 6 model 23 stepping 10
     2 CPUs

Crash reason:  SIGSEGV
Crash address: 0x0

Thread 0 (crashed)
 0  libmozalloc.so!TouchBadMemory [mozalloc_abort.cpp : 35 + 0x0]
    eip = 0x004a1eee   esp = 0xbfeaa9e8   ebp = 0xbfeaaa08   ebx = 0x004a3170
    esi = 0x00c59844   edi = 0xbfeaaa38   eax = 0x0000000a   ecx = 0x004a3170
    edx = 0x00c5a32c   efl = 0x00210212
    Found by: given as instruction pointer in context
 1  libmozalloc.so!mozalloc_abort [mozalloc_abort.cpp : 56 + 0x4]
    eip = 0x004a1f2f   esp = 0xbfeaa9f0   ebp = 0xbfeaaa08   ebx = 0x004a3170
    esi = 0x00c59844   edi = 0xbfeaaa38
    Found by: call frame info
 2  libxul.so!NS_DebugBreak_P [nsDebugImpl.cpp : 382 + 0x5]
    eip = 0x020f89a9   esp = 0xbfeaaa10   ebp = 0xbfeaae48   ebx = 0x02cf55a8
    esi = 0xbfeaae24   edi = 0xbfeaaa38
    Found by: call frame info
 3  libxul.so!mozilla::layers::BasicLayerManager::PaintLayer [BasicLayers.cpp : 2050 + 0x23]
    eip = 0x021818d2   esp = 0xbfeaae50   ebp = 0xbfeab2f8   ebx = 0x02cf55a8
    esi = 0x00000001   edi = 0xbfeab000
    Found by: call frame info
 4  libxul.so!mozilla::layers::BasicLayerManager::PaintLayer [BasicLayers.cpp : 2039 + 0x23]
    eip = 0x02181845   esp = 0xbfeab300   ebp = 0xbfeab7a8   ebx = 0x02cf55a8
    esi = 0x00000001   edi = 0xbfeab4b0
    Found by: call frame info
 5  libxul.so!mozilla::layers::BasicLayerManager::PaintLayer [BasicLayers.cpp : 2039 + 0x23]
    eip = 0x02181845   esp = 0xbfeab7b0   ebp = 0xbfeabc58   ebx = 0x02cf55a8
    esi = 0x00000001   edi = 0xbfeab960
    Found by: call frame info
 6  libxul.so!mozilla::layers::BasicLayerManager::EndTransactionInternal [BasicLayers.cpp : 1688 + 0x18]
    eip = 0x02182962   esp = 0xbfeabc60   ebp = 0xbfeabe38   ebx = 0x02cf55a8
    esi = 0x09ada53c   edi = 0xbfeabe10
    Found by: call frame info
 7  libxul.so!mozilla::layers::BasicShadowLayerManager::EndTransaction [BasicLayers.cpp : 3527 + 0xe]
    eip = 0x02182a99   esp = 0xbfeabe40   ebp = 0xbfeabe58   ebx = 0x02cf55a8
    esi = 0x09ada508   edi = 0x0ad944f0
    Found by: call frame info
 8  libxul.so!nsDisplayList::PaintForFrame [nsDisplayList.cpp : 646 + 0x11]
    eip = 0x013d3f43   esp = 0xbfeabe60   ebp = 0xbfeabf68   ebx = 0x02cf55a8
    esi = 0xbfeabf48   edi = 0x0ad944f0
    Found by: call frame info
 9  libxul.so!nsDisplayList::PaintRoot [nsDisplayList.cpp : 551 + 0x16]
    eip = 0x013d4019   esp = 0xbfeabf70   ebp = 0xbfeabfb8   ebx = 0x02cf55a8
Flags: in-testsuite-
Target Milestone: mozilla15 → ---
(Assignee)

Comment 7

5 years ago
Created attachment 626824 [details] [diff] [review]
Check clip before create group target
Attachment #626524 - Attachment is obsolete: true
Attachment #626824 - Flags: review?(roc)
Attachment #626824 - Flags: review?(roc) → review+
(Assignee)

Comment 8

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/8bc719810cd5
Flags: in-testsuite-
Target Milestone: --- → mozilla15
Backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/f2ec7e8407e5 - either this or you patch for bug 757933 was hitting mochitest-4 assertions like https://tbpl.mozilla.org/php/getParsedLog.php?id=12048582&tree=Mozilla-Inbound&full=1
(Assignee)

Comment 10

5 years ago
Ok, runtime abort must be moved below clip-extents check.
Need finish try build and add new version.
https://tbpl.mozilla.org/?tree=Try&rev=c30e13ce681c
(Assignee)

Comment 11

5 years ago
Created attachment 627393 [details] [diff] [review]
Check clip before create group target

ok, one more try, this should be fine
Attachment #626824 - Attachment is obsolete: true
Attachment #627393 - Flags: review?(bas.schouten)
Attachment #627393 - Flags: review?(bas.schouten) → review+
(Assignee)

Comment 12

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/e6c4152034ed
https://hg.mozilla.org/mozilla-central/rev/e6c4152034ed
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Depends on: 780792
You need to log in before you can comment on or make changes to this bug.