Commit Graph

268 Commits

Author SHA1 Message Date
Sebastian Hengst
05fcd344ca Backed out changeset 7e2fc94f5be9 (bug 1409871) 2017-10-23 23:42:51 +02:00
Sebastian Hengst
f4cf06d700 Backed out changeset 466f20f34a13 (bug 1409871) 2017-10-23 23:42:45 +02:00
Sebastian Hengst
196b098371 Backed out changeset 352a6f520d27 (bug 1409871) 2017-10-23 23:42:39 +02:00
Sebastian Hengst
37096c3eab Backed out changeset 56fe4c3c3b04 (bug 1409871) 2017-10-23 23:42:34 +02:00
Sebastian Hengst
bb46083256 Backed out changeset a4e35be8cf4c (bug 1409871) 2017-10-23 23:42:28 +02:00
Ryan Hunt
ff2e451f32 Be sure to unlock the old back buffer before we release it. (bug 1409871 part 20, r=nical)
MozReview-Commit-ID: HR9EiYrDeqT
2017-10-20 12:28:41 -04:00
Ryan Hunt
b347cc81a4 Remove mInAsyncPaint and move locking new back buffer into BeginPaint (bug 1409871 part 19, r=nical)
mInAsyncPaint is only needed because the code using CreateBuffer expects the
buffer to be locked when it is returned. This isn't necessary because we can
now lock in BeginPaint.

MozReview-Commit-ID: 8WazvBKMbvb
2017-10-18 15:31:15 -04:00
Ryan Hunt
7d5f9141d9 Remove BeginPaintBuffer (bug 1409871 part 18, r=nical)
Now that BeginPaintBuffer and BeginPaint are both implemented by content client,
I think it makes sense to just merge them into one method. This simplifies the
interface clients have to use.

MozReview-Commit-ID: 8bjH6WcpZS9
2017-10-18 15:20:14 -04:00
Ryan Hunt
ad0bb37ab6 Clean up some methods on ContentClient (bug 1409871 part 17, r=nical)
This commit does some more cleanup on the content client class hierarchy.
Some methods were virtual or instance methods when they didn't need to be.

MozReview-Commit-ID: 2y2D3zYtYvM
2017-10-18 14:54:26 -04:00
Ryan Hunt
07962ccf99 Fix PrepareDrawTargetForPainting (bug 1409871 part 16, r=dvander)
CapturedPaintState::mTarget is actually a dual draw target to the black and
white draw targets, so this code will have the white draw target cleared black
and then white. This isn't incorrect, it's just wasteful.

MozReview-Commit-ID: ItgiSmegPK6
2017-10-18 14:46:54 -04:00
Ryan Hunt
5a2fc8bc61 Use a rect instead of a region for UpdateDestinationFrom (bug 1409871 part 15, r=nical)
UpdateDestinationFrom actually only uses a rect, so it's best to not be
misleading and force the clients of it to do the conversion.

MozReview-Commit-ID: EsUv3apqnku
2017-10-18 14:35:18 -04:00
Ryan Hunt
4898a9b3ee Update comments for ContentClient (bug 1409871 part 13, r=nical)
This could be a part of the previous commit, but I omitted it to keep the size
down. Just some updates to comments and documentation.

MozReview-Commit-ID: HkCOSIQhBNv
2017-10-18 13:42:19 -04:00
Ryan Hunt
d9c72a4bbc Kill RotatedContentBuffer (bug 1409871 part 12, r=nical)
This commit is the guts of the refactoring.

This commit removes rotated content buffer, and moves the necessary
functionality to content client. All content clients now do not inherit from
rotated content buffer, but contain a refptr to a rotated buffer.

For the basic content client, this is a DrawTargetRotatedBuffer.
For the remote content client, this is a RemoteRotatedBuffer.
The double buffered content client contains an additional RemoteRotatedBuffer
for the front buffer.

Each derived class of content client only needs to implement a method to
create its own rotated buffer. The rest is handled by the base content
client. The remote content clients still override some additional methods
to sync buffers and do IPC.

MozReview-Commit-ID: B9vcSi8UYhm
2017-10-16 19:45:11 -04:00
Ryan Hunt
8f4fb20f73 Remove PaintState::mDidSelfCopy. (bug 1409871 part 9, r=nical)
Miscellaneous cleanup, PaintState doesn't need to know this as no one uses
this information outside of the content client classes.

MozReview-Commit-ID: 6K8LxEPvp4V
2017-10-12 17:24:50 -04:00
Ryan Hunt
f8e9d02ff3 Move mFrontAndBackBufferDiffer to ContentClientDoubleBuffered. (bug 1409871 part 8, r=nical)
Miscellaneous cleanup, ContentClientSingleBuffered doesn't need to track if
the front and back buffer differ.

