summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android/TilesManager.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Reorganize platform/graphics/androidNicolas Roard2012-04-061-449/+0
| | | | Change-Id: Idc67155cfa99784dcd931e705336bfa063ecae46
* minor cleanupChris Craik2012-04-051-3/+2
| | | | Change-Id: Ib873df1bb3e7a76a5a34acc89e4deff217e698e0
* Rename several classesChris Craik2012-04-041-21/+25
| | | | | | | | | | | | | | | | | | | | BaseTile,BaseTileTexture -> Tile,TileTexture Used in layers other than the base LayerGroup -> Surface Renamed to convey that it is a member of the SurfaceCollection, and that the layers grouped inside are painted together (if at all) DualTiledTexture -> SurfaceBacking Better conveys that this is the raster backing for a surface that can paint. It may be implemented with two tiled textures for now, but that isn't as important as its relationship to the surface. TiledTexture -> TileGrid Renamed to make it more clear that it was a container of tiles, and to be less similar to TileTexture Change-Id: I843f8603a2080cfe5a7313ba1c2eff10620f8aa2
* Add back low res base layer rendering, and expanded bounds prefetchingChris Craik2012-03-301-14/+2
| | | | Change-Id: Ib6a38d8dd8223bdca9cb652771f0b19dbec892dc
* Fix TilesManager race conditionJohn Reck2012-03-231-6/+4
| | | | Change-Id: Ibbb8d6fa7565cf7d2205b28c8a9e870eb338ea14
* reimplement BaseLayerAndroid as a LayerAndroid subclassChris Craik2012-03-221-5/+0
| | | | | | Breaks low res tiling, and expanded rendering bounds. Change-Id: Iec3ba2adceb6bd95399594d29fd8c0b18c1122ce
* Remove unnecessary invertedTileSwitchJohn Reck2012-03-201-1/+0
| | | | Change-Id: Ifd27772aba0435ea55008400e4b42181bf45b944
* replace XLOGC/XLOG with ALOGD/ALOGVChris Craik2012-03-121-51/+36
| | | | | | | Started using ALOGW/E for indicating warnings/errors Also delete the unused TilesTracker.h Change-Id: I1986a3057efd4c8e260dbc020e21c02d4d646cf3
* Replace picture count with the SurfaceCollection countChris Craik2012-03-091-0/+1
| | | | | | Displays surface collection count on tiles when visual indicator is on. Change-Id: Ibe90792279849baff6f5bf0d71b80d9081471dc4
* Merge "layer rendering cleanup/rewrite"Chris Craik2012-02-281-62/+2
|\
| * layer rendering cleanup/rewriteChris Craik2012-02-281-62/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * added 'LayerGroup' class separate the painting/tiled features of a layer (eventually multiple layers) tiled drawing/preparing/counting details are abstracted out of LayerAndroid * added 'SurfaceCollection' class incorporates both the BaseLayerAndroid/LayerAndroid tree, as well as the vector of tiled LayerGroup * renamed 'TreeManager' to 'SurfaceManager' * Removes PaintedSurface was mostly a thin wrapper around DualTiledTexture * Combines TilePainter/SurfacePainter * Simplified ref counting Change-Id: I92c5c75f48d92e0e28812c56de00102399fc02ee
* | Delete the GL shader resources in a cleaner wayTeng-Hui Zhu2012-02-281-1/+0
|/ | | | | | bug:6079959 Change-Id: I55c96bb6abc90503c178607d0798c82e2c5ecaf1
* Gl resource should be re-initialized after EGL context changedTeng-Hui Zhu2012-02-271-0/+1
| | | | | | | | | EGLContext can be re-created when memory pressure is very high, that will delete all the GL resources automatically. After this, we should re-create the GL resources for webView. bug:6075574 Change-Id: I3035554d124cee38df3ba2dfae1eda0568b45d0f
* Reset the upper limit when onTrimMemoryTeng-Hui Zhu2012-02-211-1/+21
| | | | | | bug:6009351 Change-Id: I2619a4adc965014a749d575292137cf23c59b8c3
* Shrink the transfer queue by defaultTeng-Hui Zhu2012-02-071-0/+9
| | | | | | This change can save 1.25MB per process if the app is using webview. Change-Id: I32b691f15fa7d395e546963fa64e2fd269a89be9
* Clean up tranfer queue before EGL context destroyTeng-Hui Zhu2012-01-271-0/+11
| | | | | | | | | | | | | This will avoid ANR when texture generation thread is stuck b/c transfer queue is running out of slots, at the same time, EGL context get destroyed and no more draw call coming to free up more slots. Abandon the surface texture will also help to be more memory friendly. Move the highEndGfx check to TilesManager. bug:5639899 Change-Id: I98f0289ae5ca18361f71dec853327223506e3073
* Add tree swapping properties and statsChris Craik2012-01-241-0/+2
| | | | Change-Id: I0033b8794ae33dade050069d6c209653f0d21fd1
* am e5b68556: am 41aebb2b: Return the tile generation thread to default priority.Chris Craik2012-01-041-1/+1
|\ | | | | | | | | * commit 'e5b6855637cefa440231d37a2dc4326bebe9833e': Return the tile generation thread to default priority.
| * Return the tile generation thread to default priority.Chris Craik2012-01-031-1/+1
| | | | | | | | | | | | | | With this partial revert of ececd484e5832707be4a73b70da37f862eb14c35 , single core devices can't have tile generation starved by javascript/plugins. bug:5746432 Change-Id: I42b5799f4ba136e1c6f9812219824d21390bace2
* | Fix invalid reads in transfer queue cleanup.Selim Gurun2011-12-221-7/+0
| | | | | | | | | | BUG: 5796767 Change-Id: I07a6c4d70886ba9833ae3eddeb91a9a0c2e8a49e
* | Clean up all the old code paths before TransferQueueTeng-Hui Zhu2011-12-151-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | TransferQueue is using one GL texture per tile, which is the best in terms of memory usage. The old code paths include EGLImage mode and SurfaceTexture per tile mode. At the same time, all the locks related to EGLImage are deleted too. There should be no funcationality change here. By deleting the DoubleBufferTexture, the only thing need to be added into BaseTileTexture is the TextureInfo, which can be optimized further in the future. Change-Id: If27fbca7cb55c73d94fbde3ba02d6208707ad8f0
* | update callback mechanism, adds nativeDiscardAllTextures for TileBenchmark toolChris Craik2011-12-131-9/+18
| | | | | | | | | | | | | | | | bug:5062896 Depends on frameworks/base change: https://android-git.corp.google.com/g/#/c/154844/ Change-Id: I8e5101fa212568837fe002b14fb9171c2f6dfe22
* | compiler error fix when DEBUG is onTeng-Hui Zhu2011-12-061-2/+2
|/ | | | Change-Id: Ifaaefdbe0724a95e9c237c1fe3c5a7c25026839e
* Fix image layer codepathNicolas Roard2011-11-301-0/+17
| | | | | | | | | | | | | | - asynchronous loading - support for tiled content using TiledTexture - fix repaint/duplication bugs - share same textures as layers - disambiguate between images by computing a CRC code - added better debugging in TilesManager/ClassTracker to track memory usage bug:5661120 bug:5572134 bug:5521718 Change-Id: Id422fb991d6233bbe4dc6e5c3c7409468b7dca98
* Merge "Use isHighEndGfx to double textures" into ics-mr1John Reck2011-11-211-1/+1
|\
| * Use isHighEndGfx to double texturesJohn Reck2011-11-211-1/+1
| | | | | | | | | | | | Bug: 5639612 Change-Id: I308f6fbb8208a0d2e83f2b6d285d4c471137a0e7
* | Set the number of current textures depending on the layers' count,Nicolas Roard2011-11-181-12/+52
|/ | | | | | | | to avoid going to single drawing surface if we can. Also fix a crash when logging layers. bug:5279231 Change-Id: I1c3f2ce4bcedac1c172e87c7ec3c6692d8e35e14
* synchronous layer updates, and animation deferral during paintChris Craik2011-11-161-17/+13
| | | | | | | | bug:5522081 bug:5239801 bug:5297563 Change-Id: I600f66999e093f720a8ea97ef3e15d3d1d297a8f
* Merge "Change the default webView behavior to minimize the memory ↵Teng-Hui Zhu2011-11-071-0/+1
|\ | | | | | | consumption" into ics-mr1
| * Change the default webView behavior to minimize the memory consumptionTeng-Hui Zhu2011-11-071-0/+1
| | | | | | | | | | | | | | | | | | | | For now, we just limit the expansion on x and y direction. In the future, we need to dynamically allocate and deallocate the memory. browser change is : c/148242 bug:5522175 Change-Id: I8562c39c55913ab89848afe8a36e8a2784c12727
* | Doesn't lock the entire drawing...Chris Craik2011-11-041-1/+1
|/ | | | | | | | | | | | | | | This caused us to potentially waiting on the completion of a tile painting. On sites where skia struggle with, this had a large impact on scrolling performances. This is only part one of the solution -- we need to also get rid of the global button lock. We also lower the priority of the texture gneeration thread. bug:5558699 Change-Id: I251354d6cabb2fd7ebfd665c30eff7fe90c3d316
* am 6032fa42: Merge "Implement dual textures for layers to handle zooming ↵Nicolas Roard2011-10-201-2/+2
|\ | | | | | | | | | | | | correctly." into ics-mr0 * commit '6032fa428d725097ea29fc85fc1b2c965094772b': Implement dual textures for layers to handle zooming correctly.
| * Implement dual textures for layers to handle zooming correctly.Nicolas Roard2011-10-201-2/+2
| | | | | | | | | | | | | | | | | | We add a new class, DualTiledTexture, that encapsulate two TiledTextures and manage them according to the current scale factor. bug:5492874 Change-Id: I4ba3ff539f9242ae5102189e9623e1535e9cc28f
| * Double number of tile textures allocated - do not mergeChris Craik2011-10-131-1/+1
|/ | | | | bug:5452814 Change-Id: Ib13a0f4e5189af0e4928bc376b29610e20eeb4dc
* Refactor the image sharing codeNicolas Roard2011-10-121-46/+0
| | | | | | | | | We add a separate Images Manager, working both in GL and software rendering. bug:5425148 Change-Id: Ib5bc88ad94d49c7f1eb969a716691ac98dc10b77
* Merge "Fixed infinite redraw loop from running out of layer tiles" into ics-mr0Chris Craik2011-10-111-1/+9
|\
| * Fixed infinite redraw loop from running out of layer tilesChris Craik2011-10-111-1/+9
| | | | | | | | | | | | | | | | | | | | | | bug:5349958 Clear a flag when a layer tile can't allocate a texture, and only try and redraw from tile dirtiness if that flag is set. Also, don't ask for redraw if offending tiles are offscreen. Change-Id: Iadb0cb267a9c1f308e5b42a6e0e3b4bc71d18ece
* | Mark tiles discarded by TransferQueue as dirtyChris Craik2011-10-111-2/+2
|/ | | | | | | | | | | | bug:5409902 Tiles were being discarded from the queue (and simply unsuccessfully added). This caused them to get stuck in the 'ValidatedUntransferred' state. Now if a tile isn't added successfully, or if it's discarded, it removes its painting texture and will have to repaint from scratch. Change-Id: I551e00fb8a6be3b0f3cabeabaa91e8b8b30019d5
* Remove m_contentsImage usageJohn Reck2011-10-041-2/+2
| | | | | | Bug: 5410522 Change-Id: Id8457715665dbd51761900011beba57b7f634fff
* Merge "Use state machine to track tile state"Chris Craik2011-09-291-1/+4
|\
| * Use state machine to track tile stateChris Craik2011-09-291-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bug:5369978 Manage invalidations, painting, transferring, and swapping with a state machine. notes: * readyFor shouldn't be needed if all of the events that would cause a readyfor fail mark the tile dirty (such as stealing, scale change) * changing the scale of a page should discard all textures * m_dirty should be more gracefully worked into the state machine * a tile may drop dirtiness notifications if it's already painting, since upon completion m_dirty will be cleared - (issues for layers only) Change-Id: I5909fb5d208da2fb276e223c56bf143741a9a24c
* | Fix a memory leak with LayerAndroidNicolas Roard2011-09-291-10/+38
|/ | | | | | | (we had a cycle between LayerAndroid and PaintedSurface) bug:5366807 Change-Id: I1b7341984b3cc6fd998b9ab54205bb963eb9223d
* Dynamically set the upper limit of layer tiles' texture numberTeng-Hui Zhu2011-09-271-19/+9
| | | | | | | | | | Instead of using a static number, now the upper limit of the layer tiles is also dependent on the viewport size. At the same time, get rid of the old code only useful without tiled layer. bug:5347539 Change-Id: Ie720449ea15043d42a56f4c8af57820fa7f6e93c
* Increase the texture number for layersTeng-Hui Zhu2011-09-271-1/+1
| | | | | | | | This will break the Gpu upload code path on phones which is turned off by default, but it will work on the tablet. bug:5347539 Change-Id: Idc9889a8681035addd85843191322039a69110e5
* Add shared images for layersNicolas Roard2011-09-261-0/+46
| | | | | | bug:5242595 bug:5218173 Change-Id: I37d395e85441671312aac3e236cc8276019aa990
* Fix missing tilesChris Craik2011-09-191-7/+17
| | | | | | | | | | bug:5335634 Fix issue where stealing a back texture from a tile (while the tile was ready to swap) wouldn't mark tile as dirty. Now, mark tile dirty whenever texture is stolen from it, and avoid trying to steal busy textures. Change-Id: Iacbda17ba4b4c6382ceb1c84a6e5f02e609a76a5
* Fix layer tile allocation to be more consistent, less discoChris Craik2011-09-121-7/+15
| | | | | | | | | | | | | | bug:5290559 Two major things: * Avoid swapping front/back textures before the textures have been blitted to avoid race condition where blit fails because it doesn't see a back texture * Don't allow a tile to acquire its front texture to paint into, as the acquisition logic doesn't handle this. Change-Id: I84b59396ca9faaf3ddc7c75b6f66e4736bf4c3cf
* Merge "Stop layer tile flickering"Chris Craik2011-09-081-11/+14
|\
| * Stop layer tile flickeringChris Craik2011-09-081-11/+14
| | | | | | | | | | | | | | bug:5265207 Don't steal textures with a draw count from last frame to prevent flickering Change-Id: I0a37b2417f0721b150b47920feea9ddb1666ec28
* | Deallocate graphics memory with onTrimMemory signalsChris Craik2011-09-081-0/+35
|/ | | | | | | | bug:5269460 Deallocate the graphics memory backing a BaseTileTexture on onTrimMemory signals, and accordingly allocate it lazily, as needed. Change-Id: I52039723f47e6470e4fe8dd987d384017005390f