1620 Commits

Author SHA1 Message Date
Andy McFadden
5b4b94ca59 am 324738e7: am 440f4dfa: Merge "Fix pixel test" into klp-dev
* commit '324738e700c7cce33eec2e0d7f6f2e86a91def7a':
  Fix pixel test
2013-09-09 16:02:37 -07:00
Andy McFadden
440f4dfac8 Merge "Fix pixel test" into klp-dev 2013-09-09 22:55:35 +00:00
Chris Craik
ebc6c4bb17 am 177718a7: am f25fceef: Merge "Update doc for BitmapFactory.Options to include BitmapRegionDecoder" into klp-dev
* commit '177718a7d2fa22ee8b982b1c19d4db50beb5790b':
  Update doc for BitmapFactory.Options to include BitmapRegionDecoder
2013-09-09 14:14:46 -07:00
Andy McFadden
5d2cace4c5 Fix pixel test
A deprecated format was dropped entirely.

Bug 10666734

Change-Id: I6b64bd27db8965a1696d72387232b7de4bce6574
2013-09-09 10:19:44 -07:00
Chris Craik
352919efd0 Update doc for BitmapFactory.Options to include BitmapRegionDecoder
bug:9987022
Change-Id: I1a4e187e1c35a7758b70f69a0a25914597920e8f
2013-09-06 18:52:22 -07:00
Chet Haase
672fcd5c9a am 04f31501: am a9fa33b3: Merge "Change build version from KEY_LIME_PIE to KITKAT" into klp-dev
* commit '04f31501602a87ae9526983f4a92e623b4d68bb3':
  Change build version from KEY_LIME_PIE to KITKAT
2013-09-05 10:13:34 -07:00
Chet Haase
e8222dddaf Change build version from KEY_LIME_PIE to KITKAT
Issue #10631619 Change build version to KitKat

Change-Id: I6ad13f6169ad74204078d36929479998b498ad8b
2013-09-05 08:44:33 -07:00
Tim Murray
d2c576dba1 am 4965dbc3: am d2676f9b: Merge "Add YUV element convenience function." into klp-dev
* commit '4965dbc3149b1b1b4ff16b8da60cd31aed1c6e15':
  Add YUV element convenience function.
2013-09-05 00:41:18 -07:00
Tim Murray
d2676f9bd9 Merge "Add YUV element convenience function." into klp-dev 2013-09-05 07:36:43 +00:00
Tim Murray
932e78e990 Add YUV element convenience function.
Change-Id: Ie67dfba6a4c4f1913875ad9817c53e45d56809ae
2013-09-04 16:15:45 -07:00
Romain Guy
b6c4324fba am 9a160a52: am e182bfd4: Merge "Prevent NPE when cloning gradients Bug #10436856" into klp-dev
* commit '9a160a52b9edfc32e2fe444b3925534ae21ed5bc':
  Prevent NPE when cloning gradients Bug #10436856
2013-09-03 16:38:55 -07:00
Romain Guy
e182bfd4dc Merge "Prevent NPE when cloning gradients Bug #10436856" into klp-dev 2013-09-03 23:32:33 +00:00
Romain Guy
9622adf6e8 Prevent NPE when cloning gradients
Bug #10436856

Change-Id: I98cbce941a06842112b8caa3753a3fa32b227da9
2013-09-03 16:08:00 -07:00
Romain Guy
083cdca013 am 3d179241: am 3e8105e2: Merge "Update Bitmap.Config.ARGB_4444 documentation Bug #10510122" into klp-dev
* commit '3d179241bfbdeb4e293d2b773cfe6a586158d4b0':
  Update Bitmap.Config.ARGB_4444 documentation Bug #10510122
2013-09-03 14:49:41 -07:00
Romain Guy
3e8105e212 Merge "Update Bitmap.Config.ARGB_4444 documentation Bug #10510122" into klp-dev 2013-09-03 21:41:39 +00:00
Romain Guy
25ba1c8694 Update Bitmap.Config.ARGB_4444 documentation
Bug #10510122

ARGB_4444 is deprecated and always replaced with ARGB_8888.

