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

68 Коммитов

Автор SHA1 Сообщение Дата
Morris Tseng 3e61e4b4cf Bug 1172796 - Part 7: Implements ImageBitmapRenderingContext. r=roc r=smaug
--HG--
extra : commitid : J5ynF4BHVHV
2015-12-18 14:52:17 +08:00
Matteo Ferretti a4a5938dc3 Bug 1212477 - Needs a way to access to <canvas>'s context (2d, webgl) from Anonymous Content API; r=roc;r=smaug 2015-11-15 14:48:32 +01:00
Nathan Froyd ce836868f3 Bug 1218488 - clarify buffer ownership for nsICanvasRenderingContextInternal::GetBuffer; r=Bas,baku
This patch started life as making ImageEncoder.cpp:EncodingRunnable not
use nsAutoArrayPtr, but the API effects rippled out from there.  On the
whole, I think using UniquePtr throughout has made the code clearer.
2015-10-26 14:31:12 -04:00
Olli Pettay fee6bc69e2 Bug 1215072 - throw in case dictionary initialization fails in canvas.getContext, r=baku 2015-10-18 14:14:22 +03:00
Nathan Froyd 01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Nathan Froyd 583afa0965 Bug 1207245 - part 3 - switch all uses of mozilla::RefPtr<T> to nsRefPtr<T>; r=ehsan
This commit was generated using the following script, executed at the
top level of a typical source code checkout.

 # Don't modify select files in mfbt/ because it's not worth trying to
 # tease out the dependencies currently.
 #
 # Don't modify anything in media/gmp-clearkey/0.1/ because those files
 # use their own RefPtr, defined in their own RefCounted.h.
find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    grep -v 'mfbt/RefPtr.h' | \
    grep -v 'mfbt/nsRefPtr.h' | \
    grep -v 'mfbt/RefCounted.h' | \
    grep -v 'media/gmp-clearkey/0.1/' | \
    xargs perl -p -i -e '
 s/mozilla::RefPtr/nsRefPtr/g; # handle declarations in headers
 s/\bRefPtr</nsRefPtr</g; # handle local variables in functions
 s#mozilla/RefPtr.h#mozilla/nsRefPtr.h#; # handle #includes
 s#mfbt/RefPtr.h#mfbt/nsRefPtr.h#;       # handle strange #includes
'

 # |using mozilla::RefPtr;| is OK; |using nsRefPtr;| is invalid syntax.
find . -name '*.cpp' -o -name '*.mm' | xargs sed -i -e '/using nsRefPtr/d'

 # RefPtr.h used |byRef| for dealing with COM-style outparams.
 # nsRefPtr.h uses |getter_AddRefs|.
 # Fixup that mismatch.
find . -name '*.cpp' -o -name '*.h'| \
    xargs perl -p -i -e 's/byRef/getter_AddRefs/g'
