• Home
  • History
  • Annotate
  • only in /frameworks/base/libs/hwui/renderstate/
History log of /frameworks/base/libs/hwui/renderstate/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
1bcacfdcab0eaa0cee92bd7f5a1b5e271dd68e52 03-Nov-2017 John Reck <jreck@google.com> Format the world (or just HWUI)

Test: No code changes, just ran through clang-format
Change-Id: Id23aa4ec7eebc0446fe3a30260f33e7fd455bb8c
lend.cpp
lend.h
eshState.cpp
eshState.h
ffscreenBufferPool.cpp
ffscreenBufferPool.h
ixelBufferState.cpp
ixelBufferState.h
enderState.cpp
enderState.h
cissor.cpp
cissor.h
tencil.cpp
tencil.h
extureState.cpp
extureState.h
f8441e65526cd1721f1ad77dad21b1a1e2743d76 23-Oct-2017 John Reck <jreck@google.com> Switch to a fancy new queue

Test: unit tests & benchmarks pass/faster

Change-Id: I9521432172d6dd6039c5280b1265479a36a86247
enderState.cpp
7a4216bb7380fe463f8fb79bca37a70676000427 25-Oct-2017 Derek Sollenberger <djsollen@google.com> Don't clear a layerPool that is never initialized.

Test: device now boots in Vulkan without crash
Change-Id: Ib0a3d8253a49fbcdb75e9f4edda0c32d06903669
enderState.cpp
01ed792ade2e2d4b67faed58501836b2928be8dc 01-Sep-2017 Chris Craik <ccraik@google.com> Add test for first draw blend behavior in HWUI pipeline

Bug: 65077146
Test: BakedOpRendererTests
Change-Id: Ia3139a01fe25344a19f2b947069bd686303b9fd5
lend.h
530a2b44d9a4b40d028c912ade858da73081ed85 23-Jan-2017 Arun <arun.demeure@imgtec.com> Disable hwui blending for first draw to main FBO

bug:34809371

In some applications, the first draw is not opaque - either because the
application is misbehaved, or because hwui is not able to reliably tell
whether the layer is opaque or translucent. This is undefined behaviour
in OpenGL ES and has a significant performance and bandwidth impact on
some tiler GPUs as it requires loading the previous frame's color data.
This change disables blending in that case and also for effectively
opaque blend modes (SRC=GL_ONE, DST=GL_ZERO). It increases performance
by ~10% for Leanback CTS on some low-end GPUs (gradient layer that hwui
incorrectly believes to be translucent).

Test: manual - visual inspection on fugu (nexus player)

Change-Id: I2cbf1c76678acae1a36923e72fd18ed55cd89dc2
lend.cpp
enderState.cpp
enderState.h
642ebea6e14b72c512ef1168dc6edb061035dded 17-Jul-2017 John Reck <jreck@google.com> Delete all ro.hwui.* props

Remove all ro.hwui.* tuning props and instead
calculate them from the screen resolution.

Or just hardcode them to what all devices
were hardcoding them to anyway.

Bug: 63741221
Test: Check cache size results on sailfish

Change-Id: I8b0d210572a246f4fefb076935cf5156a70c274c
Merged-In: I8b0d210572a246f4fefb076935cf5156a70c274c
(cherry picked from commit 8dc02f99d09130ace2ee738c2e689db1b3f33181)
ffscreenBufferPool.cpp
enderState.cpp
enderState.h
tencil.cpp
09c00f25af6e711275dd8a562294ebd904c4eace 19-Jul-2017 George Burgess IV <gbiv@google.com> Fix use-after-free

Since putOrDelete may delete the layer, we shouldn't be accessing its
member after calling it.

Caught by the static analyzer:

frameworks/base/libs/hwui/renderstate/OffscreenBufferPool.cpp:183:44:
warning: Use of memory after it is freed

Bug: 27101951
Test: mma. Static analyzer warning is gone.
Change-Id: I25ee8b45ede608da52bf58d1d9f52ce3bb60d4cb
ffscreenBufferPool.cpp
07ae505d4045e2b1ae501e87560984dae06f9dd8 14-Jun-2017 Romain Guy <romainguy@google.com> Use RGBA16F layers when wide color gamut rendering is on

Layers created using View.setLayerType() or Canvas.saveLayer() need
to be RGBA16F/scRGB-nl when within a window that requested wide color
gamut rendering.

Bug: 29940137
Test: CtsUiRenderingTestCases, CtsGraphicsTestCases, hwui_unit_tests
Change-Id: I42fd6355448c92041491a7109e3ac8a153d38bf9
ffscreenBufferPool.cpp
ffscreenBufferPool.h
f9e45d1d818ae0956ba77ed598b7040cfecca553 01-Jun-2017 Derek Sollenberger <djsollen@google.com> Implement CacheManager for the Skia pipelines.

The core of the implementation is complete and provides heuristic
cache sizing based on the size of the surface being used. This CL
will also be used to add the following features in the future...

1) Support Vulkan pipeline reporting on the size of the surface.
2) Complete the VectorDrawableAtlas stub code
3) Automatic purging of stale resources for low memory devices.

Test: hwui_unit_tests (new test added) and CtsUiRendering
Bug: 62260637
Change-Id: Ib85159cca28b646fe249f2190b07f1b7e0f50d8f
enderState.h
11e44273dcdf905b0cd82d4a75ff1fd3be5b9d21 02-Jun-2017 Arun <arun.demeure@imgtec.com> Merge "Optimised hwui rounded corners shader" am: d7287c96eb am: ed7bdd6549
am: 92ef0a59f8

