Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 494789d0 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

release-request-ce4c09a7-d626-4edd-9c59-231ca7b79b49-for-git_oc-dr1-release-41...

release-request-ce4c09a7-d626-4edd-9c59-231ca7b79b49-for-git_oc-dr1-release-4189381 snap-temp-L78500000083186779

Change-Id: I742ef9b50c3baf83c66d7dba5baa2a6626eadaf6
parents bc6b4df4 87cd1151
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
#define ANDROID_PDX_UTILITY_H_

#include <cstdint>
#include <cstdlib>
#include <iterator>

#include <pdx/rpc/sequence.h>
@@ -23,6 +24,7 @@ class ByteBuffer {
    if (other.size())
      memcpy(data_, other.data(), other.size());
  }
  ~ByteBuffer() { std::free(data_); }

  ByteBuffer& operator=(const ByteBuffer& other) {
    resize(other.size());
@@ -69,7 +71,7 @@ class ByteBuffer {
    size |= size >> 8;
    size |= size >> 16;
    size++;
    void* new_data = data_ ? realloc(data_, size) : malloc(size);
    void* new_data = data_ ? std::realloc(data_, size) : std::malloc(size);
    // TODO(avakulenko): Check for allocation failures.
    data_ = static_cast<uint8_t*>(new_data);
    capacity_ = size;
+3 −6
Original line number Diff line number Diff line
@@ -1255,17 +1255,14 @@ void SurfaceFlinger::setVsyncEnabled(int disp, int enabled) {
            enabled ? HWC2::Vsync::Enable : HWC2::Vsync::Disable);
}

void SurfaceFlinger::clearHwcLayers(const LayerVector& layers) {
    for (size_t i = 0; i < layers.size(); ++i) {
        layers[i]->clearHwcLayers();
    }
}

// Note: it is assumed the caller holds |mStateLock| when this is called
void SurfaceFlinger::resetHwcLocked() {
    disableHardwareVsync(true);
    clearHwcLayers(mDrawingState.layersSortedByZ);
    clearHwcLayers(mCurrentState.layersSortedByZ);
    for (size_t disp = 0; disp < mDisplays.size(); ++disp) {
        clearHwcLayers(mDisplays[disp]->getVisibleLayersSortedByZ());
    }
    // Clear the drawing state so that the logic inside of
    // handleTransactionLocked will fire. It will determine the delta between
    // mCurrentState and mDrawingState and re-apply all changes when we make the
+6 −1
Original line number Diff line number Diff line
@@ -586,7 +586,12 @@ private:
    /* ------------------------------------------------------------------------
     * VrFlinger
     */
    void clearHwcLayers(const LayerVector& layers);
    template<typename T>
    void clearHwcLayers(const T& layers) {
        for (size_t i = 0; i < layers.size(); ++i) {
            layers[i]->clearHwcLayers();
        }
    }
    void resetHwcLocked();

    // Check to see if we should handoff to vr flinger.