Commit Graph

106 Commits

Author SHA1 Message Date
David Anderson
0ffe29c290 Add software mix-blend mode support to the D3D9 compositor. (bug 1243071 part 3, r=bas,mattwoodrow) 2016-02-01 16:28:00 -08:00
David Anderson
4380dd61e8 Use double precision when computing the backdrop copy rect. (bug 1243071 part 2, r=mattwoodrow) 2016-02-01 16:27:49 -08:00
David Anderson
7d1991aece Remove Compositor::mRenderBounds. (bug 1243071 part 1, r=mattwoodrow) 2016-02-01 16:27:38 -08:00
Nicholas Nethercote
241b89e77e Bug 1239864 (part 4) - Use the new rect iterators in gfx/. r=nical. 2016-01-18 17:20:58 -08:00
David Anderson
810203f4dc Fix the backdrop copy rect in nested mix-blend containers. (bug 1241273, r=mstange) 2016-01-21 15:20:29 -08:00
David Anderson
7cd70b1807 Backed out changeset f16cb2a018a8 2016-01-21 15:19:50 -08:00
David Anderson
cd062f3c1a Fix the backdrop copy rect in nested mix-blend containers. (bug 1241273, UNREVIEWED) 2016-01-21 15:18:48 -08:00
David Anderson
e900cb0f19 When mix-blending, only copy intersecting backdrop pixels. (bug 1235995 part 2, r=mattwoodrow) 2016-01-19 13:28:08 +07:00
Botond Ballo
5458631b3c Bug 1069417 - Generalize Matrix4x4 into Matrix4x4Typed<SourceUnits, TargetUnits>. r=Bas
Matrix4x4 remains a typedef for Matrix4x4Typed<UnknownUnits, UnknownUnits>.