Change-Id: I9f5e6ef057ba6049804226d65f2f2f06594efc69
06e9f324ef5b723622647a6f111c38cb2d479869 23-Jan-2017 Arun <arun.demeure@imgtec.com> Optimised hwui rounded corners shader

This is a ~2x performance increase for the rounded corners shader which
was previously shader limited even on many high-end GPUs. It simplifies
the calculations by pre-dividing by the radius, which also allows to
maintain mediump/FP16 precision (this improves performance and might
improve image quality on GPUs that don't support highp e.g. Mali-400).
It also uses a conditional in the shader to save much of the work on
the vast majority of pixels which are not close to the corners.

Test: manual - visual inspection on fugu (nexus player)

Change-Id: I38f491cfb006e2991ef0b9d6b3d67d2c4d328d44
enderState.cpp
1f7f8bfddb479ad35073e5e81d56a9c1308cf08e 24-May-2017 John Reck <jreck@google.com> Merge "Fix null deref crash" into oc-dev
am: c1affe14c2

Change-Id: Ib8e4c34fb38400dc748b463c5ab965d57e260fd0
36393c3e8da725927357d7a235c18e2f6c1aea98 24-May-2017 John Reck <jreck@google.com> Fix null deref crash

Change-Id: Ic1a64e926b5faa2f4cf8d079a2b67e0261dcecd7
Fixes: 62035692
Test: manual
enderState.cpp
9d08fca62fbe140ffa107dd0f216282971af6748 23-May-2017 John Reck <jreck@google.com> Merge "Improve time to texture destruction" into oc-dev
am: 1bc0286ef8

Change-Id: I93daab53961a018a2cf8d4e2d4d8300b84bb917e
9a814875c4e3a98fea99dae623f22268a9afa38a 23-May-2017 John Reck <jreck@google.com> Improve time to texture destruction

Eliminate textureCache.mGarbage which is only cleared
in a trimMemory. Instead when we hit ~Bitmap post a
message to RenderThread to release the texture immediately

Bug: 38258699
Test: manual
Change-Id: I962ba275e89afb628ba02f74769287edbab9fed4
enderState.cpp
enderState.h
93cafba790b0210bf05cf1a9db2e94301a7643ff 05-May-2017 Arun <arun.demeure@imgtec.com> Merge "Reduce hwui CPU time by using glDrawRangeElements" am: 057c7c3164 am: 94f4f5e45f
am: b5facc7516

Change-Id: I9e96bf83ae5ebd4237fc4d78a58e83793de86aad
b0a9477c8e07d4530f07c78a5d20b4cde0fe8d60 23-Jan-2017 Arun <arun.demeure@imgtec.com> Reduce hwui CPU time by using glDrawRangeElements

The CPU overhead of glDrawElements in the GPU driver is significant
with client-side vertex data (unique per draw call) as the driver has
to calculate the mininimum and maximum indices from the index buffer
in order to evaluate the range of vertex data required. This can be
avoided by keeping track of the min-max in hwui and passing it with
glDrawRangeElements. This requires OpenGL ES3.0 support (which is
already checked for elsewhere in hwui).

Test: manual - visual inspection on fugu (nexus player)

Change-Id: I57bb1ddd239a1032f74f1cd2683bbe0970e84bd9
enderState.cpp
caaaa66e57293e4a6f312649bf472eab84d5c7fe 27-Mar-2017 Romain Guy <romainguy@google.com> Convert bitmaps to sRGB/scRGB when they have a color profile

This change also fixes an issue with RGBA16F bitmaps when modulated
with a color (for instance by setting an alpha on the Paint object).

The color space conversion is currently done entirely in the shader,
by doing these operations in order:

1. Sample the texture
2. Un-premultiply alpha
3. Apply the EOTF
4. Multiply by the 3x3 color space matrix
5. Apply the OETF
6. Premultiply alpha

Optimizations:
- Steps 2 & 6 are skipped for opaque (common) bitmaps
- Step 3 is skipped when the color space's EOTF is close
to sRGB (Display P3 for instance). Instead, we use
a hardware sRGB fetch (when the GPU supports it)
- When step 3 is necessary, we use one of four standard
EOTF implementations, to save cycles when possible:
+ Linear (doesn't do anything)
+ Full parametric (ICC parametric curve type 4 as defined
in ICC.1:2004-10, section 10.15)
+ Limited parametric (ICC parametric curve type 3)
+ Gamma (ICC parametric curve type 0)

Color space conversion could be done using texture samplers
instead, for instance 3D LUTs, with or without transfer
functions baked in, or 1D LUTs for transfer functions. This
would result in dependent texture fetches which may or may
not be an advantage over an ALU based implementation. The
current solution favor the use of ALUs to save precious
bandwidth.

Test: CtsUiRenderingTests, CtsGraphicsTests
Bug: 32984164
Change-Id: I10bc3db515e13973b45220f129c66b23f0f7f8fe
enderState.cpp
efb4b06493fe7b1604c762a448b13c7af2845a8d 27-Feb-2017 Romain Guy <romainguy@google.com> Add ColorSpace information on Bitmap

This is the first step toward interpreting color spaces at render time.

Bug: 32984164
Test: BitmapColorSpaceTest in CtsGraphicsTestCases

Change-Id: I0164a18f1ed74a745874fe5229168042afe27a04
enderState.cpp
c3f131696111a066d9efd9c7c3e37566a2a9fb89 06-Feb-2017 sergeyv <sergeyv@google.com> Clean up deferredLayers only onGpuContextDestroyed.

Test: manual
bug:34919311
Change-Id: I5488b0845ec3922424f5893943e4f42675dfc9fd
enderState.cpp
enderState.h
3e9999bd866fac71c72e6b484a9836c87c328a08 20-Jan-2017 sergeyv <sergeyv@google.com> Explicitly destroy Layer in DeferredLayerUpdater on destroyHardwareResources()

Change-Id: I0987104eabda9a2a302b9e765213aad48f93aea4
Test: refactoring CL. Existing tests still pass
bug:33753499
enderState.cpp
enderState.h
45ec62ba72c5017fae7d8baab20bfb0d4c99c627 04-Jan-2017 Greg Daniel <egdaniel@google.com> Add support for dummy draws for Vulkan webview and texture views.

Test: manual testing
Change-Id: Iaec8c3a34367673c281665ff6c6e97d1ce532265
enderState.cpp
enderState.h
8cd3edfa15cc9cdbffa935d19ab894426b08d174 09-Jan-2017 Greg Daniel <egdaniel@google.com> Break Layer class into Gl and Vulkan subclasses

Test: manual testing
Change-Id: Ibd2beed39de3ac6da7448e96496253cfe427dfbb
enderState.cpp
2a38c42e921451abebb4ee5f5ecd738f1b6b04ed 26-Oct-2016 sergeyv <sergeyv@google.com> Add target to texture

Test: refactoring cl.
bug:32413624

Change-Id: I94b1c31cd4e0712dfcfd7777a0012424c1bf0dca
enderState.cpp
260ab726486317496bc12a57d599ea96dcde3284 07-Oct-2016 Mike Reed <reed@google.com> use SkBlendMode instead of SkXfermode
use sk_sp versions of paint setters/getters

Change-Id: I86591a0a8ec92e6039776cbf00424ea24f585b28
lend.cpp
lend.h
253f2c213f6ecda63b6872aee77bd30d5ec07c82 29-Sep-2016 Romain Guy <romainguy@google.com> Linear blending, step 1

NOTE: Linear blending is currently disabled in this CL as the
feature is still a work in progress

Android currently performs all blending (any kind of linear math
on colors really) on gamma-encoded colors. Since Android assumes
that the default color space is sRGB, all bitmaps and colors
are encoded with the sRGB Opto-Electronic Conversion Function
(OECF, which can be approximated with a power function). Since
the power curve is not linear, our linear math is incorrect.
The result is that we generate colors that tend to be too dark;
this affects blending but also anti-aliasing, gradients, blurs,
etc.

The solution is to convert gamma-encoded colors back to linear
space before doing any math on them, using the sRGB Electo-Optical
Conversion Function (EOCF). This is achieved in different
ways in different parts of the pipeline:

- Using hardware conversions when sampling from OpenGL textures
or writing into OpenGL frame buffers
- Using software conversion functions, to translate app-supplied
colors to and from sRGB
- Using Skia's color spaces

Any type of processing on colors must roughly ollow these steps:

[sRGB input]->EOCF->[linear data]->[processing]->OECF->[sRGB output]

For the sRGB color space, the conversion functions are defined as
follows:

OECF(linear) :=
linear <= 0.0031308 ? linear * 12.92 : (pow(linear, 1/2.4) * 1.055) - 0.055

EOCF(srgb) :=
srgb <= 0.04045 ? srgb / 12.92 : pow((srgb + 0.055) / 1.055, 2.4)

The EOCF is simply the reciprocal of the OECF.
While it is highly recommended to use the exact sRGB conversion
functions everywhere possible, it is sometimes useful or beneficial
to rely on approximations:

- pow(x,2.2) and pow(x,1/2.2)
- x^2 and sqrt(x)

The latter is particularly useful in fragment shaders (for instance
to apply dithering in sRGB space), especially if the sqrt() can be
replaced with an inversesqrt().

Here is a fairly exhaustive list of modifications implemented
in this CL:

- Set TARGET_ENABLE_LINEAR_BLENDING := false in BoardConfig.mk
to disable linear blending. This is only for GLES 2.0 GPUs
with no hardware sRGB support. This flag is currently assumed
to be false (see note above)
- sRGB writes are disabled when entering a functor (WebView).
This will need to be fixed at some point
- Skia bitmaps are created with the sRGB color space
- Bitmaps using a 565 config are expanded to 888
- Linear blending is disabled when entering a functor
- External textures are not properly sampled (see below)
- Gradients are interpolated in linear space
- Texture-based dithering was replaced with analytical dithering
- Dithering is done in the quantization color space, which is
why we must do EOCF(OECF(color)+dither)
- Text is now gamma corrected differently depending on the luminance
of the source pixel. The asumption is that a bright pixel will be
blended on a dark background and the other way around. The source
alpha is gamma corrected to thicken dark on bright and thin
bright on dark to match the intended design of fonts. This also
matches the behavior of popular design/drawing applications
- Removed the asset atlas. It did not contain anything useful and
could not be sampled in sRGB without a yet-to-be-defined GL
extension
- The last column of color matrices is converted to linear space
because its value are added to linear colors

Missing features:
- Resource qualifier?
- Regeneration of goldeng images for automated tests
- Handle alpha8/grey8 properly
- Disable sRGB write for layers with external textures

Test: Manual testing while work in progress
Bug: 29940137

Change-Id: I6a07b15ab49b554377cd33a36b6d9971a15e9a0b
ffscreenBufferPool.cpp
enderState.cpp
enderState.h
25c9f6cede5705406294a5043363952c316facb2 01-Sep-2016 Chih-hung Hsieh <chh@google.com> Merge "Fix google-explicit-constructor warnings in libs/hwui." am: 7207562ff7 am: d7a69e04eb am: 842f1e48e7
am: 1f50f80aab

Change-Id: I713bd07fee150cc684e630045e02872b23062a5a
a619ec70cf765d9166f0862e74653711b87307b3 29-Aug-2016 Chih-Hung Hsieh <chh@google.com> Fix google-explicit-constructor warnings in libs/hwui.

* Add explicit keyword to conversion constructors,
or add NOLINT for implicit converters.
Bug: 28341362
Test: build with WITH_TIDY=1

Change-Id: Id8ca42433a4fc3652e4cb13787c4cb169f20d9a9
ffscreenBufferPool.h
ed935c32f478229220a90442da0af3c3d3fc6230 12-Aug-2016 Chih-Hung Hsieh <chh@google.com> resolve merge conflicts of 76ce8e5 to stage-aosp-master

Change-Id: I4b4ca9906373a95776d2da8ba2fa39a4a78e2a30
f35c939cd70f2815582d08902ade0b9abbee6bec 10-Aug-2016 Chih-Hung Hsieh <chh@google.com> Fix clang-tidy warnings in libs/hwui.

* Add explicit keyword to conversion constructors.
Bug: 28341362
* Use const reference type for read-only parameters.
Bug: 30407689
Test: build with WITH_TIDY=1

Change-Id: Iab3e6636f60a70cb124f29dc19f20f842fa8dfda
Merged-In: Iab3e6636f60a70cb124f29dc19f20f842fa8dfda
enderState.h
49796451cb9d1dae580618eb320ef3c5e6d90cd4 10-Aug-2016 Chih-Hung Hsieh <chh@google.com> Fix clang-tidy warnings in libs/hwui.

* Add explicit keyword to conversion constructors.
Bug: 28341362
* Use const reference type for read-only parameters.
Bug: 30407689
Test: build with WITH_TIDY=1

Change-Id: Iab3e6636f60a70cb124f29dc19f20f842fa8dfda
enderState.h
5e00c7ce063116c11315639f0035aca8ad73e8cc 07-Jul-2016 Chris Craik <ccraik@google.com> Delete old rendering pipeline

fixes: 30002246

Change-Id: I45df0e924708526cee045b14c291bd23aa1a92db
enderState.cpp
f6856b0f345797ecf988fdbfaa9b4da1266f71d2 17-May-2016 Chris Craik <ccraik@google.com> Merge "Fix hw layer overdraw/update visualization" into nyc-dev am: 189e3e5ec5 am: bd2edfca03
am: f075b05d5a

* commit 'f075b05d5a8516ff98d9c25c1b5ac307fdfc234a':
Fix hw layer overdraw/update visualization

Change-Id: I70968a90dbc3ea13654b7dbb8065d5a577a0f9ae
bd2edfca03bf09143a941c3859c4fbd3f8115aba 17-May-2016 Chris Craik <ccraik@google.com> Merge "Fix hw layer overdraw/update visualization" into nyc-dev
am: 189e3e5ec5

* commit '189e3e5ec5b698f1062fb98692fa75d3750148e0':
Fix hw layer overdraw/update visualization

Change-Id: Ic4c49b25e0d1709d34974adb828c3ab4644415e5
37413289478a965336239c731ebfea37ac4dde28 13-May-2016 Chris Craik <ccraik@google.com> Fix hw layer overdraw/update visualization

Fixes: 28748255

Change-Id: I83b531cdf5e4407fd17edd72d96e6189924926fa
ffscreenBufferPool.h
fd3744b7d88d0015cfb36be2b485c4b6ba0c1b58 12-May-2016 sergeyv <sergeyv@google.com> Move gl calls from PatchCache to MeshState

bug:27358166
Change-Id: I5f544f497e9480e64faa2ddd369eb16318e82dc3
eshState.cpp
eshState.h
85bf1a85bd694419f005641686bcbe034b4349f4 05-May-2016 Chris Craik <ccraik@google.com> Merge "Add layer tracing tags in new pipeline" into nyc-dev
am: f8892359b0

* commit 'f8892359b0ae07031160a71cf3f7e3a86604c2b1':
Add layer tracing tags in new pipeline

Change-Id: Id77f8234013d6bdbfd75b8fbc6a63b724820fd95
f8892359b0ae07031160a71cf3f7e3a86604c2b1 05-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add layer tracing tags in new pipeline" into nyc-dev
aff230f6f9f9e44a5e111ba3f087d03f7a0e24f3 05-May-2016 Chris Craik <ccraik@google.com> Add layer tracing tags in new pipeline

bug:28596354

Change-Id: I351cb50c8c9ddfc73be73d28a1af94d2a8f9992e
ffscreenBufferPool.cpp
92e7158f81843c23215d55dced1e25f15304eca5 04-May-2016 Chris Craik <ccraik@google.com> Merge "Use LUT for computing final shadow alpha" into nyc-dev
am: b2e36d7939

* commit 'b2e36d7939610de538a6ec95a821b61b365b3073':
Use LUT for computing final shadow alpha

Change-Id: Ia17e3b93e9ade0633aee5a1e9edd60b92dd1e062
138c21fbec12bead3c7ca1f181c3fd35542ccb00 29-Apr-2016 Chris Craik <ccraik@google.com> Use LUT for computing final shadow alpha

bug:27415250

Significantly reduces shadow fragment shader computation.

Change-Id: Ie9b3c712700754b3734d0ae9cda8751c298fc59e
enderState.cpp
extureState.cpp
extureState.h
85e0c89ba55188ecc484538efbfdb570606fc1a2 28-Apr-2016 Chih-Hung Hsieh <chh@google.com> resolve merge conflicts of 1599b981 to nyc-dev-plus-aosp

Change-Id: I90807581e10b6a0024515ff634ac8b29eaa5fc9f
c6baf563ba6aa207a48317c177b29f1d2b70cf3d 27-Apr-2016 Chih-Hung Hsieh <chh@google.com> Fix google-explicit-constructor warnings.

Bug: 28341362
Change-Id: Ibdd6a210bb7ff228e3624cc319169f77aca3b51e
enderState.cpp
74af6e282f8a8f75928a071e8200039517cf5c12 05-Apr-2016 Chris Craik <ccraik@google.com> Fix OffscreenBuffer leak

Fixes: 27941148

Make OffscreenBuffer lifecycle an explicit (and tested) contract between
FrameBuilder and BakedOpRenderer, entirely separate from dispatch. This
makes it safe to reject any rendering work via overdraw content
rejection (before it gets to a BakedOpDispatcher).

Adds a couple tests around OffscreenBuffer leaks, and switches
OffscreenBuffer tests to RENDERTHREAD_TEST macro, as appropriate.

Change-Id: Id114b835d042708ae921028fb4b17e5fa485fe64
ffscreenBufferPool.cpp
02806288d1c56475413888a934c796e6e4eb11c5 12-Mar-2016 Chris Craik <ccraik@google.com> Fix flickering when layers resize in-place

bug:27248275
Change-Id: Ia11c93ebc1097f3735071204b6f14ca079bb9fc4
ffscreenBufferPool.cpp
64db2bf1118db88c937e2b8c61b299bb2a80e3cb 27-Feb-2016 Chris Craik <ccraik@google.com> Clip buffer damage to viewport bounds

bug:27287946

Change-Id: Ief3ae9c2dd92196b7d09f1b9fadf009eb228d80a
ffscreenBufferPool.cpp
ffscreenBufferPool.h
1b7db4000eabb570697f4c5097588acbfa4df62b 25-Feb-2016 Chris Craik <ccraik@google.com> Cleanup vertex attrib management

bug:27289007

Also removes unused code in MeshState

Change-Id: I46116631111cc82e1cdffb5706344bbb6d4c6600
eshState.cpp
eshState.h
enderState.cpp
0b8d0677be2289bbc9e0b48c0878fb67d1cc0ebd 29-Jan-2016 John Reck <jreck@google.com> Fix copyLayerInto

Bug: 26763945
Change-Id: I21ffbd56cf70bad0928416963e6fc254be435af9
enderState.cpp
enderState.h
975591a7af883d866d86ab819e164c6004694744 23-Jan-2016 John Reck <jreck@google.com> Add fine-grained debug layer

Full GLES error checking layer via -include
trickery. Change DEBUG_OPENGL to a level system.

HIGH = every GL call is error checked
MODERATE = checkpointing at interesting spots
LOW = only asserts there are no errors at the end of a frame
or when the FBO changes
NONE = AIN'T GOT NO TIME FOR ERRORS GOTTA GO FAST!

Change-Id: Ibe81aae93d942059c4ddf1cbb11c828b7ce4c10b
enderState.cpp
bd41ded59090e8cdf598e0c65693f1cf0885bbea 22-Jan-2016 John Reck <jreck@google.com> Fix accidental activateTexture(0)

Bug: 26584230

activateTexture(0) was accidentally refactored into
Texture::upload. Only OffscreenBuffer intended for the
texture unit to change

Change-Id: I5dbfc3eab8843733084ce1ce38a0a946abf0e05b
ffscreenBufferPool.cpp
e5530ec0b4204f4f3b4f92a87056ce18a8d76793 22-Jan-2016 John Reck <jreck@google.com> resolve merge conflicts of 32a95af029 to master.

Change-Id: I35b7cea1d34cb24f431ba2b76433a5b0ef1cb602
c5a3efd28668a62df3e3b364b49624c5af7549b6 21-Jan-2016 Dohyun Lee <leedhyun11@gmail.com> libhwui: fix texture memory leak

When there is not enough space and we cannot delete any
Texture in TextureCache to secure space, a new Texture is
created over and over again for the same SkBitmap and
there is the case that it is not deleted.
This patch avoids such cases.

Change-Id: Ic5353995e6d0716c31fe3bb49c60ec1a71574643
Signed-off-by: Dohyun Lee <leedhyun11@gmail.com>
enderState.cpp
2de7771740ee08fcaff638ec6b2e460bb72fff04 20-Jan-2016 John Reck <jreck@google.com> Normalize GL_UNPACK_ALIGNMENT

Several places were setting GL_UNPACK_ALIGNMENT
unneccessarily, whereas other places were assuming an
unpack alignment of 1. Since we never actually
do explicit row-alignment, set GL_UNPACK_ALIGNMENT
to 1 at context creation time and never change it

Bug: 26584230

Also turns on aggressive glGetError checking to
better catch potential problem zones

Change-Id: I190c8f0f0494a7f046d5ed769405c75d363be59a
extureState.cpp
9372ac3621848085e77b867f220c0b5ffce4010d 19-Jan-2016 John Reck <jreck@google.com> Fix ordering of texture->upload arguments

Caught by scatter-shotting GL_CHECKPOINTS which
seem generally useful to have

Bug: 26609444

Change-Id: Ie31d9297d8dae56405126720f338b4256c8bae77
enderState.cpp
a55b5d6c65cde2b7cc28bb3ea160bfaaef7a446a 15-Jan-2016 John Reck <jreck@google.com> Fix "leak" in FrameBuilder.textureLayer test

DeferredLayerUpdater always did a post to delete itself, which
would result in the test thinking it had leaked an object since
it wasn't deleted when it returned. Fix this by deleting immediately
if we're already on the right thread.

Remove RenderState's requireGlContext assert as it's now
covered by GpuMemoryTracker, which is also more test friendly.
RenderState's assert required an actual EGL context, which we
don't mock away in unit tests.

Change-Id: Ic23eb54e7151355f7acca483d7464350c9d6a87f
enderState.cpp
enderState.h
38e0c32852e3b9d8ca4a9d3791577f52536419cb 10-Nov-2015 John Reck <jreck@google.com> Track texture memory globally

Also mostly consolidates texture creation

Change-Id: Ifea01303afda531dcec99b8fe2a0f64cf2f24420
ffscreenBufferPool.cpp
ffscreenBufferPool.h
enderState.cpp
extureState.cpp
extureState.h
7435eb148e72382126e9073183e881357bb38a8b 08-Jan-2016 Chris Craik <ccraik@google.com> Unclipped savelayer support in new renderer

bug:22480459

Change-Id: I89dd5de8d7d008a1e298d227d767aabff5c96e27
ffscreenBufferPool.cpp
ffscreenBufferPool.h
e4db79de127cfe961195f52907af8451026eaa20 23-Dec-2015 Chris Craik <ccraik@google.com> Stencil support in new recorder/reorderer

bug:22480459
bug:26358504

Adds complex (non-rectangular) clipping support, and overdraw
visualization. Doesn't support stencil clipping in layers.

Change-Id: I8d10c7f1d2769ab5756774ca672344cc09901f87
cissor.cpp
cissor.h
98787e6c9b2c10b1ab7820bdac168686025b924a 13-Nov-2015 Chris Craik <ccraik@google.com> Finish shadow support in new reorderer/renderer

Now passes alphas and light radius, and correctly transforms light
center for layers.

Also fixes begin-frame/layer clears to be damage rect aware.

Change-Id: I3b1415cd7bf1518c510145ebebdb745f494a2542
ffscreenBufferPool.h
9fded232a9548a304e0145011df8849fba0dcda7 12-Nov-2015 Chris Craik <ccraik@google.com> Recycle OffscreenBuffers

Change-Id: Ia2e219026f211a5308ecf8209c5f986bb888aadd
ffscreenBufferPool.cpp
ffscreenBufferPool.h
enderState.cpp
enderState.h
8d2cf943d9c7292e54726399faefdec4a01c084b 02-Nov-2015 Chris Craik <ccraik@google.com> Add region-tracking to OffscreenBuffers

Change-Id: I024c7219c080b9a89888517f5a89d49dfe8065ba
eshState.cpp
eshState.h
5854b34881b1a747ac80b5077869ef270a92b1f4 26-Oct-2015 Chris Craik <ccraik@google.com> Rework receiver/dispatcher design slightly, and replace Layer usage.

Switched from 'renderer/info' to 'dispatcher/renderer' to make their
interaction more natural. The new BakedOpRenderer is more similar in
responsibilities to the OpenGLRenderer, as it manages layer and frame
lifecycles, and performs the actual rendering.

However, it's still simpler because the BakedOpDispatcher handles
mapping Canvas drawing ops to Glops, and the OpReorderer handles almost
all canvas state operations.

Also switch BakedOpRenderer to use the new OffscreenBuffer, which
serves as a lightweight Layer replacement, with a much simpler
lifecycle.

Change-Id: Ie0e2e248503400041d49729d813d485d28c76eb3
enderState.h
818c9fbf1d76d5df19253ba4eb964efa939ec9ec 23-Oct-2015 Chris Craik <ccraik@google.com> Initial version of clipped saveLayer in new pipeline

Additionally disables usage of FBO cache, so FBO destruction safely
interacts with renderstate caching.

Change-Id: I25c277cb7afec2ca33bf226445d6c8867a15a915
enderState.cpp
enderState.h
12efe649d3f5df8e81f4b78179939c1d488673a0 29-Sep-2015 Chris Craik <ccraik@google.com> Move ortho matrix out of glop

It's fbo-global, so don't bother stashing/restoring it repeatedly.

Change-Id: Icb32e3eda5d2086aaae07140f8ff40e038dad5fe
enderState.cpp
enderState.h
8e5ca2a9908031ea589723319bb74314929e3f38 22-Sep-2015 Chris Craik <ccraik@google.com> Remove legacy enable/disable methods from Blend

Change-Id: I147f96d1fbdd34b9d056620e7259a9f96b13fea7
lend.cpp
lend.h
68f5b8a7810a011a068db3390c714bf02f3072c6 09-Sep-2015 Chris Craik <ccraik@google.com> Move texture upload behavior to TextureState

Change-Id: If1cb32bbc04f437fa0d079084de832de9fd777c2
extureState.cpp
extureState.h
8adc30a805c2510ffac2547514df9bf4ab59ffd3 22-Aug-2015 Chris Craik <ccraik@google.com> Merge "Add static asserts around assumed-static skia enum values"
b9ce116dac378b4cf4490f265dcbd5704a1dd43c 21-Aug-2015 Chris Craik <ccraik@google.com> Switch several enums to enum classes

Change-Id: I00ecd0b61657196b51704f70ca31a9d1c1ac254e
enderState.cpp
tencil.cpp
tencil.h
216048ffb0a4c41836c6ddb63f9b2e7a64593837 22-Aug-2015 Chris Craik <ccraik@google.com> Add static asserts around assumed-static skia enum values

Protects assumptions around enums value built into LUTs

Change-Id: Ica0692e4309d50b4d3897e0f3f47809d14f786fe
lend.cpp
9db58c031f8ffa102a6d585cb585bed3bdb911a9 20-Aug-2015 Chris Craik <ccraik@google.com> Remove MathUtils::min/max

bug:22202895

Change-Id: Ia115d86871314e3819f684ea7307356aed13a28e
enderState.cpp
9acd09d364ba96401053df79e5a19c3d83218339 04-Aug-2015 John Reck <jreck@google.com> am 598b0123: am 67716c13: am e28c5d62: am a975a844: am 70e5db94: Merge "Fix crash in kModeProcessNoContext" into mnc-dev

* commit '598b0123d322b396e8bfc3d66f228cf0b7485eac':
Fix crash in kModeProcessNoContext
95cd24bb9d000eb541bc7ec7e6b53d1c7e313076 04-Aug-2015 John Reck <jreck@google.com> Fix crash in kModeProcessNoContext

Bug: 22931143
Change-Id: I9897a28b1edd006aee67ae2343874ad92bbd15a0
enderState.cpp
9a579f58a65c00ac267de09ef73cb2c75104e5d8 30-Jul-2015 Chris Craik <ccraik@google.com> am e375685a: am 9c458148: am 3d208671: am 7dfb1d99: am 730c0f65: Merge "Fix stencil mask usage in HWUI" into mnc-dev

* commit 'e375685aa4b8d7f31b2cbe08170c32bd4150468d':
Fix stencil mask usage in HWUI
fa51a0e1ceb496e57f6c234800a3f5e9a2d89142 30-Jul-2015 Chris Craik <ccraik@google.com> Fix stencil mask usage in HWUI

bug:21588246

Ensure we always set the mask before clearing, and removes
some unneeded optimizations around mask usage in
debug (overdraw) mode.

Change-Id: I71ed06c16f8d9f158953d5aa160098514f0f7f00
tencil.cpp
1d5d34624bedbbe8f5ff60d81490da81301ebe7e 16-Jul-2015 Chris Craik <ccraik@google.com> Merge "Clean up unncessary defines"
5a4690bf26932c0d6940e4af8516d920e09ae81a 14-Jul-2015 Chris Craik <ccraik@google.com> Clean up unncessary defines

LOG_TAG and TRACE_TAG are already defined in the makefile

Change-Id: I9e53e3dacbe018441edd74cb7c8c90846defee74
tencil.h
e310f83d591dc3fb7bd5c684239481a586f00662 13-Jul-2015 Chris Craik <ccraik@google.com> Fix unsafety in SkiaShader storage, and texture unit accounting

bug:22390304

Fixes two issues:

1) The max texture unit wasn't large enough to handle the most complex
ComposeShader case (1 for draw primitive, 2 for gradient shader, 1 for
bitmap shader).

2) If a shader isn't supported by SkiaShader::store, the shader data
needs to be explicitly disabled, so we won't read uninitilized data
from it when trying to read shader information out.

