Commit Graph
58 Commits
Author SHA1 Message Date
Kartikaya Gupta 7c1da03e1c Bug 1403915 - Remove the WebRender*Layer classes and functions that refer to them. r=jrmuizel
MozReview-Commit-ID: 2syFwMc7j3r
2017-10-03 16:31:08 -04:00
Sebastian Hengst 50a28edc06 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: mr7OYuaLKE
2017-09-21 15:23:43 +02:00
Morris Tseng d7ade017fc Bug 1392200 - Add backface-visibility support for layers-free mode. r=kats
For layers-full mode, we set the backface-visibility to visible because
visibility would be handled by FLB and layers.

MozReview-Commit-ID: CUbeUabfC7K
2017-09-21 14:41:38 +08:00
Xidorn Quan 45b9f27e27 Bug 1400438 - Use array instead of linked list for -moz-border-*-colors. r=heycam,mattwoodrow
MozReview-Commit-ID: LPl1Rlg5gRn
2017-09-18 13:38:39 +10:00
Sebastian Hengst ba2292211b Backed out changeset 3844ac09ae6a (bug 1392200) 2017-09-20 18:13:07 +02:00
Morris Tseng 02ba712c17 Bug 1392200 - Add backface-visibility support for layers-free mode. r=kats
For layers-full mode, we set the backface-visibility to visible because
visibility would be handled by FLB and layers.

MozReview-Commit-ID: CUbeUabfC7K
2017-09-13 11:25:58 +08:00
Sebastian Hengst b57b40549e Backed out changeset 61a277705d59 (bug 1400438) for heap write hazard. r=backout 2017-09-20 16:52:02 +02:00
Xidorn Quan 060ebcb57f Bug 1400438 - Use array instead of linked list for -moz-border-*-colors. r=heycam,mattwoodrow
MozReview-Commit-ID: LPl1Rlg5gRn
2017-09-20 22:52:20 +10:00
Sebastian Hengst 60681b0d1d Backed out changeset df9036657f25 (bug 1400438) for crashing chrome test mobile/android/components/extensions/test/mochitest/test_ext_options_ui.html on Android. r=backout on a CLOSED TREE 2017-09-19 16:33:05 +02:00
Xidorn Quan d04464d1b9 Bug 1400438 - Use array instead of linked list for -moz-border-*-colors. r=heycam,mattwoodrow
MozReview-Commit-ID: LPl1Rlg5gRn
2017-09-18 13:38:39 +10:00
Nicolas Silva 7100d343f6 Bug 1393031 - Use shared memory to pass resource update data. r=jrmuizel 2017-09-14 18:48:55 +02:00
Jonathan Watt 2f345c52bd Bug 1389010, part 8 - Stop abusing mAllBordersSameStyle in nsCSSBorderRenderer::DrawBorders to force drawing as separate parts. r=dholbert
MozReview-Commit-ID: AiGmfUgB6ql
2017-08-08 11:24:56 +01:00
Jonathan Watt bbdedbd94a Bug 1389010, part 7 - Call AllBordersSameWidth in nsCSSBorderRenderer's constructor and store the result as a member. r=dholbert
MozReview-Commit-ID: 70Z3TBLKcq5
2017-08-08 10:02:35 +01:00
Jonathan Watt 956889ff35 Bug 1389010, part 6 - Call AreBorderSideFinalStylesSame in nsCSSBorderRenderer's constructor and store the result as a member. r=dholbert
MozReview-Commit-ID: 3OBwSIG4OzP
2017-08-08 09:41:13 +01:00
Jonathan Watt 099da406fc Bug 1389010, part 5 - Assert the line type invariant at the top of nsCSSBorderRenderer::SetupDashedOptions. r=dholbert
MozReview-Commit-ID: KUcCSjYRgMg
2017-08-07 21:53:26 +01:00
Jonathan Watt 667d1c5804 Bug 1389010, part 4 - In nsCSSRenderingBorders::DrawBorders declare allBordersSolid where it is defined and make it const. r=dholbert
MozReview-Commit-ID: rdKiCDOplp
2017-08-07 12:47:19 +01:00
Jonathan Watt 43fbdd5fd0 Bug 1389010, part 2 - Move an early return in nsCSSBorderRenderer::DrawBorders up to avoid unnecessary work. r=dholbert
MozReview-Commit-ID: AfuBCfYs3S1
2017-08-07 10:17:57 +01:00
Jonathan Watt 92f10c8f9e Bug 1389010, part 1 - Rename allBordersSame to allBordersSameStyle to distinguish it from the other similar variables. r=dholbert
Also moves the declaration of tlBordersSame and brBordersSame to where they're used.

