Rework receiver/dispatcher design slightly, and replace Layer usage.
Switched from 'renderer/info' to 'dispatcher/renderer' to make their
interaction more natural. The new BakedOpRenderer is more similar in
responsibilities to the OpenGLRenderer, as it manages layer and frame
lifecycles, and performs the actual rendering.
However, it's still simpler because the BakedOpDispatcher handles
mapping Canvas drawing ops to Glops, and the OpReorderer handles almost
all canvas state operations.
Also switch BakedOpRenderer to use the new OffscreenBuffer, which
serves as a lightweight Layer replacement, with a much simpler
lifecycle.
Change-Id: Ie0e2e248503400041d49729d813d485d28c76eb3
diff --git a/libs/hwui/renderstate/RenderState.h b/libs/hwui/renderstate/RenderState.h
index 87a7996..3cda170 100644
--- a/libs/hwui/renderstate/RenderState.h
+++ b/libs/hwui/renderstate/RenderState.h
@@ -16,24 +16,25 @@
#ifndef RENDERSTATE_H
#define RENDERSTATE_H
-#include <set>
-#include <GLES2/gl2.h>
-#include <GLES2/gl2ext.h>
-#include <utils/Mutex.h>
-#include <utils/Functor.h>
-#include <utils/RefBase.h>
-#include <private/hwui/DrawGlInfo.h>
-#include <renderstate/Blend.h>
-
#include "AssetAtlas.h"
#include "Caches.h"
#include "Glop.h"
+#include "renderstate/Blend.h"
#include "renderstate/MeshState.h"
#include "renderstate/PixelBufferState.h"
#include "renderstate/Scissor.h"
#include "renderstate/Stencil.h"
#include "utils/Macros.h"
+#include <set>
+#include <GLES2/gl2.h>
+#include <GLES2/gl2ext.h>
+#include <ui/Region.h>
+#include <utils/Mutex.h>
+#include <utils/Functor.h>
+#include <utils/RefBase.h>
+#include <private/hwui/DrawGlInfo.h>
+
namespace android {
namespace uirenderer {
@@ -49,6 +50,8 @@
// wrapper of Caches for users to migrate to.
class RenderState {
PREVENT_COPY_AND_ASSIGN(RenderState);
+ friend class renderthread::RenderThread;
+ friend class Caches;
public:
void onGLContextCreated();
void onGLContextDestroyed();
@@ -61,7 +64,6 @@
GLuint genFramebuffer();
void deleteFramebuffer(GLuint fbo);
-
void invokeFunctor(Functor* functor, DrawGlInfo::Mode mode, DrawGlInfo* info);
void debugOverdraw(bool enable, bool clear);
@@ -96,10 +98,8 @@
Stencil& stencil() { return *mStencil; }
void dump();
-private:
- friend class renderthread::RenderThread;
- friend class Caches;
+private:
void interruptForFunctorInvoke();
void resumeFromFunctorInvoke();
void assertOnGLThread();