Change-Id: I29ee7b7c1e07f67db88c1707bdc857daa305e713
extureState.cpp
extureState.h
53e51e4aa933f9603587e1780f446c18816bf9be 01-Jun-2015 Chris Craik <ccraik@google.com> Handle shader matrix correctly when ignoring canvas transform

bug:20063841

Restores old SkShader matrix behavior from before the Glop refactor.

Many drawing operations draw without sending the canvas transform to
the GL shader. In such cases, we need to adapt the matrix sent to the
SkShader logic to invert the canvas transform that's built into
the mesh.

Change-Id: I42b6f59df36ce46436322b95bf9ad2140795ee58
enderState.cpp
1e6d566c5f8500e3639a8f8ceebf0226c07efc13 27-May-2015 Chris Craik <ccraik@google.com> Merge "Fix GL texture binding for TextureViews" into mnc-dev
5f1356c80a3f0daf436aa4250dcfa8fce3029828 27-May-2015 Chris Craik <ccraik@google.com> Fix GL texture binding for TextureViews

bug:21431334

Should be explicitly passing target through, to ensure
GL_EXTERNAL_OES textures are bound correctly.

Change-Id: I997672ae292ea7fc016c02a59a3c7c8358ecfe0b
enderState.cpp
d7db4d767246b41d44995acb93d03d220b53c748 20-May-2015 John Reck <jreck@google.com> Eliminate requireGlContext

