~mir-team/mir/compositing-always-finishes

« back to all changes in this revision

Viewing changes to src/platforms/android/client/gralloc_registrar.cpp

  • Committer: Tarmac
  • Author(s): Kevin DuBois
  • Date: 2016-02-09 17:07:23 UTC
  • mfrom: (3266.7.18 refix-1517205)
  • Revision ID: tarmac-20160209170723-lv4mbmekpp9v11q3
repropose already landed branch introducing sync fences 
(https://code.launchpad.net/~kdub/mir/egl-sync-fences/+merge/278181)
while avoiding the mx4/powervr regression that caused its reversion.

fixes: LP: #1517205. Fixes: https://bugs.launchpad.net/bugs/1517205.

Approved by PS Jenkins bot, Alexandros Frantzis, mir-ci-bot, Alan Griffiths.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
 * You should have received a copy of the GNU Lesser General Public License
14
14
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
15
15
 *
16
 
 * Authored by: Kevin DuBois<kevin.dubois@canonical.com>
 
16
 * Authored by: Kevin DuBois <kevin.dubois@canonical.com>
17
17
 */
18
18
 
 
19
#include "egl_sync_fence.h"
19
20
#include "android_native_buffer.h"
20
21
#include "sync_fence.h"
21
22
#include "gralloc_registrar.h"
82
83
    anwb->usage = GRALLOC_USAGE_HW_TEXTURE | GRALLOC_USAGE_HW_RENDER;
83
84
    anwb->handle = handle.get();
84
85
 
85
 
    return std::make_shared<mga::AndroidNativeBuffer>(anwb, fence, mga::BufferAccess::read);
 
86
    auto sync = std::make_shared<mg::NullCommandSync>(); //no need for eglsync client side
 
87
    return std::make_shared<mga::AndroidNativeBuffer>(anwb, sync, fence, mga::BufferAccess::read);
86
88
}
87
89
}
88
90
std::shared_ptr<mg::NativeBuffer> mcla::GrallocRegistrar::register_buffer(