MozReview-Commit-ID: IvAw0b92jsh
2017-10-12 12:58:17 -04:00
Ryan Hunt
5303563e05 Use a RemoteRotatedBuffer for the front buffer of ContentClientDoubleBuffered. (bug 1409871 part 5, r=nical)
The front buffer for a double buffered content client is really just another
rotated buffer, so it can simplify the code to use the class we just added.
The goal is to have the back and the front buffer using remote rotated buffers,
but this is a good first step.

Note: The front buffer is represented as a Maybe<RemoteRotatedBuffer> in this
commit, but in the future it will be a RefPtr. That can't be done yet, because
rotated buffer can't implement refcounting in addition to compositable client.

MozReview-Commit-ID: Czk3otkf1pb
2017-10-11 15:22:57 -04:00
Ryan Hunt
355aaf1fa1 Move DrawTo to RotatedBuffer. (bug 1409871 part 3, r=nical)
Similar to the previous patch, more functionality can be moved to rotated
buffer and out of rotated content client.

MozReview-Commit-ID: FNqfonyBBq9
2017-10-11 15:31:20 -04:00
Ryan Hunt
4e32d6a1b5 Move UpdateDestinationFrom to RotatedBuffer. (bug 1409871 part 2, r=nical)
UpdateDestinationFrom is a useful method for any rotated buffer. This will be
needed when content clients are no longer rotated buffers.

Note: EnsureBuffer and EnsureBufferOnWhite were moved out of
UpdateDestinationFrom because I'd like to kill those methods, and so the calls
were moved to all users of UpdateDestinationFrom.

MozReview-Commit-ID: 2e3HhUsZ6iw
2017-10-11 13:40:16 -04:00
Ryan Hunt
8348724cb0 Remove ContentClientRemote. (bug 1409871 part 1, r=nical)
This class doesn't seem to be necessary and only complicates the class
hierarchy.