Bug: 20297820

Change-Id: I37c63bab6f6c0d2337c8c6002046d2ef17e74097
enderState.cpp
2507c34d91bb0d722b6012e85cb47387b2aa6873 04-May-2015 Chris Craik <ccraik@google.com> Cleanup properties

bug:19967854

Separate properties from Caches, into static, RenderThread-only class.

Also rewrites the means for java to set properties to correctly handle
threading, and adds an override for profile bars so that SysUi doesn't clutter
the screen with them.

Change-Id: I6e21a96065f52b9ecc49d1a126244804ba106fa9
enderState.cpp
e145013153b562d0b1bcac3e88095411874f1c25 29-Apr-2015 Chris Craik <ccraik@google.com> Require minimum 4 bit stencil for layers.

bug:19270131
Change-Id: I81367179d268e7c1642259c456c1f3d0018f6c0d
tencil.cpp
tencil.h
edacf22ca132ac48207a68aa30998f5b43d893b8 10-Mar-2015 Chris Craik <ccraik@google.com> Merge "Glop based composeLayerRegion/Rect"
182952f5eeefc2a21d76d4664ada0e2d78c1105c 09-Mar-2015 Chris Craik <ccraik@google.com> Glop based composeLayerRegion/Rect

Change-Id: I69440cabca84948e8aaead9479d616ebc2496517
lend.cpp
lend.h
eshState.cpp
eb911c2b0e8edeb7595a98af4b9f1bd47de1381e 07-Mar-2015 Chris Craik <ccraik@google.com> Rewrite glop texture asserts

