summaryrefslogtreecommitdiffstats
path: root/include/surfaceflinger
Commit message (Collapse)AuthorAgeFilesLines
* am 70ac412b: Merge "Add a LayerScreenshot" into ics-mr0Dave Burke2011-10-181-0/+1
|\ | | | | | | | | * commit '70ac412b2fe7be2507189a9fdfb30c43b36d56ac': Add a LayerScreenshot
| * Add a LayerScreenshotMathias Agopian2011-10-181-0/+1
| | | | | | | | | | | | | | | | | | | | A LayerScreenshot is a special type of layer that contains a screenshot of the screen acquired when its created. It works just like LayerDim. Make sure to call compositionComplete() after rendering into a FBO. Bug: 5446982, 5467587, 5466259 Change-Id: I5d8a1b4c327f9973d950cd4f4c0bca7f62825cd4
* | am 840b8a67: Revert "Add a LayerScreenshot"Mathias Agopian2011-10-171-1/+0
|\ \ | |/ | | | | | | * commit '840b8a678537519c27ddf2f818494eaa20a135d4': Revert "Add a LayerScreenshot"
| * Revert "Add a LayerScreenshot"Mathias Agopian2011-10-161-1/+0
| | | | | | | | This reverts commit d6809f40cf61203573ec5dbc437f695cd132cc18.
* | Merge branch 'master' of ssh://android-git:29418/platform/frameworks/baseElliott Hughes2011-10-172-5/+7
|\ \ | |/ |/|
| * SurfaceFlinger: Remove display freezing codeJamie Gennis2011-10-141-2/+0
| | | | | | | | | | | | | | This change removes the dead code from SurfaceFlinger that resulted from disabling support for freezing the display. Change-Id: I4e5ff00c94b4c7a79af2f65c9850c135210068ed
| * SurfaceFlinger: make sync transactions explicitJamie Gennis2011-10-142-3/+7
| | | | | | | | | | | | | | This change enables a layer or orientation update transaction sent to SurfaceFlinger to explicitly request a synchronous transaction. Change-Id: I97cbba610c13679849f66114b216fa6dbf12f2a9
* | Add a LayerScreenshotMathias Agopian2011-10-141-0/+1
|/ | | | | | | | A LayerScreenshot is a special type of layer that contains a screenshot of the screen acquired when its created. It works just like LayerDim. Bug: 5446982 Change-Id: I7814aff2380e7e146937f2b641907be2a30c76cc
* SurfaceFlinger: update orientation via transactionsJamie Gennis2011-10-112-10/+3
| | | | | | | | | | | This change merges the ISurfaceComposer::setOrientation functionality into ISurfaceComposer::setTransactionState. It enables the window manager to atomically update both the display orientation and the position and size of the windows in a single transaction with SurfaceFlinger. Bug: 5439574 Change-Id: I18a8ccc564d7d760ef8afb2d015ccdb7a7963900
* Handle orientation changes more systematically.Jeff Brown2011-09-211-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 4981385 Simplify the orientation changing code path in the WindowManager. Instead of the policy calling setRotation() when the sensor determined orientation changes, it calls updateRotation(), which figures everything out. For the most part, the rotation actually passed to setRotation() was more or less ignored and just added confusion, particularly when handling deferred orientation changes. Ensure that 180 degree rotations are disallowed even when the application specifies SCREEN_ORIENTATION_SENSOR_*. These rotations are only enabled when docked upside-down for some reason or when the application specifies SCREEN_ORIENTATION_FULL_SENSOR. Ensure that special modes like HDMI connected, lid switch, dock and rotation lock all cause the sensor to be ignored even when the application asks for sensor-based orientation changes. The sensor is not relevant in these modes because some external factor (or the user) is determining the preferred rotation. Currently, applications can still override the preferred rotation even when there are special modes in play that might say otherwise. We could tweak this so that some special modes trump application choices completely (resulting in a letter-boxed application, perhaps). I tested this sort of tweak (not included in the patch) and it seems to work fine, including transitions between applications with varying orientation. Delete dead code related to animFlags. Handle pausing/resuming orientation changes more precisely. Ensure that a deferred orientation change is performed when a drag completes, even if endDragLw() is not called because the drag was aborted before the drop happened. We pause the orientation change in register() and resume in unregister() because those methods appear to always be called as needed. Change-Id: If0a31de3d057251e581fdee64819f2b19e676e9a
* fix Surface positions are not floatsMathias Agopian2011-08-301-1/+1
| | | | | | | | Added Surface.setPosition(float, float) which allows to set a surface's position in float. Bug: 5239859 Change-Id: I903aef4ad5b5999142202fb8ea30fe216d805711
* SurfaceTexture: fix queues-to-composerJamie Gennis2011-08-171-2/+3
| | | | | | | | | | | This change fixes the NATIVE_WINDOW_QUEUES_TO_WINDOW_COMPOSER query of Surface and SurfaceTextureClient. Surface now uses the inherited SurfaceTextureClient implementation of this query. SurfaceTextureClient now queries SurfaceFlinger to determine whether buffers that are queued to its ISurfaceTexture will be sent to SurfaceFlinger (as opposed to some other process). Change-Id: Iff187e72f30d454229f07f896b438198978270a8
* Add support for creating a Surface from a a SurfaceTexture.Ted Bonkenburg2011-07-221-2/+5
| | | | | | | | The Surface is already using SurfaceTexture internally and it is parcelable. This is intended to replace and phase out ParcelSurfaceTexture in favor of creating a new Surface.java object from an existing SurfaceTexture. Change-Id: I8e2dd86614523da6abed6403e1d705a68fa19fdf
* clean-up. get rid ofunused code and members in Surface[Control].cppMathias Agopian2011-07-202-34/+2
| | | | Change-Id: Ia7790ae28af2c2ac99eae01c2c5044ace4a490a4
* move lock/unlock implementaion outside of Surface into SurfaceTextureClientMathias Agopian2011-07-151-63/+6
| | | | | | | | | | This makes ANativeWindow_lock/ANativeWindow_unlockAndPost work with ANativeWindows implemented by Surface and SurfaceTextureClient. Also, Surface now inherits directly from SurfaceTextureClient. Bug: 5003724 Change-Id: I9f285877c7bae9a262e9a7af91c2bae78804b2ef
* return an error code with gralloc buffer allocation failuresMathias Agopian2011-07-011-1/+1
| | | | Change-Id: I471e5d37ea7a42fc8a0f93446ee3b4229da37807
* SF transactions are now O(1) wrt IPC instead of O(N).Mathias Agopian2011-06-293-28/+12
| | | | Change-Id: I57669852cbf6aabae244ea86940a08a5a27ffc43
* Add method to create a ParcelSurfaceTexture from android.view.Surface.tedbo2011-06-221-0/+2
| | | | Change-Id: I05e343ab7e327478f60322af9373574b70c148f5
* unify SurfaceTexture and SurfaceMathias Agopian2011-06-136-112/+13
| | | | | | | Add the concept of synchronous dequeueBuffer in SurfaceTexture Implement {Surface|SurfaceTextureClient}::setSwapInterval() Add SurfaceTexture logging fix onFrameAvailable
* frameworks/base: android_native_buffer_t -> ANativeWindowBufferIliyan Malchev2011-05-031-8/+8
| | | | | Change-Id: Idc2eabaa805bb6d308ebb315872623f28d428417 Signed-off-by: Iliyan Malchev <malchev@google.com>
* frameworks/base: make the ANativeWindow query() method constIliyan Malchev2011-05-031-2/+2
| | | | | | | query() does not modify the object's data, so it needs to be a const method Change-Id: I67c40a3c865461e6f1cc2193fd2d74286ff6ac8f Signed-off-by: Iliyan Malchev <malchev@google.com>
* Get rid of the "pid" parameter from createSurfaceMathias Agopian2011-04-202-3/+0
| | | | Change-Id: I28635e3f803e6abe965d79998e305f54a202465d
* Fix a GraphicBuffer leak in SurfaceTextureMathias Agopian2011-04-081-9/+1
| | | | | | | | | | | | | | | | | This leak was intentional, it was there to deal with the fact that some gralloc implementations don't track buffer handles with file-descriptors so buffers needed to stay alive until there were registered, which is not guaranteed by binder transactions. In this new implementation, we use a small BBinder holding a reference to the buffer, which with tuck into the parcel. This forces the reference to stay alive until the parcel is destroyed, which is guaranteed (by construction) to happen after the buffer is registered. this allows the public facing API to not expose the previous hack. Change-Id: I1dd6cd83679a2b7457ad628169e2851acc027143
* remove more unused references to ISurfaceMathias Agopian2011-04-051-5/+1
| | | | Change-Id: I2201f1ca2bb8f203a081d94a0134f798778dfbef
* Add support for timestamps into SurfaceTexture.Eino-Ville Talvala2011-03-171-1/+3
| | | | | | | | | | | | | | | | | API addition: The timestamps are represented as nanoseconds from some arbitrary time point. Like the SurfaceTexture transform matrix, the timestamp retrieved by getTimestamp is for the last frame sent to the GL texture using updateTexImage(). Camera HAL change: Expect vendors to set these timestamps using native_window_set_buffers_timestamp(). For now, they are autogenerated by SurfaceTextureClient if set_buffers_timestamp() is never called, but such timing is likely not accurate enough to pass a CTS test. bug:3300707 Change-Id: Ife131a0c2a826ac27342e11b8a6c42ff49e1bea7
* ANativeWindow: add queues-to-window-composer check.Jamie Gennis2011-03-081-1/+6
| | | | | | | | | This change adds a new 'method' to the ANativeWindow interface to check whether buffers queued to the window will be sent directly to the system window compositor. Change-Id: I4d4b199e328c110b68b250029aea650f03c8724d Bug: 3495535
* Add the MIN_UNDEQUEUED_BUFFERS query to ANW.Jamie Gennis2011-02-281-0/+4
| | | | | | | | | This change adds a new query to ANativeWindow for getting the minimum number of buffers that must be left un-dequeued during the steady-state operation of the ANativeWindow. Change-Id: Ie8c461fc26b02ecde02ddb4f95bf763662cf1551 Related-Bug: 3356050
* Protected surface APIGlenn Kasten2011-01-281-0/+2
| | | | | | To be used by DRM framework, implemented by display HAL Change-Id: I054a07a94f4d5dbe792f3a597e2e49a100d90eb2
* integrate videoeditor preview player.Dharmaray Kundargi2011-01-161-0/+6
| | | | Change-Id: I83084f494605c8e6f4d198afa8c36f9e29579667
* Merge "Fix error reporting in Surface::cancelBuffer()" into honeycombMathias Agopian2011-01-141-1/+1
|\
| * Fix error reporting in Surface::cancelBuffer()Mathias Agopian2011-01-141-1/+1
| | | | | | | | | | | | | | | | | | when we validate the surface there, most errors are in fact allowed because it is legal to cancel a buffer after a surface has been destroyed (for instance). in that case make sure to not log error messages as they are very confusing. Change-Id: Iecdfbaf6d9ee5da54d56cd7ea7a0d430c30934b0
* | Fix remote GraphicBuffer allocation in SurfaceFlinger.Jamie Gennis2011-01-132-8/+70
|/ | | | | | | | | | | This change fixes a horrible hack that I did to allow application processes to create GraphicBuffer objects by making a binder call to SurfaceFlinger. This change introduces a new binder interface specifically for doing this, and does it in such a way that SurfaceFlinger will maintain a reference to the buffers until the app is done with them. Change-Id: Icb240397c6c206d7f69124c1497a829f051cb49b
* Add the ISurfaceComposer::createGraphicBuffer IPC.Jamie Gennis2011-01-061-0/+8
| | | | | | | | This change adds a new binder method to the ISurfaceComposer interface. This IPC is intended to allow SurfaceFlinger clients to allocate gralloc buffers using SurfaceFlinger as a proxy to gralloc. Change-Id: Ide9fc283aec5da6268ba62cfed0c3319a50b640d
* Merge "minor clean-up. SurfaceFlinger doesn't need libpixelflinger.so."Mathias Agopian2010-12-141-1/+1
|\
| * minor clean-up. SurfaceFlinger doesn't need libpixelflinger.so.Mathias Agopian2010-12-131-1/+1
| | | | | | | | Change-Id: I3bdca74351c8e480a05084bc412a96c5f685221d
* | [3258939] Need snapshot to limit which layers are includedMathias Agopian2010-12-102-1/+4
|/ | | | Change-Id: Id7351a0e3f53dde99b291cffba553d89fd4d7ca9
* remove support for PUSH_BUFFER surfaces and overlaysMathias Agopian2010-12-082-50/+3
| | | | | | | the same functionality is now supported through the h/w composer HAL, and YUV support in the GPU. Change-Id: I8146605449954b8e8fd7f78810b7d873c2d8f5bf
* am 7e9a54d4: am d4e03f37: addresses parts of 3096779 and 3097475Mathias Agopian2010-10-161-0/+5
|\ | | | | | | | | | | | | Merge commit '7e9a54d460030a871a4f05e61e943c6a694e9ef8' * commit '7e9a54d460030a871a4f05e61e943c6a694e9ef8': addresses parts of 3096779 and 3097475
| * addresses parts of 3096779 and 3097475Mathias Agopian2010-10-141-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 3097475: Animation setting should control the screen on animation 3096779: CRT power-on animation can briefly show the top app instead of lockscreen There is now a parameter that controls wether the ON and/or OFF animation are performed. we also always clear the screen to black on power off, to make sure it won't briefly appear on power on. HOWEVER, 3096779 is not 100% fixed in the case where we're doing the animation because there is a race, where SF doesn't wait (b/c it doesn't know) for the framework to have redrawn the lockscreen. Change-Id: Ie0f02c9225fcdf24b1e8907e268eb7da2c5b0a03
* | am 5bfa3a34: am 011b5bcc: Merge "implement part of [3094280] New animation ↵Mathias Agopian2010-10-151-1/+3
|\ \ | |/ | | | | | | | | | | | | | | for screen on and screen off add support for screen on animation" into gingerbread Merge commit '5bfa3a34eaef759c3ec4def76f646eb1c0bf997f' * commit '5bfa3a34eaef759c3ec4def76f646eb1c0bf997f': implement part of [3094280] New animation for screen on and screen off
| * implement part of [3094280] New animation for screen on and screen offMathias Agopian2010-10-131-1/+3
| | | | | | | | | | | | add support for screen on animation Change-Id: If50cf52ae04b95b42da7d74cf7fa96d5cb54d238
* | am 9a12a3c8: am ba799098: Merge changes I76513387,I335fb671 into gingerbreadJoe Onorato2010-10-131-1/+4
|\ \ | |/ | | | | | | | | | | | | Merge commit '9a12a3c8d4bb20042cf69e07d268e3a04ac71f96' * commit '9a12a3c8d4bb20042cf69e07d268e3a04ac71f96': Remove dead code, and make the animation a setting. turn off the electron beam
| * turn off the electron beamMathias Agopian2010-10-121-1/+4
| | | | | | | | Change-Id: I335fb6719f1d5a3f1c6f37a046fd1c2c4ed2bbc6
* | Always create OpenGL accelerated windows in RGBA 8888.Romain Guy2010-10-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug #3081600 The OpenGL renderer in libhwui uses a single EGL context per process and thus create it with an RGBA 8888 EGL configuration. To ensure that all windows are compatible with this configuration, this change modifies the window manager and SurfaceFlinger. The window manager now checks the window's flags and if the window is hardware accelerated, it forces the window's pixel format to be translucent when creating the surface. The window itself is still marked as opaque if we know that the window will be opaque on screen. This keeps existing optimizations in place. Similarly in SurfaceFlinger, a translucent Surface can now be created with the Surface.OPAQUE flag, indicating SurfaceFlinger that the surface does not require blending, despite its RGBA 8888 configuration. Change-Id: Ic747b6b12564ba064412d842117880fcc199eb7c
* | am ff04e97f: am f4619308: Merge "fix [2835280] Add support for cancelling ↵Mathias Agopian2010-10-061-0/+2
|\ \ | |/ | | | | | | | | | | | | | | buffers to ANativeWindow" into gingerbread Merge commit 'ff04e97faf75c435e453d4c1caf7eeac8b9c1ceb' * commit 'ff04e97faf75c435e453d4c1caf7eeac8b9c1ceb': fix [2835280] Add support for cancelling buffers to ANativeWindow
| * fix [2835280] Add support for cancelling buffers to ANativeWindowMathias Agopian2010-10-041-0/+2
| | | | | | | | | | | | | | | | | | | | There is a new ANativeWindow::cancelBuffer() API that can be used to cancel any dequeued buffer, BEFORE it's been enqueued. The buffer is returned to the list of availlable buffers. dequeue and cancel are not mutually thread safe, they must be called from the same thread or external synchronization must be used. Change-Id: I86cc7985bace8b6a93ad2c75d2bef5c3c2cb4d61
| * refactored screenshot codeMathias Agopian2010-10-042-1/+32
| | | | | | | | | | | | | | | | | | | | | | the core screenshot function now can capture the screen at any lower resolution performing bilinear filtering. we also now have some client code to interface with the screenshot service. it's now possible to request a screenshot at a lower resolution. Change-Id: I33689bba98507ab928d0898b21596d0d2fe4b953
* | refactored screenshot codeMathias Agopian2010-09-292-1/+32
| | | | | | | | | | | | | | | | | | | | | | the core screenshot function now can capture the screen at any lower resolution performing bilinear filtering. we also now have some client code to interface with the screenshot service. it's now possible to request a screenshot at a lower resolution. Change-Id: I5a3b0e431421800e3aad601d9af8f94adffbc71f
* | am 495ad4f2: am beabe75a: Merge changes I1f7c4535,I741c68a2 into gingerbreadMathias Agopian2010-09-241-1/+9
|\ \ | |/ | | | | | | | | | | | | Merge commit '495ad4f22096aa172d025c16c25497e7dad8f2bd' * commit '495ad4f22096aa172d025c16c25497e7dad8f2bd': simple test app for screen capture API add support for [1974164] Be able to take a screen shot on the device
| * add support for [1974164] Be able to take a screen shot on the deviceMathias Agopian2010-09-241-1/+9
| | | | | | | | | | | | | | | | | | | | | | screenshots are taken using ISurfaceComposer::captureScreen() which returns the size of the screenshot and an IMemoryHeap containing the data. screenshots have limitations: - they will always fail if a secure window is up on screen - require GL_OES_framebuffer_object extension - in some situation, video planes won't been captured Change-Id: I741c68a2d2984fb139039301c3349e6780e2cd58