866 Commits

Author SHA1 Message Date
Leon Scroggins III
847514499f am 3523e4fc: am efe085ff: Merge "Handle bad ninepatch data." into lmp-mr1-dev
* commit '3523e4fcb3c74a5dee2f4497e2b8ec7b9e2b5e57':
  Handle bad ninepatch data.
2015-01-27 18:33:46 +00:00
Leon Scroggins III
a730ef3f77 Handle bad ninepatch data.
Changes proposed by Ben Hawkes of Google Project Zero.

NinePatchPeeker.cpp:
Instead of asserting, return false for bad data.

ResourceTypes.h:
Store ninepatch values as unsigned.

BUG:19151999
Change-Id: Ibe35e7569f632c6bb8a34a7701e26bb6ed547ec2
2015-01-27 16:41:16 +00:00
Chris Craik
04b633c526 am 0de2eca5: am 112e35b4: Merge "Update generationId on bitmaps when decoded into by BitmapRegionDecoder" into lmp-mr1-dev
* commit '0de2eca5fc439e2622cc0cc5a54cd9a5938f67c6':
  Update generationId on bitmaps when decoded into by BitmapRegionDecoder
2015-01-15 23:15:56 +00:00
Chris Craik
112e35b464 Merge "Update generationId on bitmaps when decoded into by BitmapRegionDecoder" into lmp-mr1-dev 2015-01-15 23:04:15 +00:00
Chris Craik
3b47713b26 Update generationId on bitmaps when decoded into by BitmapRegionDecoder
bug:18921087

This fixes issues where bitmaps are cached as textures, and not
reuploaded when reused by BitmapRegionDecoder, showing stale content.

Change-Id: I7626fd6acd36d8e38723689734855ce9154eb8c8
2015-01-14 16:55:34 -08:00
Vladimir Marko
152d7282a4 Check for OOM in BitmapFactory's getMimeTypeString().
Bug: 18909596

(cherry picked from commit 7ab249a18e08bfefb8c2d60af1fb668c67ba4368)

Change-Id: Ie7be228442876d47faf37e3f664e378253dab6e3
2015-01-07 11:50:04 +00:00
Vladimir Marko
4e2986940b am bf31cb6b: am 8371f2e3: Merge "Check for OOM in BitmapFactory\'s getMimeTypeString()."
* commit 'bf31cb6be4290ce161d99a2a70c318f665a14a77':
  Check for OOM in BitmapFactory's getMimeTypeString().
2015-01-07 10:30:44 +00:00
Vladimir Marko
7ab249a18e Check for OOM in BitmapFactory's getMimeTypeString().
Bug: 18909596
Change-Id: If65fe45f5fd569a99a0cae1d31117af262bca430
2015-01-06 18:40:08 +00:00
Narayan Kamath
721d0994dc am f60b2d40: am 024191b5: Merge "Fix comment. It should be \'or\' not \'of\'."
* commit 'f60b2d40b0b8dea2c83335c00fd7767008aa0abe':
  Fix comment.  It should be 'or' not 'of'.
2015-01-06 10:16:23 +00:00
Narayan Kamath
024191b57f Merge "Fix comment. It should be 'or' not 'of'." 2015-01-06 09:46:17 +00:00
Derek Sollenberger
203c817180 am c1a2f38c: am 4d9da135: Merge "Update AndroidPixelRef to prevent VM from cleaning up memory prematurely." into lmp-mr1-dev
* commit 'c1a2f38ce0447b005d0cde6836857f451af84dc6':
  Update AndroidPixelRef to prevent VM from cleaning up memory prematurely.
2014-12-04 21:46:39 +00:00
Derek Sollenberger
f29d5a5b21 Update AndroidPixelRef to prevent VM from cleaning up memory prematurely.
bug:18306529
Change-Id: I1ea94df1dcaf4fcf248b63dc8b0a13f36412570a
2014-12-03 13:43:30 -05:00
Bo Liu
88309159a5 am 38134303: am 84be180e: Merge "Fix crash in getNativeCanvas when canvasHandle is NULL" into lmp-mr1-dev
* commit '3813430367591efcf925b2baebc50a99a7666644':
  Fix crash in getNativeCanvas when canvasHandle is NULL