bug:19641517

Also switch Glop VertexAttribFlags to use int for group of flags.

Change-Id: Ib7b1934197a62206a55baa6ab484ac59f5bec816
enderState.cpp
26bf34200e40a0fa8c66366559aa016380cd8c6f 27-Feb-2015 Chris Craik <ccraik@google.com> Glop TextureLayer support

Change-Id: I348a926bd4a2f47be9fdbe74058c0aa2f8dc6276
enderState.cpp
ef2507439c08f4e9c4c9bba1c6243ca9df2ee827 26-Feb-2015 Chris Craik <ccraik@google.com> Glop mesh reorg, support for drawBitmapMesh

Change-Id: Iaf5550bdd93da93e59a5b838234ab5612e067387
eshState.h
enderState.cpp
f27133df2d179c99d6bc1ae644af09e9153a0071 19-Feb-2015 Chris Craik <ccraik@google.com> Glop layer mesh rendering

Change-Id: I2d902819d5d77f496b67d4d25a298782903e410d
eshState.cpp
enderState.cpp
extureState.cpp
922d3a7f6f8c1c05a996ee3e91e8cbadfff560c9 14-Feb-2015 Chris Craik <ccraik@google.com> Glop SkiaShader support

Change-Id: I894a0b62701bd02367ab970813e4c332147351a2
enderState.cpp
30036092b40badecbe64d9c2bff4850132147f78 12-Feb-2015 Chris Craik <ccraik@google.com> Glop path texture support