Change-Id: I0da96216af701a7df00ad35913066fbfa997d790
2013-09-03 11:50:23 -07:00
Jason Sams
c850221500 am a2c13b3a: am c2b582c0: Merge "Cleanup API typo" into klp-dev
* commit 'a2c13b3a08b4b5a8f340cdedfd56557699dcb177':
  Cleanup API typo
2013-08-29 17:08:11 -07:00
Jason Sams
a49e89d228 Cleanup API typo
bug 10548782

Change-Id: I3654b7d1f8ea10eb51006804248cc2a7d20eabb0
2013-08-29 17:00:37 -07:00
Jason Sams
7407850c8a am 1a81725e: am 6b115980: Merge "Unhide USAGE_IO_INPUT functions" into klp-dev
* commit '1a81725ececffe68af466d1f8dcea56b86a84247':
  Unhide USAGE_IO_INPUT functions
2013-08-29 14:28:33 -07:00
Jason Sams
6b11598048 Merge "Unhide USAGE_IO_INPUT functions" into klp-dev 2013-08-29 21:24:28 +00:00
Jason Sams
42ef238208 Unhide USAGE_IO_INPUT functions
Change-Id: I9c1a7e5d65adee133b99b9a94729ab0b3d5a097f
2013-08-29 13:30:59 -07:00
Leon Scroggins III
f7142e3e8b am af172519: am 4b299312: Merge "Replace stream wrap-function w/ more specific ones" into klp-dev
* commit 'af1725190fbb8dd7c29726f8b7c072f3af734aed':
  Replace stream wrap-function w/ more specific ones
2013-08-29 10:24:21 -07:00
Leon Scroggins III
4b2993123b Merge "Replace stream wrap-function w/ more specific ones" into klp-dev 2013-08-29 17:12:01 +00:00
Alan Viverette
dd5745b7c7 am c6de5c74: am 236ae4f2: Merge "Set alpha channel correctly when recomputing gradient" into klp-dev
* commit 'c6de5c74e1e5dd92c011a1f060e26e10b15ffb77':
  Set alpha channel correctly when recomputing gradient
2013-08-28 14:06:38 -07:00
Alan Viverette
4d971c1fa0 Set alpha channel correctly when recomputing gradient
The alpha channel is applied by modulateAlpha(). Setting it to
mAlpha in ensureValidRect() locked the maximum alpha channel to
whatever value was set before layout. Setting it to BLACK
ensures it can be modulated later.

BUG: 10514848
Change-Id: If7a824410a66f1e9b648e20ee627bdf99a42ae78
2013-08-28 10:24:12 -07:00
Leon Scroggins III
ca32021b43 Replace stream wrap-function w/ more specific ones
The current stream wrapper returns a potentially incorrect
value for a call to getLength(), is typically copied into
another stream (not always in the same way), and doesn't
always take advantage of its underlying data (like when it
is an Asset). The overall goal of this CL is to provide the
caller with something that is ready to use, depending on
what is asked for. If a copy is desired, the copy is made
before being returned to the caller.

core/jni/android/graphics/Bitmap.cpp:

    Include SkStream.h, since it is no longer included by
    CreateJavaOutputStreamAdaptor's header file.

core/jni/android/graphics/BitmapFactory.cpp:

    Pass an SkStreamRewindable to decoding functions, as Skia
    decoders will be updated to only take an SkStreamRewindable
    (which makes more sense because they require rewinding).

    Call the more specific GetRewindableStream to get a
    rewindable stream.

    Remove copyAssetToStream which has been moved to Utils.

    In nativeDecodeAsset, pass forcePurgeable as allowPurgeable
    in doDecode. Technically the old code worked, but it checked
    the BitmapOptions again.

    Remove getFDSize, which is no longer used.

core/jni/android/graphics/BitmapRegionDecoder.cpp:

    Remove redundant buildSkMemoryStream. nativeNewInstanceFromStream
    now calls CopyJavaInputStream, which handles the copy.

    Copy the Asset directly, using common code, rather than creating
    an AssetStreamAdaptor to copy.

core/jni/android/graphics/CreateJavaOutputStreamAdaptor.cpp:
core/jni/android/graphics/CreateJavaOutputStreamAdaptor.h:

    Provide new interfaces to access data from a Java InputStream.
    The new interfaces are more specific about what type of stream
    is desired.

    Use forward declarations where possible.

    Remove doSize, which gives a misleading answer to the question
    of how long the entire stream is.

    TODO: Only call FindClass etc once.

