summaryrefslogtreecommitdiffstats
path: root/libs/hwui/Rect.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix Clang warnings/errorsChris Craik2014-01-021-8/+8
| | | | | | | Fix several build warnings (struct != class, int != size_t) and errors (variable leng non-POD arrays). Change-Id: I70b4e784365514303d8954bfcb1f39d7c22c1321
* Clean up quick rejection, especially surrounding points + lines.Chris Craik2013-11-221-0/+7
| | | | | | | | | | | | | | | | | | | | bug:4351353 quickReject and quickRejectNoScissor have been renamed and refactored: - to make the scissor side effect clear and explicit - dangerous methods no longer public - to make the simple quick reject check logic const - simple quick reject is now conservative This CL also fixes several issues with line and point quickRejection - sub-pixel and hairline lines are much less likely to be incorrectly rejected, especially at small canvas scale. Additionally, alpha modulation for AA points < 1px in size is now correct, dumplicating SW behavior (similar to lines and stroked shapes work). Change-Id: Ibb0710c721b9fb415d05acf54dd3d2b4d602156a
* Conservatively estimate geometry boundsChris Craik2013-09-171-9/+31
| | | | | | | | | | | | | | bug:10761696 Avoids a case where a rect with top coordinate of (e.g.) 0.51f is assumed to not draw in the first row of pixels, which leads to it not being clipped. Since rounding can cause it to render in this first pixel anyway, we very slightly expand geometry bounds. Now, in ambiguous cases, the geometry bounds are expanded so clipping is more likely to happen. Change-Id: I119b7c7720de07bac1634549724ffb63935567fc
* Fix quickReject's handling of AA ramp geometryChris Craik2013-08-021-0/+14
| | | | | | | | By having quickReject round out the window-space geometry bounds, we prevent the AA perimeter (which falls outside the local bounds passed in) from drawing outside the clip. Change-Id: I8ee36be9039a9c47906815ee2f0dbaa5eb910b82
* Fix various draw ops that may incorrectly not scissorChris Craik2013-06-131-1/+1
| | | | | | | | | | bug:8965976 Also consolidates quickReject scissor-ing and scissor-less paths. Renamed plain 'quickReject' method, as it has sideEffects beyond what the java and skia canvases do. Change-Id: I4bdf874d3c8f469d283eae1e71c5e7ea53d47016
* Overdraw avoidance and merging of clipped opsChris Craik2013-06-121-0/+4
| | | | | | | | | | | | | | | | | bug:8951267 If an opaque op, or group of opaque ops covers the invalidate region, skip draw operations that precede it. Clipped operations may now be merged, but only if they share a clipRect - this is a very case for e.g. ListView, where all background elements may now be a part of the same MergingDrawBatch. It is this more aggressive merging that groups together clipped background elements in the ListView case, enabling the overdraw avoidance skipping the window background. Change-Id: Ib0961977e272c5ac37f59e4c67d828467422d259
* Merge scaled bitmaps with translated bitmapsRomain Guy2013-05-211-2/+2
| | | | Change-Id: I03089f48f97b69fcb4a0171984d3ff548d41c4a8
* DisplayList draw operation reorderingChris Craik2013-02-151-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Object-based DisplayList recordingChris Craik2013-01-221-11/+8
| | | | | | | | | | | | | bug:8037003 Changes the DisplayList from using stream read/write commands to use an array of objects manually allocated on a linear buffer. Depends on frameworks/native change https://googleplex-android-review.googlesource.com/#/c/257695/ which adds LinearAllocator Also changes drawRects to use float count instead of rect count, to be more like drawLines/drawPoints Change-Id: Ia2e4a11acd8f0a757042a05cbc9e7563cb73ee47
* Improve rendering speed by disabling scissor testsRomain Guy2012-07-131-2/+2
| | | | | | | | | | | | This change improves execution of display lists, particularly on tiled renderers. The goal is to disable the scissor test as often as possible. Drawing commands are rarely clipped by View bounds so most of them can be drawn without doing a scissor test. The speed improvements scale with the number of views and drawing commands. Change-Id: Ibd9b5e051a3e4300562463805acc4fd744ba6266
* Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGESteve Block2012-01-031-1/+1
| | | | | | | See https://android-git.corp.google.com/g/156016 Bug: 5449033 Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
* Generate even fewer GL commandsRomain Guy2011-12-141-1/+9
| | | | Change-Id: I0f4dcacb03ef5ee7f6ebd501df98bfead5f0a7f8
* <Insert something improper about OpenGL>Romain Guy2011-12-131-0/+8
| | | | Change-Id: Ib645376093838156771588adc76a718da0ceb0db
* Further reduce the number of GL commands sent to the driverRomain Guy2011-12-131-13/+15
| | | | Change-Id: Id922b2a166ea4573b767c27d3195e11c70320b23
* fix the float Rect in OpenGLRenderer to handle NANsMathias Agopian2011-09-191-36/+26
| | | | | | | | | | | | | | | - we want functions like isEmpty() to return true if NANs are involved in the Rect - also clean-up the intersect familly of calls - minor cleanup in the int32_t Rect as well These played a role in http://b/5331198. Bug: 5331198 Change-Id: I5369725ab482e4b83da9f1bd4cee5256e5de75b2
* Optimize FBO drawing with regions.Romain Guy2010-11-021-12/+35
| | | | | | | | | This optimization is currently disabled until Launcher is modified to take advantage of it. The optimization can be enabled by turning on RENDER_LAYERS_AS_REGIONS in the OpenGLRenderer.h file. Change-Id: I2fdf59d0f4dc690a3d7f712173ab8db3848b27b1
* Fix rendering issue with layers.Romain Guy2010-10-221-4/+4
| | | | | | | | | | | A change was made earlier in the renderer to not snap the current clip rect on every clip operation. The clip rect must not be snapped to pixel boundaries before being used for pixel precision operations. Some operations were doing this correctly, others were not. For instance, a layer was always created by rounding to the correct pixels, but composing a layer was done with a non rounded clip, thus resulting in slightly odd behaviors. Change-Id: I31c2cf0a343450470bcd449c3f13fe37648b9c7c
* Fix layer rendering glitch.Romain Guy2010-10-131-4/+4
| | | | Change-Id: If2f987fe5526fc88743ca3e91edde4f8232ff658
* Add support for drawLines(), with anti-aliasingRomain Guy2010-09-161-1/+1
| | | | Change-Id: I16c0593c5671490909dec13a85df601e1428a1a6
* Snap layer bounds to pixel boundaries.Romain Guy2010-09-161-0/+7
| | | | Change-Id: I272ceebf469a119f01ea9d73cdd68519afdffa99
* Add support for Canvas flags on save.Romain Guy2010-09-011-2/+2
| | | | | | This is required for the rewrite of layers support. Change-Id: I5c0867dcf5aeb0392c8d0fbab05febb0eaff70d9
* Improve clip support (add intersect, union and replace.)Romain Guy2010-07-161-0/+19
| | | | | | | This change also modifies the way the clip is stored. The clip is now always stored in screen-space coordinates. Change-Id: I96375784d82dfe975bc6477a159e6866e7052487
* Reduced the complexity of layers composition.Romain Guy2010-06-271-0/+2
| | | | | | | | | | | This change also refactors the code base a bit by moving classes out of OpenGLRenderer into separate headers/implementations. This makes the code more manageable. This change also adds documentation for implementation methods. The undocumented methods are simply Skia's Canvas methods. Change-Id: I54c68b443580a0129251dddc1a7ac95813d5289e
* Convert tabs to spaces.Romain Guy2010-06-251-105/+105
| | | | Change-Id: I5d3ae48af79b19b6d293deff0521e4bb57d5114b
* Add colored rectangles implementation in OpenGLRenderer.Romain Guy2010-06-241-3/+17
| | | | | | | Drawing two rectangles one after the other discards the second one because of Z buffering issues. This will be fixed in another changelist. Change-Id: Ida1b3cde8a78e60cacc07e477abc44def527ff67
* Add implementations for clipRect(), save() and restore().Romain Guy2010-06-231-0/+125
The current implementation of clipRect() does not apply local transformations before setting the new clip. Change-Id: I5997871bb638dfcd1a8ef96354846af52427e445