No client code needed changing, except for forward-declarations of Matrix4x4
as a class (since it's now a typedef).
2015-12-02 18:52:00 -05:00
Kartikaya Gupta
6d58d905c8 Bug 1223486 - Ensure WrapTexCoord returns 0.0 instead of 1.0 when given a negative whole number. r=Bas 2015-11-19 10:49:31 -05:00
Nicholas Nethercote
3f2b2ab546 Bug 1223690 - Remove implicit Rect conversions. r=jrmuizel.
gfxRect can be implicitly constructed from IntRect, which hides a number of
implicit conversion points, makes Moz2Dification harder, and has some
surprising effects.

This patch removes the implicit constructor and replaces it with an explicit
conversion function:

  gfxRect ThebesRect(const IntRect&)

This is the obvious outcome of removing the constructor.

But there is also a second, less obvious outcome: currently we do a number of
IntRect-to-Rect conversions using ToRect(), which (surprisingly) works because
it turns into an implicit IntRect-to-gfxRect conversion (via the implicit
constructor) combined with an explicit gfxRect-to-Rect conversion (via
ToRect()). I.e. we do two conversions, going from a Moz2D type to a Thebes
type and back to a Moz2D type!

So this patch also changes these conversion. It moves this existing function:

  Rect ToRect(const IntRect&)

from gfx2DGlue.h -- where it doesn't really belong because it doesn't involve
any Thebes types -- to gfx/2d/Rect.h, templatifying and renaming it as
IntRectToRect() in the process.

The rest of the patch deals with fall-out from these changes. The call sites
change as follows:

- IntRect-to-gfxRect conversions:
  - old: implicit
  - new: ThebesRect()

- IntRect-to-Rect conversions:
  - old: ToRect()
  - new: IntRectToRect()
2015-11-11 14:23:14 -08:00
Matt Woodrow
6259093aa9 Bug 1205913 - Differentiate YCbCr, NV12 and RGB textures when drawing layer borders. r=nical 2015-10-23 12:51:20 +13:00
Carsten "Tomcat" Book
974338b290 Backed out changeset 94df1f873f5c (bug 1205913) 2015-10-29 13:52:14 +01:00
Matt Woodrow
ea09308ea1 Bug 1205913 - Differentiate YCbCr, NV12 and RGB textures when drawing layer borders. r=nical 2015-10-23 12:51:20 +13:00
Sotaro Ikeda
a8e31215e6 Bug 1210182 - Implement GrallocTextureHostBasic r=nical 2015-10-26 22:43:07 -07:00
David Anderson
89329365b2 Remove the static compositor backend variable. (bug 1211109 part 2, r=mattwoodrow) 2015-10-05 23:39:00 -07:00
Benoit Girard
1fa8d9718d Bug 1186159 - Add an APZ minimap. r=kats 2015-07-23 11:29:22 -04:00
Birunthan Mohanathas
a29151dc87 Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Thibaud Backenstrass
93145c402c Bug 1158122 - Remove the remaining occurences of nsIntRect in gfx/layers. r=nical 2015-05-07 11:07:53 +02:00
Milan Sreckovic
4dfe10bcd3 Bug 1122722 - Clean up asserts for compositor threads. r=nical 2015-01-27 15:52:44 -05:00
Benoit Girard
e1b6890aa0 Bug 1068190 - Part 1: Add foundation for compositor unit tests. r=mstange 2015-01-14 17:24:09 -05:00
Carsten "Tomcat" Book
45e1979ee5 Backed out changeset 48667a14f94d (bug 1092360) for test bustage / crashes on a CLOSED TREE 2014-11-14 08:14:22 +01:00
Benoit Girard
b53c7a7ac8 Bug 1092360 - Avoid redundant framebuffer switches. r=jrmuizel 2014-11-12 17:39:17 -05:00
Benoit Girard
d85a68ba81 Bug 1089380 - Remove ClipRectInLayersCoordinates. r=mattwoodrow 2014-10-31 16:34:30 -04:00
Benoit Girard
00fbd63ee2 Backout 60fe2b1ab1ba for split-opacity-layers-1.html reftest failure. 2014-11-03 13:37:54 -05:00
Benoit Girard
7bc61c962d Bug 1089380 - Remove ClipRectInLayersCoordinates. r=mattwoodrow 2014-10-31 16:34:30 -04:00
Jeff Gilbert
bbec5be4ff Bug 1088417 - Make asserts fuzzy where they're failing. - r=nical 2014-10-24 13:36:01 -07:00
Jeff Gilbert
7676277735 Bug 1088417 - DecomposeIntoNoRepeatRects for D3D11. - r=nical 2014-10-23 17:08:06 -07:00
Jeff Muizelaar
4f3610dd6b Bug 1064479. Redo how screen rotation is implemented on B2G/Layers. r=nical,mwoodrow
Currently we use a world transform on the LayerManager. This gets passed to the
screen render target which adjusts the gl transform to accomplish the rotation.
This causes a lot of the system to have to know about the transform.

Instead we can just bake the transform into the root layer's shadow transform.
Everything now mostly just works.
2014-09-10 15:59:00 -04:00
Benoit Girard
662b5d357d Bug 1010584 - Cull in ContainerLayerComposite. r=mwoodrow 2014-08-27 18:46:55 -04:00
Benoit Girard
1acbaee0d2 Bug 1010584 - Part 1: Introduce RenderTargetPixel. r=mwoodrow 2014-07-30 14:36:15 -04:00
Benoit Jacob
d8f30bb270 Bug 987311 - 6/6 - Convert the rest of CompositorTypes.h to typed enums, final manual changes - r=nical 2014-04-25 22:34:06 -04:00
Benoit Jacob
6f2d2f66cd Bug 987311 - 5/6 - Convert the rest of CompositorTypes.h to typed enums, auto regex changes - r=nical
find gfx/layers -type f | grep -v CompositorTypes.h | xargs sed -i 's/\(^\|[^A-Za-z0-9_]\)DIAGNOSTIC_\(NONE\|TILE_BORDERS\|LAYER_BORDERS\|BIGIMAGE_BORDERS\|FLASH_BORDERS\)\($\|[^A-Za-z0-9_]\)/\1DiagnosticTypes::\2\3/g'
find gfx/layers -type f | grep -v CompositorTypes.h | xargs sed -i 's/DiagnosticTypes\:\:NONE/DiagosticTypes::NO_DIAGNOSTIC/g'
find gfx/layers -type f | grep -v CompositorTypes.h | xargs sed -i 's/\(^\|[^A-Za-z0-9_]\)DIAGNOSTIC_\(IMAGE\|CONTENT\|CANVAS\|COLOR\|CONTAINER\|TILE\|BIGIMAGE\|COMPONENT_ALPHA\|REGION_RECT\)\($\|[^A-Za-z0-9_]\)/\1DiagnosticFlags::\2\3/g'
find gfx/layers -type f | grep -v CompositorTypes.h | xargs sed -i 's/\(^\|[^A-Za-z0-9_]\)EFFECT_\(MASK\|MAX_SECONDARY\|RGB\|YCBCR\|COMPONENT_ALPHA\|SOLID_COLOR\|RENDER_TARGET\|MAX\)\($\|[^A-Za-z0-9_]\)/\1EffectTypes::\2\3/g'
find gfx/layers -type f | grep -v CompositorTypes.h | xargs sed -i 's/\(^\|[^A-Za-z0-9_]\)TEXTURE_\(CONTENT\|SHMEM\|YCBCR\|SHARED_GL\|SHARED_GL_EXTERNAL\|STREAM_GL\|FALLBACK\)\($\|[^A-Za-z0-9_]\)/\1DeprecatedTextureClientType::\2\3/g'
find gfx/layers -type f | grep -v CompositorTypes.h | xargs sed -i 's/\(^\|[^A-Za-z0-9_]\)\(BUFFER_UNKNOWN\|BUFFER_IMAGE_SINGLE\|BUFFER_IMAGE_BUFFERED\|BUFFER_BRIDGE\|BUFFER_CONTENT\|BUFFER_CONTENT_DIRECT\|BUFFER_CONTENT_INC\|BUFFER_TILED\|BUFFER_SIMPLE_TILED\|COMPOSITABLE_IMAGE\|COMPOSITABLE_CONTENT_SINGLE\|COMPOSITABLE_CONTENT_DOUBLE\|BUFFER_COUNT\)\($\|[^A-Za-z0-9_]\)/\1CompositableType::\2\3/g'
find gfx/layers -type f | grep -v CompositorTypes.h | xargs sed -i 's/CompositableType\:\:COMPOSITABLE_/CompositableType::/g'
find gfx/layers -type f | grep -v CompositorTypes.h | xargs sed -i 's/\(^\|[^A-Za-z0-9_]\)TEXTURE_HOST_\(DEFAULT\|TILED\|COPY_PREVIOUS\)\($\|[^A-Za-z0-9_]\)/\1DeprecatedTextureHostFlags::\2\3/g'
find gfx/layers -type f | grep -v CompositorTypes.h | xargs sed -i 's/\(^\|[^A-Za-z0-9_]\)Texture\(Front\|Back\|OnWhiteFront\|OnWhiteBack\)\($\|[^A-Za-z0-9_]\)/\1TextureIdentifier::\2\3/g'
find gfx/layers -type f | grep -v CompositorTypes.h | xargs sed -i 's/\(^\|[^A-Za-z0-9_]\)\(OPEN_NONE\|OPEN_READ\|OPEN_WRITE\|OPEN_READ_WRITE\|OPEN_READ_ONLY\|OPEN_WRITE_ONLY\)\($\|[^A-Za-z0-9_]\)/\1OpenMode::\2\3/g'
find gfx/layers -type f | grep -v CompositorTypes.h | xargs sed -i 's/\(^\|[^A-Za-z0-9_]\)\(MaskNone\|Mask2d\|Mask3d\|NumMaskTypes\)\($\|[^A-Za-z0-9_]\)/\1MaskType::\2\3/g'
find gfx -type f | xargs sed -i 's/Diagostic/Diagnostic/g'
2014-04-25 22:34:06 -04:00
Blair McBride
2628f554b1 Backed out 9 changesets (bug 987311, bug 989027, bug 989144). r=sheriff
Backed out changeset 046c061d91c2 (bug 989144)
Backed out changeset 3f1b41adeaef (bug 987311)
Backed out changeset 8d5a171564bd (bug 987311)
Backed out changeset dcc0d016de7a (bug 987311)
Backed out changeset 27f338fbc835 (bug 989027)
Backed out changeset 4a67f5144ea4 (bug 989027)
Backed out changeset 62ba0a377450 (bug 987311)
Backed out changeset 6a2542a5c865 (bug 987311)
Backed out changeset 1dfd9a457f34 (bug 987311)
2014-04-27 19:45:08 +12:00
Benoit Jacob
5be322e300 Bug 987311 - 6/6 - Convert the rest of CompositorTypes.h to typed enums, final manual changes - r=nical 2014-04-25 22:34:06 -04:00
Benoit Jacob
3b4f604917 Bug 987311 - 5/6 - Convert the rest of CompositorTypes.h to typed enums, auto regex changes - r=nical 2014-04-25 22:34:06 -04:00
Nicolas Silva
9878457313 Bug 993004 - Fix the clipping of tiles when the screen is rotated. r=botond 2014-04-25 13:38:17 +02:00
Carsten "Tomcat" Book
215d4a4350 Backed out changeset 3d116167774f (bug 993004) for bustage on a CLOSED TREE 2014-04-25 12:19:45 +02:00
Nicolas Silva
7023ba146a Bug 993004 - Fix the clipping of tiles when the screen is rotated. r=botond 2014-04-25 11:51:17 +02:00
Botond Ballo
c9e19ac761 Bug 984490 - Use the correct clip rect when determining whether to skip rendering a tile. r=nical 2014-04-02 03:23:04 -04:00
Nicolas Silva
74681a5e4a Bug 984338 - Add a pref to flash layer borders when they are created. r=jrmuizel 2014-03-25 17:54:39 +01:00
Bill McCloskey
1d861f4f18 Back out assertion in bug 963952 for crashes 2014-02-14 13:35:49 -08:00
Bill McCloskey
dd0fa98cbb Bug 963952 - [e10s] Don't use basic compositor when using D3D11 compositor (r=mattwoodrow) 2014-02-13 08:53:50 -08:00
Benoit Jacob
49238a878d Bug 959448 - Convert most of LayersTypes.h to typed enums - r=nrc
find content/media dom/ipc widget/ gfx/tests gfx/ipc/ gfx/layers/ layout/ -type f | xargs sed -i 's/\(^\|[^A-Za-z0-9_]\)LAYERS_\(NONE\|BASIC\|OPENGL\|D3D9\|D3D10\|D3D11\|CLIENT\|LAST\)\($\|[^A-Za-z0-9_]\)/\1LayersBackend::LAYERS_\2\3/g'

find widget gfx/layers/ layout/ -type f | xargs sed -i 's/\(^\|[^A-Za-z0-9_]\)BUFFER_\(NONE\)\($\|[^A-Za-z0-9_]\)/\1BufferMode::BUFFER_\2\3/g'

find widget gfx/layers/ layout/ -type f | xargs sed -i 's/\(^\|[^A-Za-z0-9_]\)BUFFER_\(BUFFERED\)\($\|[^A-Za-z0-9_]\)/\1BufferMode::\2\3/g'

find gfx/layers/ layout/ -type f | xargs sed -i 's/\(^\|[^A-Za-z0-9_]\)CLIP_\(DRAW\|DRAW_SNAPPED\)\($\|[^A-Za-z0-9_]\)/\1DrawRegionClip::\2\3/g'

find gfx/layers/ layout/ -type f | xargs sed -i 's/\(^\|[^A-Za-z0-9_]\)CLIP_\(NONE\)\($\|[^A-Za-z0-9_]\)/\1DrawRegionClip::CLIP_\2\3/g'

find gfx/layers/ layout/ -type f | xargs sed -i 's/\(^\|[^A-Za-z0-9_]\)SURFACE_\(NONE\|OPAQUE\|SINGLE_CHANNEL_ALPHA\|COMPONENT_ALPHA\)\($\|[^A-Za-z0-9_]\)/\1SurfaceMode::SURFACE_\2\3/g'

find gfx/ipc/ gfx/layers/ layout/ -type f | xargs sed -i 's/\(^\|[^A-Za-z0-9_]\)SCALE_\(STRETCH\|SENTINEL\)\($\|[^A-Za-z0-9_]\)/\1ScaleMode::\2\3/g'

find gfx/ipc/ gfx/layers/ layout/ -type f | xargs sed -i 's/\(^\|[^A-Za-z0-9_]\)SCALE_\(NONE\)\($\|[^A-Za-z0-9_]\)/\1ScaleMode::SCALE_\2\3/g'
2014-01-23 13:26:41 -05:00
Daniel Holbert
1907354c71 Bug 957859: Add "f" suffix to some numeric literals in Compositor.cpp and ContainerLayerComposite.cpp, to fix MSVC C4305 warnings. r=nical 2014-01-09 06:26:19 -08:00
Matt Woodrow
e0cd223ec5 Bug 35380 - Part 5: Remove aOffset from everywhere. r=nrc 2013-11-07 22:53:08 +13:00
Matt Woodrow
2b002c489e Bug 930033 - Draw layer borders for the bounding box of the visible region for ThebesLayers. r=nical 2013-10-24 16:35:29 +02:00
Nicholas Cameron
6512a2bbc4 Bug 923351. Make layers borders more visible. r=nical 2013-10-11 06:36:24 +13:00
Nicholas Cameron
6ff5d55180 Bug 903816. Include-what-you-use for gfx/layers. r=roc 2013-08-12 11:17:23 +12:00
Nicolas Silva
9de8449f4c Bug 899667 - Make layer borders more readable. r=BenWa 2013-08-03 00:50:17 +02:00