920 Commits

Author SHA1 Message Date
John Reck
849911a9c4 Move Canvas
Change-Id: I83d557af30fc2d5c69d06eedc0f4d52ac41c4210
2015-01-20 12:39:05 -08:00
Chris Craik
d5049e2f74 am 04b633c5: am 0de2eca5: am 112e35b4: Merge "Update generationId on bitmaps when decoded into by BitmapRegionDecoder" into lmp-mr1-dev
* commit '04b633c526b3ea72cb13f0c0472673f3baf07625':
  Update generationId on bitmaps when decoded into by BitmapRegionDecoder
2015-01-16 00:06:14 +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
Ben Wagner
177612335a Remove last mention of SkFontHost.
SkFontHost is now almost removed from Skia, and nothing is left in it
which interests Android. Remove the last few references to it to aid
in final removal.

Change-Id: I7d59cf7e08bdd5b9c3923c9ffaf03b1cc2f9f7b4
2015-01-15 14:16:46 -05: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
Derek Sollenberger
dbf22ccd92 Merge "Update HWUI to store its own SkBitmap objects" 2015-01-14 15:06:27 +00:00
Ben Wagner
c2d39573ca Remove dead code from AssetStreamAdapter.
After "Use at least SkStreamAsset for SkTypefaces." there is now dead
code in AssetStreamAdapter. Remove the code and update the users.

Change-Id: I17a9d82dd6ca4d87a951c1570dc91de7f2fc54f2
2015-01-12 18:13:27 -05:00
Ben Wagner
f462c2491b Use at least SkStreamAsset for SkTypefaces.
The existing AssetStreamAdapter is only SkStreamRewindable, and does not
support 'duplicate'. This is needed in order for SkTypeface to be used
properly. Also, SkTypeface is moving to require SkStreamAsset for
creating typefaces for performance and code reasons.

In the previous code, Asset::getBuffer is called on creation of the
typeface, so do so explicitly and manage the memory directly. This
also prevents additional copies being made of the asset data.

BUG: 18867034
Change-Id: I458a8ec024efefb761138178b87b88b48cb4a773
2015-01-12 15:19:18 -05:00
Derek Sollenberger
3d4eed7f1a Update HWUI to store its own SkBitmap objects
This enables us to...

1) simplify the lifecycle/ownership between Java and HWUI
2) remove DisplayListRenderer::drawBitmapData and associated logic
3) track pixel lifecycle using standard SkPixelRef refcounting
4) Remove uncessary calls to ref/unref the bitmap's pixels and colorTable

Change-Id: I3c95078da20995444f6388a029414280fd654318
2015-01-09 13:56:56 -05:00
Derek Sollenberger
304cc53874 Use the generic Canvas instead of SkCanvas
bug: 18642206
Change-Id: I0dc3f6b620083e5948c2d4be541ae7c6261b3482
2015-01-09 09:16:06 -05:00
Tom Hudson
40a0709a56 Merge "Merge frameworks/base changes from master-skia to master." 2015-01-07 16:13:42 +00: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
2e61c04070 am bf31cb6b: am 8371f2e3: Merge "Check for OOM in BitmapFactory\'s getMimeTypeString()."
automerge: 4e29869

* commit '4e2986940b2ff456693a805026c6910e950c42e2':
  Check for OOM in BitmapFactory's getMimeTypeString().