2015-10-18 00:40:10 -04:00
Phil Ringnalda dc7a4cc45e Back out changeset 09e059daabae (bug 1215072) for adding a permaorange-on-b2g test
CLOSED TREE
2015-10-16 18:42:41 -07:00
Olli Pettay 2b21892477 Bug 1215072 - throw in case dictionary initialization fails in canvas.getContext, r=baku
--HG--
extra : rebase_source : 006bfed7cfec46e6150ee15135de08941283dbb7
2015-10-16 22:52:11 +03:00
Jed Davis b36bf70608 Bug 1213491 - Change CanvasRenderingContext2D::ContextState::clipsPushed to an nsTArray. r=nical 2015-10-09 16:20:00 +02:00
Milan Sreckovic d781f5c2bd Bug 1205900 - Compare context and canvas element sizes before extracting the data. r=gwright 2015-10-02 09:18:26 +02:00
Matt Woodrow 469ca70375 Bug 1206161 - Make sure the DrawTarget is available when creating a CanvasLayer so that we can check for SkiaGL. r=Bas
--HG--
extra : rebase_source : 2d011ee3dbceecfa11a27fc1e1a65d7ec5080f85
2015-09-23 20:30:06 -04:00
Andreas Pehrson 37ac1b6da7 Bug 1161913 - Part 1 - Add invalidation state for CaptureStream to Canvas and Contexts. r=mt
--HG--
extra : transplant_source : %C0%AFU%9CA%E9b%28%11%E0%EF%A6%81%9EZF9%5D%F3j
2015-09-17 11:37:05 +08:00
Markus Stange 183a73b7d1 Bug 1164766 - Clean up error checking in CanvasRenderingContext2D. r=mats
--HG--
extra : rebase_source : a71e00f5a888e62a4d3e879ffff0e9c38a9424fa
2015-07-14 16:59:12 -04:00
Kaku Kuo 976d0f9acf Bug 1044102 - Part 2 - Support ImageBitmap as CanvasImageSource. r=smaug
--HG--
extra : rebase_source : e53ca97680dd12e0f1be217b4396a443b04bbeee
2015-07-30 20:49:00 +02:00
Matt Woodrow c666419307 Bug 1150944 - Remove objects that have been unlinked by the cycle collector from the demotable context list. r=ehsan 2015-07-29 16:35:55 -04:00
Wes Kocher ec1078c65a Backed out 6 changesets (bug 1150944, bug 1034370) for build failures in WebGLContext.cpp CLOSED TREE
Backed out changeset e2a6160242e5 (bug 1150944)
Backed out changeset 1c510537d20b (bug 1150944)
Backed out changeset 7ae813666ed5 (bug 1150944)
Backed out changeset 2f29ac2e31cd (bug 1150944)
Backed out changeset bf7681b1567e (bug 1150944)
Backed out changeset 79c6b8d014d2 (bug 1034370)
2015-07-29 14:16:17 -07:00
Matt Woodrow 8d1da3c19e Bug 1150944 - Remove objects that have been unlinked by the cycle collector from the demotable context list. r=ehsan 2015-07-29 16:35:55 -04:00
Jeff Gilbert 2e4a1c88ee Bug 1182371 - Misc WebGL cleanup. - r=kamidphish 2015-07-14 17:37:28 -07:00
Birunthan Mohanathas a8939590de 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
Birunthan Mohanathas ea9f64788c Bug 1182824 - Part 2: Make ContextState::dash a nsTArray. r=mattwoodrow 2015-07-12 23:19:12 -07:00
Nathan Froyd 974d8120f2 Bug 1161627 - part 2 - machine-convert TemporaryRef<T> to already_AddRefed<T>; r=ehsan
This conversion was done with the script:

  find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl' | \
    egrep -v 'cairo-win32-refptr.h|RefPtr.h|TestRefPtr.cpp' | \
    xargs sed -i -e 's/mozilla::TemporaryRef</already_AddRefed</g' \
                 -e 's/TemporaryRef</already_AddRefed</g'

Manual fixups were performed in the following instances:

- We handled mfbt/RefPtr.h manually so as to not convert TemporaryRef itself
  into already_AddRefed.

- The following files had explicit Move() calls added to make up for the lack
  of a copy constructor on already_AddRefed:

  dom/base/ImageEncoder.cpp
  dom/media/MediaTaskQueue.{h,cpp}
  dom/media/webaudio/PannerNode.cpp

- A redundant overload for MediaTaskQueue::Dispatch was deleted.

- A few manual fixups were required in mfbt/tests/TestRefPtr.cpp.

- Comments, using declarations, and forward declarations relating to
  TemporaryRef in dom/canvas/ and gfx/layers/ were changed to refer to
  already_AddRefed.
