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

Commit 6a2defc9 authored by Romain Guy's avatar Romain Guy Committed by Android (Google) Code Review
Browse files

Merge "Don't clear the dirty clip flag if it's not applied Bug #6833979"

parents db3c8678 8a4ac610
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -40,14 +40,19 @@ ifeq ($(USE_OPENGL_RENDERER),true)
		external/skia/include/utils

	LOCAL_CFLAGS += -DUSE_OPENGL_RENDERER -DGL_GLEXT_PROTOTYPES
	LOCAL_CFLAGS += -fvisibility=hidden
	# Uncomment the following line to use `perf`
	# LOCAL_CFLAGS +=  -fno-omit-frame-pointer -marm -mapcs
	LOCAL_MODULE_CLASS := SHARED_LIBRARIES
	LOCAL_SHARED_LIBRARIES := libcutils libutils libGLESv2 libskia libui
	LOCAL_MODULE := libhwui
	LOCAL_MODULE_TAGS := optional

	ifndef HWUI_COMPILE_SYMBOLS
		LOCAL_CFLAGS += -fvisibility=hidden
	endif

	ifdef HWUI_COMPILE_FOR_PERF
		LOCAL_CFLAGS += -fno-omit-frame-pointer -marm -mapcs
	endif

	include $(BUILD_SHARED_LIBRARY)

    include $(call all-makefiles-under,$(LOCAL_PATH))
+10 −3
Original line number Diff line number Diff line
@@ -358,7 +358,7 @@ void Caches::activeTexture(GLuint textureUnit) {
    }
}

void Caches::setScissor(GLint x, GLint y, GLint width, GLint height) {
bool Caches::setScissor(GLint x, GLint y, GLint width, GLint height) {
    if (scissorEnabled && (x != mScissorX || y != mScissorY ||
            width != mScissorWidth || height != mScissorHeight)) {

@@ -368,21 +368,28 @@ void Caches::setScissor(GLint x, GLint y, GLint width, GLint height) {
        mScissorY = y;
        mScissorWidth = width;
        mScissorHeight = height;

        return true;
    }
    return false;
}

void Caches::enableScissor() {
bool Caches::enableScissor() {
    if (!scissorEnabled) {
        glEnable(GL_SCISSOR_TEST);
        scissorEnabled = true;
        return true;
    }
    return false;
}

void Caches::disableScissor() {
bool Caches::disableScissor() {
    if (scissorEnabled) {
        glDisable(GL_SCISSOR_TEST);
        scissorEnabled = false;
        return true;
    }
    return false;
}

void Caches::setScissorEnabled(bool enabled) {
+3 −3
Original line number Diff line number Diff line
@@ -197,15 +197,15 @@ public:
    /**
     * Sets the scissor for the current surface.
     */
    void setScissor(GLint x, GLint y, GLint width, GLint height);
    bool setScissor(GLint x, GLint y, GLint width, GLint height);

    /**
     * Resets the scissor state.
     */
    void resetScissor();

    void enableScissor();
    void disableScissor();
    bool enableScissor();
    bool disableScissor();
    void setScissorEnabled(bool enabled);

    /**
+3 −0
Original line number Diff line number Diff line
@@ -71,6 +71,9 @@
// Turn on to dump display list state
#define DEBUG_DISPLAY_LIST 0

// Turn on to insert an event marker for each display list op
#define DEBUG_DISPLAY_LIST_OPS_AS_EVENTS 0

#if DEBUG_INIT
    #define INIT_LOGD(...) ALOGD(__VA_ARGS__)
#else
+8 −1
Original line number Diff line number Diff line
@@ -852,11 +852,13 @@ status_t DisplayList::replay(OpenGLRenderer& renderer, Rect& dirty, int32_t flag
#endif

    renderer.startMark(mName.string());

    int restoreTo = renderer.save(SkCanvas::kMatrix_SaveFlag | SkCanvas::kClip_SaveFlag);
    DISPLAY_LIST_LOGD("%s%s %d %d", indent, "Save",
            SkCanvas::kMatrix_SaveFlag | SkCanvas::kClip_SaveFlag, restoreTo);
    setViewProperties(renderer, level);
    if (renderer.quickReject(0, 0, mWidth, mHeight)) {

    if (renderer.quickRejectNoScissor(0, 0, mWidth, mHeight)) {
        DISPLAY_LIST_LOGD("%s%s %d", (char*) indent, "RestoreToCount", restoreTo);
        renderer.restoreToCount(restoreTo);
        renderer.endMark();
@@ -865,6 +867,7 @@ status_t DisplayList::replay(OpenGLRenderer& renderer, Rect& dirty, int32_t flag

    DisplayListLogBuffer& logBuffer = DisplayListLogBuffer::getInstance();
    int saveCount = renderer.getSaveCount() - 1;

    while (!mReader.eof()) {
        int op = mReader.readInt();
        if (op & OP_MAY_BE_SKIPPED_MASK) {
@@ -880,6 +883,10 @@ status_t DisplayList::replay(OpenGLRenderer& renderer, Rect& dirty, int32_t flag
        }
        logBuffer.writeCommand(level, op);

#if DEBUG_DISPLAY_LIST_OPS_AS_EVENTS
        Caches::getInstance().eventMark(strlen(OP_NAMES[op]), OP_NAMES[op]);
#endif

        switch (op) {
            case DrawGLFunction: {
                Functor *functor = (Functor *) getInt();
Loading