2014-11-25 18:46:04 +00:00
Bo Liu
de92f4c72b Fix crash in getNativeCanvas when canvasHandle is NULL
BUG: 18261928
Change-Id: I01a5af201fe829d5752433e1bb0db7edc01733d4
2014-11-24 11:25:45 -08:00
Chih-hung Hsieh
29d1b12dda am 05f7c39e: am fc4a7538: Merge "Revert "Frameworks/base: Mask Skia warning in GraphicsJNI""
* commit '05f7c39eb45854f8d2a8a2aabb9ad9a4f9b867c1':
  Revert "Frameworks/base: Mask Skia warning in GraphicsJNI"
2014-11-22 01:08:42 +00:00
Chih-hung Hsieh
fc4a7538a6 Merge "Revert "Frameworks/base: Mask Skia warning in GraphicsJNI"" 2014-11-22 00:24:39 +00:00
Chih-hung Hsieh
9ebffb40d8 Revert "Frameworks/base: Mask Skia warning in GraphicsJNI"
Should be unnecessary after c/115476.
This reverts commit ba823cee8bafff98640408a777fe105a72fcea0d.

Change-Id: I3ef4d3e04805e450038d469d9672dc064f729b0f
2014-11-21 18:54:15 +00:00
Andreas Gampe
7d13d9db1e resolved conflicts for merge of 3fc5e3ca to lmp-mr1-dev-plus-aosp
Change-Id: Id8286e5a4381315a6060251a8055b0f1d1a96019
2014-11-21 10:36:14 -08:00
Andreas Gampe
ed6b9dff56 Frameworks/base: Consistency in core/jni
Make consistent use of core_jni_helpers for registration.

Translate some #ifdefs into const bools.