2015-06-17 10:00:52 -04:00
Bas Schouten 7801f65a75 Bug 1167235 - Part 3: Switch CanvasRenderingContext2D to use the new BufferProvider API. r=nical 2015-06-19 01:07:21 +02:00
Markus Stange 659dc83478 Bug 1163124 - The initial value of the canvas filter property should be "none". r=roc
--HG--
extra : rebase_source : 2f7119ab6e9168a24ce2b0b419c951d5d803ad1e
extra : histedit_source : cecfe84959f6ab6c9fb3ca47ab721b3c26f63023
2015-05-28 17:08:13 -04:00
David Anderson 46807997bc Add an API for snapshotting widgets as they are presented by the operating system. (bug 1167477, r=mattwoodrow, dom r=khuey)
--HG--
extra : rebase_source : f750028018bc04eddf31a1e3810e013b1d8f1631
2015-06-04 14:19:06 -07:00
Carsten "Tomcat" Book c468515673 Backed out changeset 45998275f423 (bug 857895) 2015-05-26 08:59:47 +02:00
Matt Woodrow 90b9016810 Bug 857895 - Run canvas rendering asynchronously on OSX. r=Bas,bholley
--HG--
extra : rebase_source : ae761425a6409a147f6e3492c30ac43452108750
2013-04-09 16:51:44 +12:00
Andrea Marchesini 7fb8486168 Bug 1167423 - patch 4 - Handle return values of FallibleTArray functions in CanvasRenderingContext2D, r=smaug 2015-05-25 12:50:15 +01:00
Matt Woodrow 9b0ee77669 Backout e01d80922187 (Bug 857895) for causing crashes
--HG--
extra : rebase_source : d014633fc9d5965fcae6b24a5171809edf7840ed
2015-05-19 10:50:41 +12:00
Matt Woodrow 51ff272372 Bug 857895 - Run canvas rendering asynchronously on OSX. r=Bas,bholley 2013-04-09 16:51:44 +12:00
Phil Ringnalda 0080559c75 Back out 4f682f01262e (bug 857895) for widespread destruction
CLOSED TREE
2015-05-11 19:53:28 -07:00
Matt Woodrow df87b4ccca Bug 857895 - Run canvas rendering asynchronously on OSX. r=Bas,bholley 2013-04-09 16:51:44 +12:00
Carsten "Tomcat" Book 4bb7f96375 Backed out changeset 41c408a2662e (bug 857895) for bustage on a CLOSED TREE 2015-05-11 10:28:56 +02:00
Matt Woodrow a8b275cbb0 Bug 857895 - Run canvas rendering asynchronously on OSX. r=Bas,bholley
--HG--
extra : rebase_source : f94b65530bfb40298ed6ea1f22d607b0fc8b464f
2013-04-09 16:51:44 +12:00
Andrea Marchesini cb54385682 Bug 1156632 - Remove unused forward class declarations - patch 4 - netwerk image and dom, r=ehsan 2015-04-22 08:29:20 +02:00
Ehsan Akhgari 883849ee32 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Boris Zbarsky dc24477d79 Bug 1117172 part 3. Change the wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv
The only manual changes here are to BindingUtils.h, BindingUtils.cpp,
Codegen.py, Element.cpp, IDBFileRequest.cpp, IDBObjectStore.cpp,
dom/workers/Navigator.cpp, WorkerPrivate.cpp, DeviceStorageRequestChild.cpp,
Notification.cpp, nsGlobalWindow.cpp, MessagePort.cpp, nsJSEnvironment.cpp,
Sandbox.cpp, XPCConvert.cpp, ExportHelpers.cpp, and DataStoreService.cpp.  The
rest of this diff was generated by running the following commands:

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObject\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx|aContext|aCtx|js), [^,)]+)\)/\1, aGivenProto)/g'
2015-03-19 10:13:33 -04:00
Milan Sreckovic 5fa1db7949 Bug 1129147 - Part 1. Take CanvasPath into a separate file, to avoid circular dependency. r=roc
--HG--
rename : dom/canvas/CanvasRenderingContext2D.h => dom/canvas/CanvasPath.h
2015-03-03 10:57:51 -05:00
Masatoshi Kimura 86502e6537 Bug 1111290 - Part 2: Non-mechanical changes. r=waldo 2015-01-26 07:22:08 +09:00
Florian Scholz e486771afa Bug 1119527 - Implement canvas clearHitRegions. r=gw280, r=bz 2015-01-09 09:41:00 -05:00
Ehsan Akhgari 49d8a4b2ed Bug 1118547 - Mark virtual overridden functions as MOZ_OVERRIDE in dom/canvas; r=baku 2015-01-07 10:19:12 -05:00
Jonathan Kew a896eab424 Bug 1108616 - part 2 - Add an explicitLanguage field to gfxFontStyle, and pass it down from callers. r=dbaron 2014-12-23 12:50:10 +00:00
Milan Sreckovic a0b87c69e4 Bug 1099148 - Implement Canvas2D resetTransform method. r=gw280,bz 2014-11-18 12:11:12 -05:00
George Wright 1b0520dc5b Bug 1042291 - Add a CanvasDrawObserver which observes the first few seconds/frames of a Canvas2D's lifetime to determine using a heuristic if it should be software or GPU backed. r=gw280, r=snorp 2014-09-10 16:15:43 -04:00
chiajung hung 4b10f218ab Bug 880114 - Enhance render video-to-SkiaGL performance by GPU-based color space conversioni, r=gw280 2014-11-11 21:14:00 +01:00
Del Valle 7f5ad3fae6 Bug 1092555 - Replace some occurences of gfxIntSize by gfx::IntSize in CanvasRenderingContext2D. r=nical" 2014-11-04 14:00:36 +01:00
Michael Wu 266574a85c Bug 1081926 - Fallback on a simple image lookup when the normal lookup fails. r=mattwoodrow 2014-10-29 16:17:00 +01:00
Jeff Gilbert 9b0f8d2661 Bug 1082850 - Query for SkiaGL by asking mTarget. - r=snorp 2014-10-14 19:25:57 -07:00
jdashg 9b7291ca7a Bug 1066280 - Remove SurfaceStream. - r=kamidphish,mattwoodrow 2014-10-07 21:15:39 -07:00
Markus Stange 2e5f53808f Bug 927892 - Canvas filter drawing support. r=Bas
--HG--
extra : rebase_source : ae76ccd952f17e4dffaf1c7725926241bd2ab233
2014-09-23 17:47:20 -04:00
Markus Stange 6cc62b90f4 Bug 927892 - Split shadow drawing out of AdjustedTarget. r=Bas
--HG--
extra : rebase_source : cd02f322140f672e396c58330780ac085a97f103
2014-09-23 17:47:20 -04:00