MozReview-Commit-ID: 6dRXce1vB9T
2017-10-11 12:43:39 -04:00
Nicholas Nethercote
9a7b0ad887 Bug 1406296 (part 1) - Remove the profiler's "displaylistdump" feature. r=mstange.
It's not useful.
2017-10-06 17:33:30 +11:00
Nicholas Nethercote
a35e82f193 Bug 1403868 (part 4) - Reduce tools/profiler/public/*.h to almost nothing in non-MOZ_GECKO_PROFILER builds. r=mstange.
Currently the Gecko Profiler defines a moderate amount of stuff when
MOZ_GECKO_PROFILER is undefined. It also #includes various headers, including
JS ones. This is making it difficult to separate Gecko's media stack for
inclusion in Servo.

This patch greatly simplifies how things are exposed. The starting point is:

- GeckoProfiler.h can be #included unconditionally;

- everything else from the profiler must be guarded by MOZ_GECKO_PROFILER.

In practice this introduces way too many #ifdefs, so the patch loosens it by
adding no-op macros for a number of the most common operations.

The net result is that #ifdefs and macros are used a bit more, but almost
nothing is exposed in non-MOZ_GECKO_PROFILER builds (including
ProfilerMarkerPayload.h and GeckoProfiler.h), and understanding what is exposed
is much simpler than before.

Note also that in BHR, ThreadStackHelper is now entirely absent in
non-MOZ_GECKO_PROFILER builds.
2017-10-04 09:11:18 +11:00
Mason Chang
df6089fba6 Bug 1399692 - Backed out changeset 46f0b004bdd2 for not cleaning up content client on the right thread. r=bas
MozReview-Commit-ID: 2eocRWGxjzA
2017-09-20 08:38:30 -07:00
Mason Chang
2151daf353 Bug 1399692 - Copy the front buffer to the back buffer on the paint thread with OMTP enabled. r=bas 2017-09-14 15:09:53 -04:00
Milan Sreckovic
fe9daf64d1 Bug 1387514: Upgrade BaseRect (derived classes) width and height direct member variable use to instead use Width()/SetWidth() and Height()/SetHeight() in .cpp files in gfx/*. r=milan
MozReview-Commit-ID: 1jESowJKdyp
2017-08-14 08:29:28 -04:00
David Anderson
23d88a6fec Bug 1385101 Part 2 Hold TextureClients alive during async painting. r=mattwoodrow,mchang 2017-08-05 11:54:11 -07:00
David Anderson
efc531e81d Bug 1385101 Part 1 - Create CapturedPaintState in ContentClient rather than ClientPaintedLayer. r=mchang 2017-08-05 11:25:45 -07:00
David Anderson
41bfb10f56 Don't assert about borrowed DT refcounts when async painting. (bug 1381393, r=mattwoodrow) 2017-07-25 22:38:33 -07:00
Nicholas Nethercote
a7e5660c91 Bug 1360471 (part 4) - Use a bitfield to represent profiler features. r=mstange.
Currently the profiler mostly uses an array of strings to represent which
features are available and in use. This patch changes the profiler core to use
a uint32_t bitfield, which is a much simpler and faster representation.
(nsProfiler and the profiler add-on still use the array of strings, alas.) The
new ProfilerFeature type defines the values in the bitfield.

One side-effect of this change is that profiler_feature_active() now can be
used to query all features. Previously it was just a subset.

Another side-effect is that profiler_get_available_features() no longer incorrectly
indicates support for Java and stack-walking when they aren't supported. (The
handling of task tracer support is unchanged, because the old code handled it
correctly.)
2017-05-01 14:23:34 +10:00
Matt Woodrow
b452f4a2e8 Bug 1341496 - Part 2: Don't use a separate ReadLock for the second component alpha texture as they should always be locked/unlocked at the same time. r=nical 2017-04-19 15:16:13 +12:00
Nicolas Silva
0a9f90823a Bug 1348291 - Call EndPaint when painting is skipped if BeginPaint was called. r=mattwoodrow 2017-03-28 14:28:45 +02:00
sotaro
7585ae6fe9 Bug 1349476 - Remove LayersBackend::LAYERS_D3D9 type r=mattwoodrow 2017-03-23 11:00:41 +09:00
Matt Woodrow
f3b2b42e4a Bug 1325227 - Part 10: Use blocking read locks instead of forcing a synchronous transaction when using ContentClientRemoteBuffer. r=nical 2017-02-14 21:10:36 +13:00
Matt Woodrow
ed2c23e1c2 Bug 1325227 - Part 7: Allow locking TextureClients in RotatedBuffer to be fallible. r=nical 2017-02-04 18:53:30 +13:00
Matt Woodrow
53e1d350fc Bug 1325227 - Part 1: Remove synchronous transaction replies since they don't return any data we didn't already have. r=nical
MozReview-Commit-ID: 2HIbk65L7zR
2016-12-06 13:34:54 -10:00
sotaro
2c1f9253ba Bug 1332528 - Use LayersBackend::LAYERS_WR more r=nical 2017-01-22 13:24:52 +09:00
Bas Schouten
30c5786aaa Bug 1303570 - Part 2: When using Cairo use gfxWindowsSurfaces when creating surfaces in ContentClientBasic. r=jrmuizel
MozReview-Commit-ID: Bf4vdtiXNf3
2016-09-27 11:29:10 +02:00
Matt Woodrow
2dabc216dc Bug 1281456 - Decouple TextureForwarder and CompositableForwarder. r=gw280 2016-09-27 16:22:20 +13:00
Bas Schouten
999fe81415 Bug 1296658: Attempt to create the correct BackendType buffers for a LayerManager. r=jrmuizel
MozReview-Commit-ID: 14Eg8FC6OpJ
2016-09-15 13:53:12 +02:00
David Anderson
37cf2606e0 Move UseXRender from gfxPlatformGtk to gfxVars. (bug 1288259 part 5, r=jrmuizel) 2016-08-04 11:33:44 -07:00
Milan Sreckovic
3c244ea03a Bug 635464: Diagnostic crash in nightly and aurora, to see if we are asking basic content client for alpha. r=bas
MozReview-Commit-ID: 2DBdJZs0hlh
2016-07-20 10:26:02 -04:00
Sotaro Ikeda
cc18201e0b Bug 1252835 - Make TextureHost recycling implicit r=nical 2016-06-15 04:28:10 -07:00
Jonathan Watt
4043efafb0 Bug 1279395 - Remove gfxTeeSurface. r=eflores 2016-06-13 09:27:22 +01:00
Jonathan Watt
9c5b8de022 Bug 1279451 - Remove a lot of unnecessary includes of nsAutoPtr.h. rs=sparky 2016-06-07 21:10:18 +01:00
Mason Chang
e144d5155b Bug 1267253 - Delete gfxWindowsPlatform::RenderMode and replace it with a check against the default backend. r=bas 2016-04-21 14:35:13 -07:00
David Anderson
7b7cd394cc Rename PCompositor to PCompositorBridge. (bug 1258479 part 2, r=mattwoodrow) 2016-03-22 14:08:38 -04:00
Nicolas Silva
f46607ed07 Bug 1250117 - Fix b2g timeouts when gralloc is disabled. r=sotaro 2016-02-25 09:23:23 +01:00
Mason Chang
62708349a3 Bug 1239152 Memset RGBX surfaces to opaque white. r=nical 2016-02-17 07:34:37 -08:00
Bas Schouten
185499388e Bug 1247775 - Part 1: Remove D3D10/D2D 1.0 texture integration from layers. r=dvander
MozReview-Commit-ID: CPBTl0cEG3p
2016-02-13 14:33:27 +01:00
Carsten "Tomcat" Book
ff5678902d Backed out changeset 9320c843aa7e (bug 1247775) for breaking win 8 reftests 2016-02-12 08:49:50 +01:00
Bas Schouten
f7a91a4e3f Bug 1247775 - Part 1: Remove D3D10/D2D 1.0 texture integration from layers. r=dvander
MozReview-Commit-ID: CPBTl0cEG3p
2016-02-12 00:52:59 +01:00