Граф коммитов

1182 Коммитов

Автор SHA1 Сообщение Дата
Kartikaya Gupta 00ef028ed3 Bug 1416267 - Update gfxContext matrix functions to avoid flip-flopping between float and double matrices. r=jrmuizel
The core of this change is in gfxContext.*:
- change gfxContext::CurrentMatrix() and gfxContext::SetMatrix() to
  return and take a Matrix respectively, instead of converting to
  and from a gfxMatrix (which uses doubles). These functions therefore
  will now match the native representation of the transform in gfxContext.
- add two new functions CurrentMatrixDouble() and SetMatrixDouble() that
  do what the old CurrentMatrix() and SetMatrix() used to do, i.e.
  convert between the float matrix and the double matrix.

The rest of the change is just updating the call sites to avoid round-
tripping between floats and doubles where possible. Call sites that are
hard to fix are migrated to the new XXXDouble functions which preserves
the existing behaviour.

MozReview-Commit-ID: 5sbBpLUus3U
2017-11-10 21:14:09 -05:00
Daniel Holbert 126bd9e1a4 Bug 1412427 part 8: (automated patch) Switch a bunch of C++ files in gfx to use our standard mode lines. r=jrmuizel
This patch was generated automatically by the "modeline.py" script, available
here: https://github.com/amccreight/moz-source-tools/blob/master/modeline.py

For every file that is modified in this patch, the changes are as follows:
 (1) The patch changes the file to use the exact C++ mode lines from the
     Mozilla coding style guide, available here:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line

 (2) The patch deletes any blank lines between the mode line & the MPL
     boilerplate comment.

 (3) If the file previously had the mode lines and MPL boilerplate in a
     single contiguous C++ comment, then the patch splits them into
     separate C++ comments, to match the boilerplate in the coding style.

MozReview-Commit-ID: 77D61xpSmIl

--HG--
extra : rebase_source : c6162fa3cf539a07177a19838324bf368faa162b
2017-10-27 16:10:06 -07:00
Daniel Holbert 3b352c7239 Bug 1412427 part 6: Remove stray "//" prefix before first line of MPL boilerplate comment, in some gfx source files. r=jrmuizel
This patch was automatically generated. I found the files to be fixed in this
patch with the following command:
grep -r "//  \* This Source Code" gfx

...and then I modified each of these files with the following script
(where $1 is the filename to be modified):
####
old="//  \* This Source Code Form is subject to the terms of the Mozilla Public"
new=" \* This Source Code Form is subject to the terms of the Mozilla Public"
sed -i s%"^$old"%"$new"% $1
####

MozReview-Commit-ID: Ihx0EAOkT2g

--HG--
extra : rebase_source : 4dc97f234495e3ec1f4904e91d43d00fd3810626
2017-10-27 15:55:38 -07:00
Daniel Holbert ecf5ee687e Bug 1412427 part 4: Indent under-indented MPL boilerplate comments by 1 space, for consistency & alignment. (whitespace-only) r=jrmuizel
This patch was automatically generated. I found the files to be fixed in this
patch with the following command:
grep -r "^\* This Source Code" gfx

...and then I modified each of these files with the following script
(where $1 is the filename to be modified):
###
line1="\* This Source Code Form is subject to the terms of the Mozilla Public"
line2="\* License, v\. 2\.0\. If a copy of the MPL was not distributed with this"
line3="\* file, You can obtain one at http://mozilla\.org/MPL/2\.0/\. \*/"

# Insert 1 space at beginning:
sed -i s%"^$line1"%" $line1"% $1
sed -i s%"^$line2"%" $line2"% $1
sed -i s%"^$line3"%" $line3"% $1
###

MozReview-Commit-ID: HXBMrfnhlVr

--HG--
extra : rebase_source : de4c78563711f8366e2978c5199a5041875fbe38
2017-10-27 15:55:37 -07:00
Ryan Hunt 1966a0614d 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

--HG--
extra : rebase_source : 1b22549c03299e1b1b9ba8a04f3c3e428577e062
2017-10-18 15:20:14 -04:00
Ryan Hunt 1b92ee86e6 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

--HG--
extra : rebase_source : 41649182f1d99daae600568722f0b8615d27fe26
2017-10-18 14:54:26 -04:00
Ryan Hunt d5a7ec4f84 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

--HG--
extra : rebase_source : bd94fa88d384123219528a6cf34c86e17f9de201
2017-10-18 13:42:19 -04:00
Ryan Hunt 1eea1ecca9 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

--HG--
extra : rebase_source : f4b1dcb3cd06f7d0da7ed85e5d3f4bf5ec445e7f
2017-10-16 19:45:11 -04:00
Ryan Hunt f84be40adb 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