MozReview-Commit-ID: 4l9pVnWT6UH
2017-08-07 10:08:12 +01:00
Tooru Fujisawa bbe7998402 Bug 1356114 - Part 2: Consistently make the ends of dashed CSS borders a full dash if not connecting to a corner. r=jwatt 2017-08-06 00:26:58 +09:00
Tooru Fujisawa 64be738893 Bug 1356114 - Part 1: Change the code that optimizes away CSS border corner painting to ensure opposite sides have the same length. r=jwatt
See https://bugzilla.mozilla.org/show_bug.cgi?id=1356114#c8
for a diagram describing the old behavior.
2017-08-06 00:26:57 +09:00
Ryan Hunt 4f99dd56fd Bug 1382128 part 6 - Remove WrBorderSides, WrBorderRadius, WrBorderWidths, WrNinePatchDescriptors. r=kats
MozReview-Commit-ID: 7YkHoNs64T9
2017-07-19 01:56:20 -04:00
Ryan Hunt ed849c9399 Bug 1382128 part 2 - Remove WrPoint, WrSize, WrRect, WrMatrix, and WrColor. r=kats
MozReview-Commit-ID: 9koNScu4CyE
2017-07-18 18:32:46 -04:00
Ryan Hunt 9c7583cc1a Bug 1382128 part 1 - Use a namespace in webrender_bindings. r=kats
MozReview-Commit-ID: 3JTMa9Ix5S7
2017-06-27 19:20:36 -04:00
Kartikaya Gupta b8b3120020 Bug 1377169 - Turn gfxRect into a typedef. r=jrmuizel
One thing to note here is that the Scale function on gfxRect has a
different implementation than that in gfx::Rect which is replacing it.
The former just scales the width/height directly whereas the latter
scales the XMost/YMost and recomputes the width/height.

MozReview-Commit-ID: 5FImdIaNfC3
2017-07-05 11:22:00 -04:00
Ethan Lin 596418d7bd Bug 1372118 - Part2. Use new interface of CreateWebRenderCommands for non-image display items. r=jrmuizel, r=kats
MozReview-Commit-ID: BcmRjQhDEyf
2017-06-30 17:23:20 -07:00
sotaro 966edad229 Bug 1357734 - Change argument of DisplayListBuilder::PushBorder() to bypass compiler bug r=jrmuizel
Visual Studio 2015 Update 3 has a bug that PGO build generates movaps to unaligned address. The patch just bypasses the compiler bu
2017-06-30 16:22:25 -07:00
Kartikaya Gupta c4fd192cd9 Bug 1376215 - Stop exposing the WrClipRegionToken in WebRenderAPI.h APIs. r=jrmuizel
No functional changes intended in this patch. It merely simplifies the
additional patch that we'll need to update gecko past WR cset 0bf6655,
and saves some potential manual rebasing work.