Change-Id: I505eb05991ca4c9b2e01e49988b8f962fad51462
enderState.cpp
0519c810a56bded1284fcb2ae40f438878c6585f 11-Feb-2015 Chris Craik <ccraik@google.com> Glop Bitmap and RoundRect clipping support

Change-Id: I4577546a5d2e5f084cc03f39a89db9231b8111ee
lend.cpp
enderState.cpp
08fa43fdeb646f56edcd8b33d06ee7d79b203426 10-Feb-2015 Chris Craik <ccraik@google.com> Fix Glop vertex alpha blending

Need to force blending if vertices have alpha attribute

Change-Id: I821792db6b613b4d0243cf9c7a045cba014acdc1
eshState.cpp
2ab95d780b023152556d9f8659de734ec7b55047 07-Feb-2015 Chris Craik <ccraik@google.com> Glop support for indexed quads

bug:19014311
Change-Id: If35a873421b41cc4508b0d8ac1b4d900c9bb3717
eshState.cpp
eshState.h
enderState.cpp
tencil.h
f7ccbfbd9811e3b1c3accd9e3e92688d31a8a2bd 07-Feb-2015 Chris Craik <ccraik@google.com> Merge "Glop ColorFilter & VertexBuffer support, initial enable"
117bdbcfa3e8306dad21e7e01fa71b00cdfa7265 05-Feb-2015 Chris Craik <ccraik@google.com> Glop ColorFilter & VertexBuffer support, initial enable