--HG--
extra : rebase_source : 8bef61a47f423dd83ac9ea39b84f064bd7681e0c
2017-10-12 17:24:50 -04:00
Sebastian Hengst 2aaf1b71ad Backed out changeset cce97a15c945 (bug 1409871) 2017-10-23 23:43:30 +02:00
Sebastian Hengst 7c964d3c5d Backed out changeset 7b7bcdf87539 (bug 1409871) 2017-10-23 23:43:13 +02:00
Sebastian Hengst 192e66cd22 Backed out changeset 2d9d7435eb63 (bug 1409871) 2017-10-23 23:43:07 +02:00
Sebastian Hengst 5e15045655 Backed out changeset 466f20f34a13 (bug 1409871) 2017-10-23 23:42:45 +02:00
Sebastian Hengst 86786de5cd Backed out changeset 352a6f520d27 (bug 1409871) 2017-10-23 23:42:39 +02:00
Ryan Hunt 04ee50acb9 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

--HG--
extra : rebase_source : c2aad6cd9d85f7dd09652ee253683f03825e95c6
2017-10-18 15:20:14 -04:00
Ryan Hunt 23a0d9c85e 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

--HG--
extra : rebase_source : ebd137e4a1ee8eba10467e987bd2d91ea44ca5a2
2017-10-18 14:54:26 -04:00
Ryan Hunt fb77e4394b 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

--HG--
extra : rebase_source : 665b6bbe18dcd409809d33e1be37a56c0dc304d7
2017-10-18 13:42:19 -04:00
Ryan Hunt 6cd0ba94af 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

--HG--
extra : rebase_source : a727d5548b0167eb12676837b173355eb0dd38a5
2017-10-16 19:45:11 -04:00
Ryan Hunt 962f98cab9 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

--HG--
extra : rebase_source : 931f7726d2f8f1f5ab32b5cf8f9030aa39a64bff
2017-10-12 17:24:50 -04:00
cku f1fd114ae6 Bug 1396489 - Part 3. Use gfxContext::GetClipExtents(false) when clipped rect in device space is needed. r=mstange
MozReview-Commit-ID: YO4JACFK9O

--HG--
extra : rebase_source : 068eb69d634cfc5150d7cb864c366e719a025859
2017-09-04 14:04:17 +08:00
Phil Ringnalda e761d397b7 Backed out 3 changesets (bug 1396489) for unexpected assertion failures
Backed out changeset 75ffa3ed13d5 (bug 1396489)
Backed out changeset fc779b639aeb (bug 1396489)
Backed out changeset dcfd73044bba (bug 1396489)

MozReview-Commit-ID: DvGlDLZF2nO
2017-09-04 21:09:04 -07:00
cku afd9919b06 Bug 1396489 - Part 3. Use gfxContext::GetClipExtents(false) when clipped rect in device space is needed. r=mstange
MozReview-Commit-ID: YO4JACFK9O

--HG--
extra : rebase_source : afd9cb051e35856070e3451215e4bba79396af7e
2017-09-04 14:04:17 +08:00
Milan Sreckovic e3cd0a3157 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

--HG--
extra : rebase_source : 3839cdea46729a9af05c777215cffcb9f42a2018
2017-08-14 08:29:28 -04:00
Morris Tseng f3d4ff499f Bug 1379920 - Introduce CanvasRenderer and its derived classes. r=nical,jrmuizel
This patch move common canvas interfaces out of layer. So I create a
base class CanvasRenderer which move interfaces from CanvasLayer.
CopyableCanvasRenderer from CopyableCanvasLayer, ClientCanvasRenderer
from ClientCanvasLayer and WebRenderCanvasRenderer from
WebRenderCanvasLayer. And finally, WebRenderCanvasRendererSync for the
non layers free mode and WebRenderCanvasRendererAsync for the layers
free mode.

Summary all changes in this patch.
* Move class CanvasLayer::Data to CanvasRenderer.h and rename it to
CanvasInitializeData. Because this class not only use by layer but also
* Move BasicCanvasLayer::UpdateSurface to
CopyableCanvasRenderer::ReadbackSurface.
* CanvasClient::Update now accepts ShareableCanvasRenderer as parameter.
not CanvasLayer.
use by layers-free mode. Move it out of layer's class makes more sense.
* Add InitializeCanvasRenderer in the canvas related classes to
initialize CanvasRenderer without involved layer.
* All canvas layer has function "CreateCanvasRendererInternal" that
initialize corresponding CanvasRenderer.