MozReview-Commit-ID: Km8dBotP3NQ
2017-06-26 07:49:52 -04:00
Nicholas Nethercote a58025002f 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.
2017-06-22 17:08:53 +10:00
Alexis Beingessner 3117218f13 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 1b1d14e565 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 c6fbc5e17e 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
Alexis Beingessner 6ec49a9792 Bug 1361751 - Update gecko bindings to webrender to reflect changes in PR 1181. r=kats
MozReview-Commit-ID: Fxt4sNm4vxa
2017-05-08 13:52:16 -04:00
Ethan Lin d7211f7193 Bug 1362967 - Push clip region in WebRenderDisplayItemLayer. r=kats 2017-05-10 13:51:24 +08:00
Kartikaya Gupta 4fc4a30a0b Bug 1360246 - Update code to use StackingContextHelper::ToRelativeWr* instead of RelativeToParent. r=nical
This updates more code that was using RelativeToParent() to use the
stacking context helper's ToRelativeWr* functions instead. This get us
closer to breaking the assumption that the WR stacking context order maps
1:1 to the layer tree structure.

MozReview-Commit-ID: HQrbvCgPOW4
2017-05-03 08:48:08 -04:00
Kartikaya Gupta bb8dee32df Bug 1360246 - Propagate the StackingContextHelper to the rest of the displaylist-building code. r=nical
This propagates the StackingContextHelper to the rest of the code that
builds WR display items, because we will need it in future patches to
stop using RelativeToParent.

MozReview-Commit-ID: 3PlQrJRhH36
2017-05-03 08:48:08 -04:00
Wes Kocher 05341df9bd Merge autoland to central, a=merge
MozReview-Commit-ID: 2pgVZdnDKno
2017-04-27 12:44:03 -07:00
Kartikaya Gupta 52f3a8a0d9 Bug 1359842 - Convert RelativeToParent to deal with typed units. r=nical
As we are often converting from LayoutDevicePixel to LayerPixel types
in WebRenderDisplayItem code, I added a convenience overload of
RelativeToParent that takes a LayoutDeviceRect and returns a LayerRect,
even though this is a potential footgun if abused.

MozReview-Commit-ID: DABAWdOBsbV
2017-04-27 12:04:13 -04:00
Chris Peterson 77dd1c3b70 Bug 1356843 - Fix -Wcomma warnings in layout/. r=dholbert
clang's -Wcomma warning warns about suspicious use of the comma operator such as between two statements or to call a function for side effects within an expression. In addition to fixing the warnings, replace some char16_t(' ') casts of char literals with shorter UTF-16 character literals u' '.

layout/painting/FrameLayerBuilder.cpp:3647:31 [-Wcomma] possible misuse of comma operator here
layout/painting/FrameLayerBuilder.cpp:3657:41 [-Wcomma] possible misuse of comma operator here
layout/painting/nsCSSRenderingBorders.cpp:3336:33 [-Wcomma] possible misuse of comma operator here
layout/painting/nsCSSRenderingBorders.cpp:3336:60 [-Wcomma] possible misuse of comma operator here
layout/painting/nsCSSRenderingBorders.cpp:3337:33 [-Wcomma] possible misuse of comma operator here
layout/painting/nsCSSRenderingBorders.cpp:3337:60 [-Wcomma] possible misuse of comma operator here
layout/style/Declaration.cpp:808:41 [-Wcomma] possible misuse of comma operator here
layout/style/Declaration.cpp:812:42 [-Wcomma] possible misuse of comma operator here
layout/style/FontFaceSet.cpp:1118:60 [-Wcomma] possible misuse of comma operator here

MozReview-Commit-ID: 9tfcIsnnBwM
2017-04-09 21:11:45 -07:00
cku 222c45e4de Bug 1359844 - Ensure full decode be triggered after style-image was downloaded, r=mstange
In nsCSSRendering::PaintBorderWithStyleBorder:
DrawResult
nsCSSRendering::PaintBorderWithStyleBorder()
{
  if (aStyleBorder.IsBorderImageLoaded()) {
    (1)
  }

  (2)
}

