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

Commit 349245e7 authored by android-merger's avatar android-merger
Browse files

Merge branch 'master' into honeycomb-release

parents cbe87127 5cab4b4e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ class IPCThreadState
{
public:
    static  IPCThreadState*     self();
    static  IPCThreadState*     selfOrNull();  // self(), but won't instantiate
    
            sp<ProcessState>    process();
            
+1 −1
Original line number Diff line number Diff line
@@ -249,7 +249,7 @@ private:
            uint32_t *pWidth, uint32_t *pHeight,
            uint32_t *pFormat, uint32_t *pUsage) const;

    static void cleanCachedSurfaces();
    static void cleanCachedSurfacesLocked();

    class BufferInfo {
        uint32_t mWidth;
+1 −1
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@ public:
    
    void clear();

    void update(int32_t ignoreDepth=0, int32_t maxDepth=MAX_DEPTH);
    void update(int32_t ignoreDepth=1, int32_t maxDepth=MAX_DEPTH);

    // Dump a stack trace to the log
    void dump(const char* prefix = 0) const;
+10 −0
Original line number Diff line number Diff line
@@ -318,6 +318,16 @@ restart:
    goto restart;
}

IPCThreadState* IPCThreadState::selfOrNull()
{
    if (gHaveTLS) {
        const pthread_key_t k = gTLS;
        IPCThreadState* st = (IPCThreadState*)pthread_getspecific(k);
        return st;
    }
    return NULL;
}

void IPCThreadState::shutdown()
{
    gShutdown = true;
+9 −3
Original line number Diff line number Diff line
@@ -384,7 +384,7 @@ status_t Surface::writeToParcel(


Mutex Surface::sCachedSurfacesLock;
DefaultKeyedVector<wp<IBinder>, wp<Surface> > Surface::sCachedSurfaces(wp<Surface>(0));
DefaultKeyedVector<wp<IBinder>, wp<Surface> > Surface::sCachedSurfaces;

sp<Surface> Surface::readFromParcel(const Parcel& data) {
    Mutex::Autolock _l(sCachedSurfacesLock);
@@ -397,13 +397,13 @@ sp<Surface> Surface::readFromParcel(const Parcel& data) {
    if (surface->mSurface == 0) {
      surface = 0;
    }
    cleanCachedSurfaces();
    cleanCachedSurfacesLocked();
    return surface;
}

// Remove the stale entries from the surface cache.  This should only be called
// with sCachedSurfacesLock held.
void Surface::cleanCachedSurfaces() {
void Surface::cleanCachedSurfacesLocked() {
    for (int i = sCachedSurfaces.size()-1; i >= 0; --i) {
        wp<Surface> s(sCachedSurfaces.valueAt(i));
        if (s == 0 || s.promote() == 0) {
@@ -489,6 +489,9 @@ status_t Surface::validate() const
        LOGE("[Surface] using an invalid surface, "
                "identity=%u should be %d",
                mIdentity, identity);
        CallStack stack;
        stack.update();
        stack.dump("Surface");
        return NO_INIT;
    }

@@ -497,6 +500,9 @@ status_t Surface::validate() const
    if (err != NO_ERROR) {
        LOGE("surface (identity=%u) is invalid, err=%d (%s)",
                mIdentity, err, strerror(-err));
        CallStack stack;
        stack.update();
        stack.dump("Surface");
        return err;
    }

Loading