core/jni/android/graphics/Movie.cpp:

    Check for an asset stream, and use it if possible. Then call
    GetRewindableStream if there is not an asset.
    Remove the memory leak. Call DeleteLocalRef to delete the
    allocated memory.

core/jni/android/graphics/Picture.cpp:

    Call the new interface.

core/jni/android/graphics/Utils.cpp:
core/jni/android/graphics/Utils.h:

    Make AssetStreamAdaptor inherit from SkStreamRewindable so it
    can be passed to Skia decoding functions once they require it.

    Add CopyAssetToStream (moved from BitmapFactory.cpp) so it can
    be used by multiple files.

graphics/java/android/graphics/BitmapFactory.java:

    Remove the call to mark, which is now done natively.

    Remove the BufferedInputStream. Mark/reset is now handled
    by native code.

    Allow decodeStream to handle a FileInputStream by using the
    FileDescriptor, if it is seekable. In decodeFileDescriptor,
    call nativeDecodeStream instead of decodeStream so this new
    functionality will not loop.

    Call setDensityFromOptions in decodeFileDescriptor.

graphics/java/android/graphics/BitmapRegionDecoder.java:

    Remove the BufferedInputStream. Mark/reset is now handled
    by native code.

TODO: ADD TESTS!

Requires https://googleplex-android-review.googlesource.com/#/c/344317/

BUG=https://b.corp.google.com/issue?id=8432093

Change-Id: I4419b70b3482325c98ecc673dbfc4613f1b18581
2013-08-27 15:28:58 -04:00
Tim Murray
61cc40bedc am 493a4c85: am c264e044: Merge "Add garbage collection hooks" into klp-dev
* commit '493a4c85cd6476a9b932a3146421eab0f662113a':
  Add garbage collection hooks
2013-08-26 15:11:11 -07:00
Tim Murray
c264e04400 Merge "Add garbage collection hooks" into klp-dev 2013-08-23 23:40:48 +00:00
Tim Murray
2f2472c42b Add garbage collection hooks
bug 10428172

Change-Id: I6365aa58bbc99aa134e1f261a5819e07a7d70fb0
2013-08-23 13:35:19 -07:00
Chris Craik
ed2515e853 am 908d9bfa: am dc70afae: Merge "Add inPremutiplied option to BitmapFactory.Options, functionality in Bitmap" into klp-dev
* commit '908d9bfafd576755d06f0566fc4cac3831476f63':
  Add inPremutiplied option to BitmapFactory.Options, functionality in Bitmap
2013-08-21 10:26:23 -07:00
Chris Craik
1abf5d6242 Add inPremutiplied option to BitmapFactory.Options, functionality in Bitmap
bug:2248948

Change-Id: I8fdd649332667598504a1076d5a447572bd53086
2013-08-20 18:29:33 -07:00
Eino-Ville Talvala
4e802a78e6 am 948e200e: am 9fac8a6a: Merge "Renderscript: Allow YUV_420_888 as a YUV type." into klp-dev
* commit '948e200e2d281c4547faac2f2a429c4aa73a010b':
  Renderscript: Allow YUV_420_888 as a YUV type.
2013-08-20 17:40:07 -07:00
Eino-Ville Talvala
9fac8a6a4a Merge "Renderscript: Allow YUV_420_888 as a YUV type." into klp-dev 2013-08-21 00:36:45 +00:00
Romain Guy
13656743cc Make color filters mutable
Change-Id: I3d035d24a75e09db13d136a22bd7dbd326d0ce36
2013-08-19 18:18:00 -07:00
Mike Klein
e78044a9e3 am bc37c299: am be925721: Remove comment that\'s only relevant for the underlying SkMatrix. Matrix has constructors.
* commit 'bc37c2991779b7c9372e5cbc3bd177273aae5644':
  Remove comment that's only relevant for the underlying SkMatrix.  Matrix has constructors.