At (1), we create a nsCSSBorderImageRenderer object. While creating it, we call
imgRenderer.PrepareImage() to ensure a full image decode at [1]. PrepareImage is
used in both bg-image/mask-image and border-image. The difference is, in
bg-image/mask-image painting path, we unconditionally use PrepareImage(in
nsCSSRendering::PrepareImageLayer), whereas in border-image painting path we
use it only after border-image was downloaded. This difference does cause a
problem. After border image was downloaded, the decoder will not do full decoding
since we did not ask for it, so there will be no repaint notification and no
chance to paint border-image again.

In this patch, I try to align the behavior between bg-image/mask-image and
border-image: always call nsImageRenderer::PrepareImage.

This is a generic fix for both stylo-enable and stylo-disable build. We do not
find this problem in reftest is because we use SYNC_DECODE in reftest harness, which
hides this race condition. When daily using firefox, if
nsCSSRendering::PaintBorderWithStyleBorder is called after border-image was
loaded, your program run into (1), border-image will be drawn correctly; In the
case that nsCSSRendering::PaintBorderWithStyleBorder is called before
border-image is loaded, your program run into (2), and you can only see
border-color.

[1]
https://hg.mozilla.org/mozilla-central/file/a6f35285bd1e/layout/painting/nsCSSRenderingBorders.cpp#l3598

MozReview-Commit-ID: 6pidHJdPG8I
2017-04-17 15:10:52 +08:00
Mason Chang 923ba01e43 Bug 1350182 - Enable button border display items by default. r=ethlin 2017-03-27 13:09:55 -07:00
Ethan Lin 08c81ccc64 Bug 1348755 - Part1. Handle clipping region for nsDisplayOutline. r=mattwoodrow 2017-03-27 16:17:45 +08:00
Ethan Lin f40db425a8 Bug 1346702 - Part2. Add CanCreateWebrenderCommands for checking if the render should create WR commands. r=mchang 2017-03-15 14:37:50 +08:00
Morris Tseng 77e5b9269c Bug 1341156 - Create nsCSSBorderImageRenderer. r=mattwoodrow
Basiclly refactor DrawBorderImage function for later re-use.

MozReview-Commit-ID: 9KIO6jp14M2
2017-03-13 11:46:04 +08:00
Morris Tseng 02d2f424f0 Bug 1341156 - Modify webrender_ffi and add OpDPPushBorderImage. r=kats r=ethlin
MozReview-Commit-ID: Ct63gy6nk3q
2017-03-13 11:46:03 +08:00
Ryan Hunt d7f00f1fa2 Bug 1345907 - Use clip region instead of clip rect r=kats 2017-03-09 11:57:06 -05:00
Ethan Lin 45b4c8e4e9 Bug 1344622 - Part1. Create WR commands in BorderRenderer. r=mattwoodrow 2017-03-09 16:58:38 +08:00
Lee Salzman 4b3e600e3b Bug 1303094 - remove the StrokeRect path for drawing dotted borders. r=mstange
MozReview-Commit-ID: 7zooPqCocco
2017-02-24 17:02:46 -05:00
Ting-Yu Lin 9feaa919bb Bug 1320014 Part 6 - Remove #define NS_CORNER_[TOP_LEFT/TOP_RIGHT/BOTTOM_RIGHT/BOTTOM_LEFT] r=mats
MozReview-Commit-ID: ERAwdxKZPf7
2017-01-04 18:15:30 +08:00
Ting-Yu Lin 9e0e51d458 Bug 1320014 Part 5 - Remove NS_FOR_CSS_CORNERS. r=mats
Remove NS_FOR_CSS_FULL_CORNERS implementation, and rename NS_FOR_CSS_CORNERS
to NS_FOR_CSS_FULL_CORNERS.

MozReview-Commit-ID: 2kmPUZDz3bj
2017-01-04 17:52:43 +08:00
Ting-Yu Lin e3a094c70a Bug 1320014 Part 3 - Move Corner from namespace mozilla::css into mozilla. r=mats
For those cpp files, it's sufficient to use Corner to refer to
mozilla::Corner.

MozReview-Commit-ID: JmDEJ3gGm8K
2017-01-04 17:18:49 +08:00