* Description of all CanvasRenderer classes:
** CanvasRenderer: Based classes.
** CopyableCanvasRenderer: Can readback canvas content to a
SourceSurface. Use by BasicCanvasLayer.
** ShareableCanvasRenderer: Provide IPC capabilities that allow sending
canvas content over IPC. This is pure virtual class because the IPC handling is
different in different LayerManager.
** ClientCanvasRenderer: Implement IPC handling for ClientLayerManager.
Use by ClientCanvasLayer.
** WebRenderCanvasRenderer: Implement IPC handling for
WebRenderLayerManager.
** WebRenderCanvasRendererSync: Use by WebRenderCanvasLayer.
** WebRenderCanvasRendererAsync: Use by layers-free mode in WebRender.

class diagram shows below:

                      +--------------+
                      |CanvasRenderer|
                      +-------+------+
                              ^
                              |
                  +----------------------+
                  |CopyableCanvasRenderer|
                  +----------------------+
                              ^
                              |
                  +-----------+-----------+
                  |ShareableCanvasRenderer|
                  +-----+-----------------+
                        ^      ^
          +-------------+      +-------+
          |                            |
+--------------------+       +---------+-------------+
|ClientCanvasRenderer|       |WebRenderCanvasRenderer|
+--------------------+       +--------+--+-----------+
                                      ^  ^
              +-----------------------+  +----+
              |                               |
+-------------+-------------+   +-------------+--------------+
|WebRenderCanvasRendererSync|   |WebRenderCanvasRendererAsync|
+---------------------------+   +----------------------------+

MozReview-Commit-ID: 5hqQ19W169r
2017-08-03 13:55:14 +08:00
Kearwood Gilbert 21d51ec691 Bug 1310665 - macOS OpenVR Support r=daoshengmu,mattwoodrow
MozReview-Commit-ID: 9CDJpFOcFUB

--HG--
extra : rebase_source : ab1f13bd733a6f295570f58940191b333868a088
extra : source : d527620e9351a04bc70689af6a7369dd09ffeef0
2017-07-04 13:50:40 -07:00
Nicolas Silva 24239ea4f0 Bug 13821850 - Return false in GLContext::Readback if MakeCurrent failed. r=jgilbert 2017-07-24 12:24:18 +02:00
JerryShih 309a5411d4 Bug 1374548 - Implement the frame selection in BasicImageLayer. r=mattwoodrow a=relanding
The BasicImageLayer always picks the first frame in image container which is not desired for video playback.

MozReview-Commit-ID: q4QkBT2a7w
2017-06-30 11:57:14 -07:00
Wes Kocher 3483bcf612 Backed out changeset 85099e5d1e2a (bug 1374548) for being the likely cause of the spike in crashes from bug 1370089 a=backout 2017-06-30 10:45:51 -07:00
JerryShih 56f5339e5a Bug 1374548 - Implement the frame selection in BasicImageLayer. r=mattwoodrow
The BasicImageLayer always picks the first frame in image container which is not desired for video playback.

MozReview-Commit-ID: q4QkBT2a7w

--HG--
extra : rebase_source : 732f61eb5ca64a051fc928a1e22706011800d8fb
2017-06-22 21:03:00 +02:00
Ryan Hunt cfc792bc4c Bug 1351783 part 1 - Add includes for unified build issues. r=kats
MozReview-Commit-ID: D57bbW4pmPZ

--HG--
extra : rebase_source : 9af2973a112c7ea641876c1f945797f2c7c945ce
2017-06-05 18:03:02 -05:00
Bill McCloskey f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Nicholas Nethercote 58786e1ea7 Bug 1375392 - Tweak the PROFILER_LABEL* macros. r=mstange.
This patch makes the following changes to the macros.

- Removes PROFILER_LABEL_FUNC. It's only suitable for use in functions outside
  classes, due to PROFILER_FUNCTION_NAME not getting class names, and it was
  mostly misused.

- Removes PROFILER_FUNCTION_NAME. It's no longer used, and __func__ is
  universally available now anyway.

- Combines the first two string literal arguments of PROFILER_LABEL and
  PROFILER_LABEL_DYNAMIC into a single argument. There was no good reason for
  them to be separate, and it forced a '::' in the label, which isn't always
  appropriate. Also, the meaning of the "name_space" argument was interpreted
  in an interesting variety of ways.

- Adds an "AUTO_" prefix to PROFILER_LABEL and PROFILER_LABEL_DYNAMIC, to make
  it clearer they construct RAII objects rather than just being function calls.
  (I myself have screwed up the scoping because of this in the past.)

- Fills in the 'js::ProfileEntry::Category::' qualifier within the macro, so
  the caller doesn't need to. This makes a *lot* more of the uses fit onto a
  single line.

The patch also makes the following changes to the macro uses (beyond those
required by the changes described above).

- Fixes a bunch of labels that had gotten out of sync with the name of the
  class and/or function that encloses them.

