4768 Commits

Author SHA1 Message Date
Ben Cheng
7a60c43d87 Merge "Use free for memory chunks allocated through memalign." 2013-02-20 22:34:58 +00:00
Ben Cheng
15641a6181 Use free for memory chunks allocated through memalign.
BUG: 8234423
Change-Id: Ic4100a780908c94540722cc4af5f73f4940431b4
2013-02-20 13:20:03 -08:00
Chris Craik
8a47d8eaec Merge "Clean up clipping and deferral logic" 2013-02-20 18:40:03 +00:00
Chris Craik
5d11676414 Clean up clipping and deferral logic
bug:8037003

-Merges replay methods
-Bounds checking for DrawBitmapMesh, DrawRects and DrawDisplayList
-Use clip as bounds for otherwise unbounded draw operations

Clip-as-bounds is correct for drawColor and functor, but other draw
operations (pos text, text on path, and layers) still need true bounds
calculation

Change-Id: I5d5149d2c624f01e3fe46628bf156e835e69b9d5
2013-02-19 18:56:10 -08:00
Romain Guy
52036b19a5 Expose display list APIs
The exposed APIs are slightly simpler than the full APIs used internally.
Only APIs useful to applications are exposed.

Change-Id: Ie03014628d40ad5ef63dedbc52ce3def84429d54
2013-02-19 12:30:02 -08:00
Chris Craik
ad82f20d23 Merge "DisplayList draw operation reordering" 2013-02-19 17:53:50 +00:00
Chris Craik
ac838a3ab9 Merge "Correct PatchCache comparison logic" 2013-02-16 03:36:37 +00:00
Chris Craik
9935abceea Correct PatchCache comparison logic
Change-Id: I3d0832505b5380bfa362863b39e09dd10f792582
2013-02-15 19:33:43 -08:00
Chris Craik
857089eb1e Merge "Adjust offset for non-AA line drawing" 2013-02-16 02:09:22 +00:00
Chris Craik
62a42c13a6 Adjust offset for non-AA line drawing
bug:8114304

The original .375 was chosen to make GL_LINES align with Skia drawing.
The new value of .065 is chosen to be as small as possible to make
triangle-based lines align with Skia, while keeping lines drawn on
integer coordinates unambiguous as to which column/row they draw on.

Also adds more lines in CanvasCompare test to highlight the difference

Change-Id: If578684f2db320682219c3caa625cf79bc62d88f
2013-02-15 14:53:12 -08:00
Chris Craik
c3566d0642 DisplayList draw operation reordering
bug:8037003

The reordering enables similar operations to draw together, minimizing the
OpenGL state change operations that go inbetween draws. Eventually, multiple
complete canvas draw operations will be merged (into a single glDrawArrays call,
for example)

Reorders DisplayList draw operations when:

-They can move backwards in the command stream to be after similar
operations without violating draw ordering

-The OpenGLRenderer is in a simple, replayable state (no complex clip,
or filter/shadow etc)

Also adds two system properties to control the deferral/reordering:
    "debug.hwui.disable_draw_defer"
    "debug.hwui.disable_draw_reorder"
which can be set to "true" to control the display list manipulation

Change-Id: I5e89f3cb0ea2d2afd3e15c64d7f32b8406777a32
2013-02-15 13:30:09 -08:00
Romain Guy
13ba005484 Remove obsolete header file
We now use the same mechanism to compare keys everywhere in libhwui.

Change-Id: I8b3cb25b13f4f38eb6f12aed0356f796a773617c
2013-02-15 12:47:26 -08:00
Chris Craik
101ae3bb39 Merge "Move DisplayList to its own cpp file" 2013-02-15 00:50:52 +00:00
Chris Craik
0776a60693 Move DisplayList to its own cpp file
Change-Id: Ic9c1bbf4673ad5c756f3908b2ab7e699edd6a119
2013-02-14 15:40:03 -08:00
Romain Guy
10c0aa246d Merge "Implement support for drawBitmapMesh's colors array" 2013-02-14 18:51:28 +00:00
Romain Guy
ff316ec7a7 Implement support for drawBitmapMesh's colors array
Change-Id: I3d901f6267c2918771ac30ff55c8d80c3ab5b725
2013-02-13 18:39:43 -08:00
Chris Craik
f2d8ccc15d Revert "Revert "Use RenderScript for large text blurs""
This reverts commit bf5703e52e3304246cbf0e73f6976f7d7312d238.