Enables Glop rendering for supported Rects and VertexBuffers
Also removes unused Query object

Change-Id: Ibe227bc362685a153159f75077664f0947764e06
lend.cpp
lend.h
eshState.cpp
eshState.h
enderState.cpp
enderState.h
cissor.cpp
cissor.h
tencil.cpp
tencil.h
ecad24b49d20f7fb4b75950e9444787967acd347 05-Feb-2015 Chris Craik <ccraik@google.com> Merge "GlopBuilder, and test app refactor"
031888744e24b5c7243ac99ec98b78aff5db1c78 03-Feb-2015 Chris Craik <ccraik@google.com> GlopBuilder, and test app refactor

Change-Id: I2cd299ccf178007fd5f83bab6c3448f03aec7843
lend.cpp
lend.h
eshState.cpp
eshState.h
enderState.cpp
9dfd7bd520ee598b3033a0c47b8b649bd3988c7c 03-Feb-2015 Chris Craik <ccraik@google.com> Merge "Refactoring of Program ownership/lifecycle, and WIP Glop rendering path"
6c15ffa196fc9b7724c189d833c3435d8db12266 02-Feb-2015 Chris Craik <ccraik@google.com> Refactoring of Program ownership/lifecycle, and WIP Glop rendering path

Change-Id: I2549032790bddbc048b0bccc224ed8f386b4517c
eshState.cpp
eshState.h
enderState.cpp
enderState.h
d7328ae7909328ff4aa2205b0de0d4f6f72a2e66 30-Jan-2015 Chris Craik <ccraik@google.com> Merge "Refactor blending and texture gl state"
44eb2c00861098dd3e2950d923646814b4cc57c2 29-Jan-2015 Chris Craik <ccraik@google.com> Refactor blending and texture gl state