- Removes a useless PROFILER_LABEL use within a trivial scope in
  EventStateManager::DispatchMouseOrPointerEvent(). It clearly wasn't serving
  any useful purpose. It also serves as extra evidence that the AUTO_ prefix is
  a good idea.

- Tweaks DecodePool::SyncRunIf{Preferred,Possible} so that the labelling is
  done within them, instead of at their callsites, because that's a more
  standard way of doing things.

--HG--
extra : rebase_source : 318d1bc6fc1425a94aacbf489dd46e4f83211de4
2017-06-22 17:08:53 +10:00
Carsten "Tomcat" Book 8a1350b5a6 Backed out changeset 4f6302a98ae4 (bug 1372405)
--HG--
extra : rebase_source : 41632f3158e88e692809731394a683d065a73dfb
2017-06-21 13:59:26 +02:00
Bill McCloskey 6b3e84ed5f Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-20 21:44:11 -07:00
Carsten "Tomcat" Book ea1b86680c Backed out changeset 9846de3bd954 (bug 1372405)
--HG--
extra : rebase_source : 5d4a48e8ec394c329994689d938d2a6e9b2752b0
2017-06-20 08:27:02 +02:00
Bill McCloskey 4592152411 Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-19 22:25:47 -07:00
Markus Stange 5e44be6da9 Bug 1368386 - Make PaintedLayer::mValidRegion private so that its access can be tightly controlled. r=mattwoodrow
MozReview-Commit-ID: LdtH3hrXT5v

--HG--
extra : rebase_source : c1eff1ba44f9a762cadb028113576bbffee93715
2017-06-15 18:20:53 -04:00
Alexis Beingessner adb013669b Bug 1088760 - Remove nsRenderingContext, replacing all of its uses with gfxContext. r=jwatt,jrmuizel
MozReview-Commit-ID: K1WUIOnvazF
2017-06-13 11:00:10 -04:00
Sebastian Hengst f3bf820bfd Backed out changeset 3d1ce85e6348 (bug 1088760) for bustage, at least on Android at layout/generic/nsPluginFrame.cpp:1612. r=backout 2017-06-13 00:30:03 +02:00
Alexis Beingessner c75211cb95 Bug 1088760 - Remove nsRenderingContext, replacing all of its uses with gfxContext. r=jwatt,jrmuizel
MozReview-Commit-ID: K1WUIOnvazF
2017-06-12 17:32:48 -04:00
Jonathan Watt cb165b4a0a Bug 1359155, part 3 - Convert BasicPlanarYCbCrImage::CopyData to use Moz2D's StrideForFormatAndWidth. r=mstange
MozReview-Commit-ID: F8EyjjQ0sX9
2017-03-30 15:58:31 +01:00
Wes Kocher 0ce994139e Backed out 2 changesets (bug 1359155) for failures in test_getUserMedia_basicTabshare.html a=backout
Backed out changeset 2e2e2ba5ecb2 (bug 1359155)
Backed out changeset b695217bbfa7 (bug 1359155)

MozReview-Commit-ID: HlCufP7I1cC

--HG--
extra : rebase_source : d4014380423ba6ff4a4daa5a7e4e1893b0c9cba2
2017-04-24 15:24:11 -07:00
Jonathan Watt fa7e506fa5 Bug 1359155, part 2 - Convert gfxASurface::FormatStrideForWidth callers to Moz2D's StrideForFormatAndWidth. r=mstange 2017-03-30 15:58:31 +01:00
Ehsan Akhgari 3b93e5ad89 Bug 1354412 - Remove nsIDOMWindowUtils.beginTabSwitch(); r=jrmuizel 2017-04-12 23:31:39 -04:00
Bob Owen 3f14ad38c2 Bug 1347646 Part 1: Backout 4849ef8c9a34 for causing OOM issues when printing PDFs. r=jwatt, r=lsalzman, r=tobytailor 2017-04-08 22:47:51 +01:00
sotaro 489d43d47c Bug 1348936 - Fix BasicPlanarYCbCrImage::CopyData() r=nical 2017-04-05 11:45:13 +09:00
Mason Chang e08bd7cbdb Bug 1351114 Properly track display item layers in layer managers. r=mattwoodrow 2017-03-28 22:37:11 -07:00
David Anderson ca86baecf0 Material changes for TextureHost TextureSourceProvider support. (bug 1343814 part 3.2, r=mattwoodrow) 2017-03-21 20:32:54 -07:00
David Anderson 019d548845 Change TextureSource::SetCompositor to use TextureSourceProvider. (bug 1343814 part 2, r=mattwoodrow) 2017-03-21 20:32:53 -07:00
Kartikaya Gupta 0ea7443517 Merge m-c to graphics
MozReview-Commit-ID: 3GcCKcscfkz
2017-03-10 09:58:01 -05:00