Change-Id: Ic6f991277dec9e80a6fed93db91499726b30ab2a
2013-02-13 16:40:02 -08:00
Chris Craik
c932760f66 Merge "Revert "Merge remote-tracking branch 'goog/master-chromium' into 'goog/master'" DO NOT MERGE" 2013-02-13 23:14:58 +00:00
Chris Craik
68b600913b Merge "Revert "Use RenderScript for large text blurs"" 2013-02-13 19:50:24 +00:00
Chris Craik
bf5703e52e Revert "Use RenderScript for large text blurs"
This reverts commit 3f76e65d251ead65fe8ff98e3bd4c7623fbaac07

Change-Id: Ia81cd485e5ca696bb284c419dc8a1d2f3247100e
2013-02-13 19:47:24 +00:00
Romain Guy
0450086a84 Merge "Fix format name typo" 2013-02-13 19:35:33 +00:00
Romain Guy
2b44eb75c4 Fix format name typo
Change-Id: If7d86b74ad9735f12349d9fcb62b335f5a742bb5
2013-02-13 11:33:26 -08:00
Chris Craik
bce29d2a54 Merge "Use RenderScript for large text blurs" 2013-02-13 19:32:56 +00:00
Romain Guy
8d4aeb7111 Add a render buffer cache to reuse stencil buffers
Bug #7146141

This new cache is used in a similar way to LayerCache. It helps
reuse already allocated stencil buffers and thus avoid churning
memory on every frame.

Change-Id: I19551d72da52c40039e65904563600e492c8b193
2013-02-13 11:27:05 -08:00
Chris Craik
7c1a49f5f5 Revert "Merge remote-tracking branch 'goog/master-chromium' into 'goog/master'" DO NOT MERGE
This reverts commit 6c0307dd0aefe9a08794b155fc03ee60ebd14f25, reversing
changes made to a2cd828b749c444d55c2c41c7dbb85088ff94b9f.

Conflicts:
	packages/SystemUI/res/values-sv/strings.xml

Change-Id: Ia178efe8b14751583d47b2826bfe3d3d5463dd2e
2013-02-13 10:50:20 -08:00
Chris Craik
3f76e65d25 Use RenderScript for large text blurs
Still fall back to simple path for small tasks

Change-Id: I492f1b3f7d6fec1738f3e45cbfb15864bd23a392
2013-02-12 17:45:28 -08:00
Romain Guy
e67307c816 Prevent crash when setting up a stencil-based clip
Bug #8177690

Clear the layers before we setup the stencil to avoid dereferencing
the recently deleted rects.

Change-Id: I5dce5f965672f276f9490636d85b6018d3ab9422
2013-02-11 18:04:23 -08:00
Romain Guy
d71ff91dcd Apply the clip rect/region to drawLines()
Without the check to quickReject, drawConvexPath would never
setup the clip properly.

Change-Id: I23e5b25de3383c9e9b86eea4ee7a9552f8d9efb4
2013-02-08 13:46:40 -08:00
Romain Guy
b4c1dc1c15 Merge "Don't clip when drawing a layer" 2013-02-07 23:32:42 +00:00
Romain Guy
63696bfc05 Don't clip when drawing a layer
A layer will, by definition, clip its content already. The extra
clip added by the UI toolkit/renderer is wasteful and in some
situations very expensive. If a layered view is rotated, the clip
will be transformed into a non-rectangular region, thus forcing
the renderer to rely on the stencil buffer. The whole point of
using layers is to draw efficiently so let's avoid this case.

Change-Id: I813465f6468cc386b84a4d058c11a258fef8507a
2013-02-07 15:20:55 -08:00
Romain Guy
da8d8b9699 Merge "Add a RenderBuffer object to store stencil buffers. Bug #7146141" 2013-02-07 20:11:56 +00:00
Romain Guy
3bbacf27c0 Add a RenderBuffer object to store stencil buffers.
Bug #7146141

This change is needed to add a render buffer cache to avoid
creating and destroying stencil buffers on every frame.

This change also allows the renderer to use a 1 bit or 4 bit
stencil buffer whenever possible.

Finally this change fixes a bug introduced by a previous CL
which causes the stencil buffer to not be updated in certain
conditions. The fix relies on a new optional parameter in
drawColorRects() that can be used to avoid performing a
quickReject on rectangles generated by the clip region.