Change-Id: I37639aa053dd50f003a552cbd8550dddecc811c5
2014-11-21 10:15:08 -08:00
Dan Albert
3a091b7997 resolved conflicts for merge of 8e0cfe7c to lmp-mr1-dev-plus-aosp
Change-Id: I068d2a0fb118d4e2b4c1e546bebfcbc2cb120d36
2014-11-20 15:41:25 -08:00
Dan Albert
46d8444631 Fix clang warnings in core/jni.
There are a few bugs in here too (mostly people expecting + to
concatenate C strings) :(

Change-Id: I0a243c05c4ea8b56e84896f37814d0fbea4c39d5
2014-11-20 11:47:00 -08:00
Chih-hung Hsieh
b380d7eeee am b1e4e89b: Merge "Fix incorrect usage of bool"
* commit 'b1e4e89b86ee12335fa1398a6b2bc0a0604599de':
  Fix incorrect usage of bool
2014-11-19 18:09:25 +00:00
Bernhard Rosenkränzer
92ddfcfff5 Fix incorrect usage of bool
A bool can't be < 0

Change-Id: Ie94ffadcb38c95214d1105c02610e59b4b2872b2
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
2014-11-17 22:01:27 +01:00
Andreas Gampe
f4e341d99c Frameworks/base: Mask pdfium warning
Mask out warnings from external/.

Change-Id: I371e1346925c7eb5cdc9c4dcffab41ff0c6ddd63
2014-11-13 16:07:13 -08:00
Andreas Gampe
035a7b0235 am 0626ec58: Merge "Frameworks/base: Wall Werror in core/jni"
* commit '0626ec58243c9dc7f4812a453ef9456b1f7ff1f4':
  Frameworks/base: Wall Werror in core/jni
2014-11-13 23:35:22 +00:00
Andreas Gampe
0f0b491966 Frameworks/base: Wall Werror in core/jni
Turn on -Wall -Werror in core/jni. Fix warnings.

Clang TODO: For GCC we need to turn off Wunused-but-set-variable in
the GL bindings. However, Clang doesn't have that warning and thus
complains about an unknown pragma. It is necessary to make the
pragma #ifdef-ed on the compiler being GCC.

Change-Id: I14cab48d45c2771eef0432082356c47ed44a3d7f
2014-11-13 15:20:37 -08:00
Elliott Hughes
5b6683c04a am 34acb4c8: Merge "Prevent resource leak in YuvToJpegEncoder"
* commit '34acb4c8d4abe1c4f580b85ddc84b18b7e38e417':
  Prevent resource leak in YuvToJpegEncoder
2014-11-12 02:53:35 +00:00
Elliott Hughes
34acb4c8d4 Merge "Prevent resource leak in YuvToJpegEncoder" 2014-11-12 01:45:42 +00:00
Martin Wallgren
d865900425 Prevent resource leak in YuvToJpegEncoder
SkWStream is never deleted before going out of scope

Change-Id: Ifdb75c18336d095b012e73b64281ec6c2fc5c3fe
2014-11-11 12:37:29 +01:00
Andreas Gampe
8c48c68cc7 am 71f83672: Merge "Frameworks/base: Mask Skia warning in GraphicsJNI"
* commit '71f83672f297b116988defbe989869e5744cda5e':
  Frameworks/base: Mask Skia warning in GraphicsJNI
2014-11-11 05:10:19 +00:00
Andreas Gampe
ba823cee8b Frameworks/base: Mask Skia warning in GraphicsJNI
Do not allow unused-parameter warnings from Skia includes.

Change-Id: Icc765cb0eaf10cd566a64892fbfe7380143ccb42
2014-11-10 21:01:06 -08:00
Derek Sollenberger
c793fcb026 Fix memory leak where we close the descriptor instead of the file.
(cherry pick of 5cb769d99952ef9fb4f576abba70423fe157342b.)

bug: 17541634
Change-Id: I9968f9df249e4cba24383239ce6130dd16fcd532
2014-11-10 08:44:46 -08:00
Dan Stoza
d17793ea2a Merge "Add a BufferItem parameter to onFrameAvailable" into lmp-mr1-dev 2014-11-07 19:44:34 +00:00
John Reck
a35778c799 Yank ResourceCache out of Caches
Bug: 17947547

Pull the ResourceCache (aka, ref-counting side channel) out of
Caches so that DisplayListRenderer doesn't use Caches, avoiding
the risk of instantiating Caches on the wrong thread or
without a GL context

Change-Id: I7d63b70b3b0a0163308c5dedd6ef255eadebe8fd
2014-11-06 09:45:10 -08:00
Dan Stoza
2c34b5e813 Add a BufferItem parameter to onFrameAvailable
Passes the BufferItem for the queued buffer to the onFrameAvailable
callback so the consumer can track the BufferQueue's contents.

Bug: 18111837
Change-Id: If9d07229c9b586c668e5f99074e9b63b0468feb0
2014-11-04 11:36:33 -08:00
Svet Ganov
fce84f035c Crash apps that print malformed or password protected PDFs.
If apps are writing malformed content (typically not a PDF file) or if the
PDF content they provide to the print system is password protected, are now
crashed as both of these are app bugs.

bug:17636435

Change-Id: Ifce6a3199e587448dd38f6a84290a965c24b698b
2014-11-01 00:06:08 +00:00
Svetoslav
bec22beb99 Save to a PDF file should look like print preview.
When rendering a PDF file for print preview we take into account
the selected print options such as paper size, orientation, etc
without modifying the document. To print we send the doc in its
original form and the print options so the print service can apply
the necessary transforms in addition to the optional custom options
it supports. When saving to PDF we have to actually change the
document as we act as a print service.

bug:13545980

Change-Id: Icdcecf962bec6ff742cc6015df5af9d9086ce760
2014-10-31 10:41:34 -07:00
Leon Scroggins III
36960fad66 Merge "Decoder only returns true on complete success." into lmp-mr1-dev 2014-10-22 21:53:07 +00:00
Leon Scroggins III
754bffe969 am e463bc38: am 3c8bde55: Merge "Report that a JavaInputStreamAdaptor is at end." into lmp-dev
* commit 'e463bc388e7f5d83f864b320dde400e390ef5817':
  Report that a JavaInputStreamAdaptor is at end.
2014-10-22 02:00:46 +00:00
Leon Scroggins III
91332e7eca Report that a JavaInputStreamAdaptor is at end.
This prevents a naive caller from continuing to attempt to read.

BUG:17419670
BUG:17873145
Change-Id: Idd462ff9055aea42e8c7d5d58ef177f9e667385b
2014-10-20 22:49:35 +00:00
Leon Scroggins III
14494262d3 Decoder only returns true on complete success.
Recently we added a way for SkImageDecoder::decode to distinguish
between successfully decoding the entire image and only partially
decoding the image (see https://codereview.chromium.org/647023006).

Only consider a call to decode() a success if the image was completely
decoded. This matches pre-L behavior, and lets the caller know that
they need to try to decode again.

Requires a change to external/skia (I33e6940e247b74b20361ae041f8d36eb600df49f)

BUG:17419670
Change-Id: I17ed7288b2359fafaec9551adb16d1d037800eb7
2014-10-17 21:15:51 +00:00
Chris Craik
86fd9278a9 Merge "Enable fast jni for simple RenderNode/Matrix/Paint operations" into lmp-mr1-dev 2014-10-08 19:58:13 +00:00
Chris Craik
4136a0aeac Enable fast jni for simple RenderNode/Matrix/Paint operations
bug:17895119

Change-Id: Id83bfd719ec873028f0d4e7e4e4c0702f3bb3dd9
2014-10-07 15:09:46 -07:00
Derek Sollenberger
5cb769d999 Fix memory leak where we close the descriptor instead of the file.
bug: 17541634
Change-Id: I9968f9df249e4cba24383239ce6130dd16fcd532
2014-09-29 14:12:07 -04:00
Jérôme Poichet
d29c902f98 Revert "Fix memory leak where we close the descriptor instead of the file."
This reverts commit 1503ebd95fc82b1ae6ec8b006e62a9f6109973fa.

Change-Id: Id40cf34821ea244b1a838079bd147bc845b96cb3
2014-09-26 18:59:11 +00:00
Derek Sollenberger
1b99187253 Fix memory leak where we close the descriptor instead of the file.
bug: 17541634
Change-Id: I842176213e0547dd737ef6e0b83c320a5cc32219
2014-09-24 09:32:37 -04:00
George Mount
784ab49b6e Merge "Allow Path approximation to work with a single point Path." into lmp-dev 2014-09-11 21:51:58 +00:00
George Mount
68cfdad20d Allow Path approximation to work with a single point Path.
Bug 17452965

A single point Path (move-to only) was not returning any
verbs in the verb list. This forces an approximation for
single move-to and empty paths by giving the same value
for fraction 0 and fraction 1.

Change-Id: Icb1b932d730457680cf422377a83fe669f0a7687
2014-09-11 10:25:31 -07:00
Svetoslav
62ce332c14 Trim unnecessary pages when printing.
A user may request a subset of the document's pages to be printed.
In this case the expectation is that the resulting document does
not include not selected pages. While print serivices can do the
trimming themselves or the printer may do so, moving, potantually
many, redundant pages is inefficient. The real problem is when
saving to a PDF file where the saved file must not have the pages
the user did not select. This change adds shredding of undesired
pages from the PDF before saving it or passing it to a print service.
:
bug:17285994

Change-Id: I7deba535af99457bea3c118202314f0f3812e809
2014-09-09 09:38:07 -07:00
Mathieu Chartier
a08d10fa70 Add missing null check to ninePatchInsets
ninePatchInsets could be null after allocation, this possibly caused
a SIGABRT in GC or check_jni failure.

Bug: 17323232

Change-Id: Icd7e3819032e8e999d3c1483bf261bb39b3fe9e4
2014-08-29 16:57:30 -07:00