Change-Id: Ia6b3c8b2afd3dfcee7f3ce401d846b789612054a
lend.cpp
lend.h
enderState.cpp
enderState.h
extureState.cpp
extureState.h
ff5c8e8097e3eff910632a568195b798798ccccc 30-Jan-2015 Chris Craik <ccraik@google.com> Fix double create of Caches

bug:19208182
Change-Id: I91ac591cecc207da1b102013ca4985dd075cca80
enderState.cpp
49bc4acfadf9c5b1e520217278ccb38010d38c89 29-Jan-2015 John Reck <jreck@google.com> resolved conflicts for merge of fe5ac4fc to master

Change-Id: I6c0cc82db14b56297586469f940e408c0e218b3b
96a5c4c7bab6718524de7253da8309143ab48bef 28-Jan-2015 Chris Craik <ccraik@google.com> Move more GL state management to RenderState and its directory

Change-Id: Ic68584e1c08dc64be2ad43450cb6caa1de834fdc
eshState.cpp
eshState.h
ixelBufferState.cpp
ixelBufferState.h
enderState.cpp
enderState.h
cissor.cpp
cissor.h
tencil.cpp
tencil.h
65fe5eeb19e2e15c8b1ee91e8a2dcf0c25e48ca6 27-Jan-2015 Chris Craik <ccraik@google.com> Move scissor state to RenderState

Change-Id: I1227a3886fb24e4d9fad79fca469794f06cfb15e
enderState.cpp
enderState.h
cissor.cpp
cissor.h