Change-Id: I2f55a8e807009887b276a83cde9f53fd5c01199f
2013-02-07 12:11:22 -08:00
Jeffrey Brown
6b7fcc8f67 am 75701e8f: am 7eb4db35: am b9185fd1: Merge "Fix PointerCoords Parcel incorrectly storing values as Int32"
# By Ilya Polenov
# Via Android Git Automerger (2) and Gerrit Code Review (2)
* commit '75701e8fc92285680637f69e0f004741919ddc10':
  Fix PointerCoords Parcel incorrectly storing values as Int32
2013-02-06 20:56:07 -08:00
Jeffrey Brown
7eb4db3593 am b9185fd1: Merge "Fix PointerCoords Parcel incorrectly storing values as Int32"
# By Ilya Polenov
# Via Gerrit Code Review
* commit 'b9185fd1ffd85239e3ab10ab34cb9d8508970fb4':
  Fix PointerCoords Parcel incorrectly storing values as Int32
2013-02-06 20:50:17 -08:00
Chris Craik
1ba0289d18 Merge "Add cap tessellation support" 2013-02-07 00:14:38 +00:00
Chris Craik
65cd612fac Add cap tessellation support
bug:7117155
bug:8114304

Currently used for lines (with and without AA) and arcs with useCenter=false

Also removes 0.375, 0.375 offset for AA lines

Change-Id: Ic8ace418739344db1e2814edf65253fe7448b0b0
2013-02-06 15:35:12 -08:00
Romain Guy
511afdd3ac Merge "Fix uninitialized variables in Caches.cpp Bug #8151401" 2013-02-06 23:34:36 +00:00
Romain Guy
c2a972131f Fix uninitialized variables in Caches.cpp
Bug #8151401

Change-Id: I221f93de0f1981974f82a094297836dd3fe418bc
2013-02-06 15:29:46 -08:00
Romain Guy
83315e0cb4 Merge "Fix Snapshot::resetClip to also reset the clip region" 2013-02-06 23:29:15 +00:00
Romain Guy
3c099c42fd Fix Snapshot::resetClip to also reset the clip region
Change-Id: I979151e73f64ff9d45f8a5232d8700361b09fbc7
2013-02-06 15:28:04 -08:00
Derek Sollenberger
23e500d168 Merge "Merge remote-tracking branch 'goog/master-chromium' into 'goog/master'" 2013-02-06 12:57:38 +00:00
Romain Guy
b969a0de65 Add support for non-antialiased text
Change-Id: I17c073955ab94abc9b409e5fcfbc675faa07c5ba
2013-02-05 14:44:43 -08:00
Derek Sollenberger
f5db9b8ed4 Merge "Changes needed to roll Skia to r7527." into master-chromium 2013-02-05 18:17:56 +00:00
Romain Guy
43c6eda4d3 am b3778531: Merge "Set the scissor from OpenGLRenderer::drawColorRects Bug #8131254"
# Via Android (Google) Code Review (1) and Romain Guy (1)
* commit 'b377853123ff53974bb06ffc30e09db41a767c3a':
  Set the scissor from OpenGLRenderer::drawColorRects Bug #8131254
2013-02-04 14:00:44 -08:00
Romain Guy
b377853123 Merge "Set the scissor from OpenGLRenderer::drawColorRects Bug #8131254" 2013-02-04 21:56:40 +00:00
Romain Guy
a362c69d6c Set the scissor from OpenGLRenderer::drawColorRects
Bug #8131254

This method is used as an optimization for paths containing only
non-overlapping rectangles. The implementation was correctly
rejecting rectangles invidually but not the bounds of the array
of rectangles. If quickReject() is not called, setupDraw() won't
be able to properly set the scissor.

Change-Id: I50aa11a4bd8b525b267d36a3039fe7a6fba50518
2013-02-04 13:50:16 -08:00
Chris Craik
d4cf7df151 am e51ccb15: Merge "Simplify display list logging, removing pointers"
# Via Android (Google) Code Review (1) and Chris Craik (1)
* commit 'e51ccb1543ef5b6427e5f270ae38be75e18daccd':
  Simplify display list logging, removing pointers
2013-02-04 13:48:48 -08:00
Chris Craik
e51ccb1543 Merge "Simplify display list logging, removing pointers" 2013-02-04 21:44:48 +00:00
Chris Craik
3dc553babe Simplify display list logging, removing pointers
Also fix save indents

Change-Id: Ia1add83422fbc200b85fd6688f5be60292b0f178
2013-02-04 12:45:13 -08:00
Derek Sollenberger
d81ec456bb Changes needed to roll Skia to r7527.
Change-Id: I84aef3f8a733c869fade06021816646001532758
2013-02-04 15:42:26 -05:00