2013-08-14 10:42:58 -07:00
Eino-Ville Talvala
ccadaf1eb4 Renderscript: Allow YUV_420_888 as a YUV type.
Change-Id: I1ed731103a49a814f9a049ecd01be98261b6d06b
2013-08-14 10:40:30 -07:00
Mike Klein
be925721a5 Remove comment that's only relevant for the underlying SkMatrix. Matrix has constructors.
bug: 8470620

Change-Id: I00063dc03f752955c27c73e9c59b0496a1795924
2013-08-14 13:13:51 -04:00
Romain Guy
e74d0d0bf2 am 820726d7: am 9955699d: Merge "Camera.applyToCanvas() now works with hardware canvases" into klp-dev
* commit '820726d7c6fa46203585025ac7fddff8f19ed0f3':
  Camera.applyToCanvas() now works with hardware canvases
2013-08-13 10:53:01 -07:00
Romain Guy
7fbbc3c9c3 Camera.applyToCanvas() now works with hardware canvases
Change-Id: I7f06b2a74ccc1941d51e12a0417028e094c1b669
2013-08-13 10:37:25 -07:00
Romain Guy
e95e421cbe am 98e50c50: am 964f2b30: Merge "Update Bitmap.createBitmap() documentation" into klp-dev
* commit '98e50c50f52b045d944df2eee0987d06eb1af07d':
  Update Bitmap.createBitmap() documentation
2013-08-12 11:20:12 -07:00
Romain Guy
790552b240 Update Bitmap.createBitmap() documentation
Change-Id: Ic2efed6cc03c8b2c2d9810b7ab645b0b98b91e1f
2013-08-12 11:10:27 -07:00
Fabrice Di Meglio
4362383027 am b945d80c: am 5af4edef: Merge "Fix bug #10205316 CTS (KLP): android.graphics tests are failing" into klp-dev
* commit 'b945d80c9bb91b90e48add2a4f665de02c63e28c':
  Fix bug #10205316 CTS (KLP): android.graphics tests are failing
2013-08-09 15:53:33 -07:00
Fabrice Di Meglio
5af4edef08 Merge "Fix bug #10205316 CTS (KLP): android.graphics tests are failing" into klp-dev 2013-08-09 18:11:33 +00:00
Romain Guy
40bac4107d am ac322988: am 00312300: Remove an unnecessary allocation
* commit 'ac322988339d98665eff9f5937caff9a4eadd9d2':
  Remove an unnecessary allocation
2013-08-09 06:07:18 -07:00
Jonathan Dixon
5abec6ec5f am de3ff4b4: am 42773328: Merge "Refactor Canvas.drawPicture() to delegate to Picture" into klp-dev
* commit 'de3ff4b4859a92a19d84b33f5a93a0b3454698e6':
  Refactor Canvas.drawPicture() to delegate to Picture
2013-08-09 06:06:55 -07:00
Romain Guy
003123004f Remove an unnecessary allocation
Also remove dead code from OpenGLRenderer.cpp

Change-Id: I7eb54ca19e77ee3c32f1fe9513a031e6b2e115cf
(cherry picked from commit 5c7d5ab878b26f855175a3305a14ac12fcacf25e)
2013-08-09 03:52:29 +00:00
Fabrice Di Meglio
41207bce2a Fix bug #10205316 CTS (KLP): android.graphics tests are failing
- fix null Shader case during copy

Related to https://googleplex-android-review.googlesource.com/#/c/336815/7

Change-Id: I920d6bb181ddb92d6f771e5060fd1858430e71ad
2013-08-08 19:11:34 -07:00
Jonathan Dixon
667fe1039f Refactor Canvas.drawPicture() to delegate to Picture
Bug: 9814370

To allow WebView.capturePicture() to return a subclass, we need to
ensure the subclass is always consulted when being drawn into a canvas.

Change-Id: Ia0357f95b6fafb3ac81e6bcfaef05739e619897a
2013-08-08 17:22:48 -07:00
Chris Craik
be6f592ce2 Merge "Better explain outWidth/Height use with inJustDecodeBounds" 2013-08-08 20:44:35 +00:00
Mathias Agopian
52a9a10b6b Clearly separate consumer and producer interfaces
Bug: 9265647
Change-Id: Ic68e91788d0a05251e1d2fb9f9d4de403c7099bf
2013-08-06 13:07:42 -07:00