2015-01-07 10:32:50 +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
Mike Reed
71487eb0ce Merge frameworks/base changes from master-skia to master.
Adaptations to changes in Skia upstream since Oct 2014.
(https://code.google.com/p/skia/issues/detail?id=2377)

cbb922d use new roundOut signature
77082de Call SkColorTable::readColors().
5456ab1 Handle the result of SkMatrix::asAffine.
25cfc78 Remove dependence on SK_LEGACY_PICTURE_SIZE_API.

BUG:18468293

Change-Id: I5a4d274e854298843891410b1ffd5e24f038b88a
2015-01-06 21:41:35 +00:00
Narayan Kamath
f70afa9b8f am 721d0994: am f60b2d40: am 024191b5: Merge "Fix comment. It should be \'or\' not \'of\'."
* commit '721d0994dc6ed370e359a33a6798f87389a428c8':
  Fix comment.  It should be 'or' not 'of'.
2015-01-06 20:09:06 +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
Tom Hudson
8dfaa49042 Make DisplayListRenderer inherit from Canvas, merge JNI
Incrementally unify the upper layers for Skia and HWUI.
Remove redundant code from GLES20Canvas.java; instead
use inherited mNativeCanvasWrapper and superclass method
definitions.

Moves some unrelated SkPaint utility functions from Renderer
to new utils/PaintUtils.

bug: 15672762
Change-Id: I4ddd4214b8e9eeb95289d054ef423f2542bb5fa5
2015-01-05 15:25:41 -08:00
Leon Scroggins III
1e9547722f Merge "Make SkiaCanvas creation call ref() on SkCanvas." 2014-12-19 14:32:05 +00:00
Leon Scroggins III
0e52410217 Merge "Remove dependence on SK_LEGACY_PICTURE_DRAW_API." 2014-12-19 14:31:45 +00:00
John Reck
c21e364386 Merge "Stop pretending USE_OPENGL_RENDERER is a thing" 2014-12-18 22:42:13 +00:00
John Reck
a2732a2bf9 Stop pretending USE_OPENGL_RENDERER is a thing
Change-Id: I732b490431fe90eafa00a00f3b5429f0d3a067e6
2014-12-18 14:12:27 -08:00
Mike Reed
f2883b320f explicitly call tryAllocPixels if you want to check for failure
allows us to remove SK_SUPPORT_LEGACY_ALLOCPIXELS_BOOL

Change-Id: I095a04e358404bc413ceebe81e7e1adfbbbec027
2014-12-18 16:47:08 +00:00
Leon Scroggins III
18981294a5 Make SkiaCanvas creation call ref() on SkCanvas.
There are two callers of SkiaCanvas::create_canvas(SkCanvas*). In both
cases, we were calling ref() first. It is necessary to call ref() in
both cases, since we have an SkCanvas returned by
SkPictureRecorder::beginRecording, which does not increment the ref
count to account for the caller. (i.e. the SkPictureRecorder has the
only ref until you call ref()).

Rather than leave the ref up to the caller, since the SkiaCanvas does
the unref(), it should also do the ref(). Update it to do so and
document its behavior.

Also, make SkiaCanvas' constructors explicit.

Change-Id: I894d0a71a87587cf8c2b26deb2384dc49ae090ef
2014-12-17 13:20:33 -05:00
Leon Scroggins III
d40e89258e Remove dependence on SK_LEGACY_PICTURE_DRAW_API.
Call SkPicture::playback() instead of ::draw().

Also, no need longer need the const_cast.

Change-Id: I4742d2fd5c5b918db492ec2ef6a84ea7d6151cdd
2014-12-16 16:58:40 +00:00
Mike Reed
70ffbf9e82 drawBitmapMatrix is deprecated, code work-around
Change-Id: I53d827ecb74c2b131645eaf3edfd748722c5078d
2014-12-08 17:03:30 -05:00
John Reck
1022888d33 resolved conflicts for merge of 203c8171 to master
Change-Id: I256397410c261fae049bae4572f132235be1c5c9
2014-12-04 16:06:34 -08: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
2b5edf651a am 88309159: am 38134303: am 84be180e: Merge "Fix crash in getNativeCanvas when canvasHandle is NULL" into lmp-mr1-dev
* commit '88309159a53ceb4f34fe01056521e4b84e848ef7':
  Fix crash in getNativeCanvas when canvasHandle is NULL
2014-11-25 18:51:37 +00: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
3643f92882 am 29d1b12d: am 05f7c39e: am fc4a7538: Merge "Revert "Frameworks/base: Mask Skia warning in GraphicsJNI""
* commit '29d1b12ddae8950ee7d2a8f31a040340185a331e':
  Revert "Frameworks/base: Mask Skia warning in GraphicsJNI"
2014-11-22 01:23:53 +00: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
Andreas Gampe
158b6c9850 resolve merge conflicts of 7d13d9d to master.
Change-Id: I4d8a7ec4a25471565859050939ec05b0c1261627
2014-11-21 14:05:11 -08: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
4bac6e11ae am 3a091b79: resolved conflicts for merge of 8e0cfe7c to lmp-mr1-dev-plus-aosp
* commit '3a091b79978caa9b5d58ae19f693279e5a717c2a':
  Fix clang warnings in core/jni.
2014-11-20 23:47:07 +00: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
e0fd617dba am b380d7ee: am b1e4e89b: Merge "Fix incorrect usage of bool"
* commit 'b380d7eeee2ea73bcd2bfdf0b0b3339ab93ff75c':
  Fix incorrect usage of bool
2014-11-19 18:15:08 +00: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
6d6f049008 am e64565e0: Merge "Frameworks/base: Mask pdfium warning" into lmp-mr1-dev-plus-aosp
* commit 'e64565e0a503397f0d59fed0e6aaef23807782b4':
  Frameworks/base: Mask pdfium warning
2014-11-14 19:17:54 +00:00
Andreas Gampe
ed5d5fb434 am 035a7b02: am 0626ec58: Merge "Frameworks/base: Wall Werror in core/jni"
* commit '035a7b0235835e856f39623fc571668e2d6048da':
  Frameworks/base: Wall Werror in core/jni
2014-11-14 19:15:42 +00:00