diff options
author | John Reck <jreck@google.com> | 2019-04-05 16:57:46 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2019-04-12 13:33:25 -0700 |
commit | 0fa0cbcade324654e4235d0c91f602ffd9dfcafa (patch) | |
tree | 441627788e14da1b5359f1f899d8df10e44fb99d /libs/hwui/renderthread/CanvasContext.h | |
parent | a39c85fc2b563e628a4fd197b4a8b0d0ba86ec43 (diff) |
Support render-ahead in vulkan
Bug: 127822449
Test: verified render_ahead working with skiavk
Change-Id: Iae1b227a763f6def035057f38cca4b0ab65c7e82
Diffstat (limited to 'libs/hwui/renderthread/CanvasContext.h')
-rw-r--r-- | libs/hwui/renderthread/CanvasContext.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/libs/hwui/renderthread/CanvasContext.h b/libs/hwui/renderthread/CanvasContext.h index 4a3119a55c77..0bd080d4d7e4 100644 --- a/libs/hwui/renderthread/CanvasContext.h +++ b/libs/hwui/renderthread/CanvasContext.h @@ -17,15 +17,15 @@ #pragma once #include "DamageAccumulator.h" -#include "Lighting.h" #include "FrameInfo.h" #include "FrameInfoVisualizer.h" #include "FrameMetricsReporter.h" #include "IContextFactory.h" #include "IRenderPipeline.h" #include "LayerUpdateQueue.h" -#include "RenderNode.h" +#include "Lighting.h" #include "ReliableSurface.h" +#include "RenderNode.h" #include "renderthread/RenderTask.h" #include "renderthread/RenderThread.h" @@ -37,10 +37,10 @@ #include <utils/Functor.h> #include <functional> +#include <future> #include <set> #include <string> #include <vector> -#include <future> namespace android { namespace uirenderer { @@ -187,9 +187,7 @@ public: mRenderPipeline->setPictureCapturedCallback(callback); } - void setForceDark(bool enable) { - mUseForceDark = enable; - } + void setForceDark(bool enable) { mUseForceDark = enable; } bool useForceDark() { // The force-dark override has the highest priority, followed by the disable setting @@ -204,7 +202,8 @@ public: return mUseForceDark; } - void setRenderAheadDepth(int renderAhead); + // Must be called before setSurface + void setRenderAheadDepth(uint32_t renderAhead); private: CanvasContext(RenderThread& thread, bool translucent, RenderNode* rootRenderNode, @@ -238,7 +237,7 @@ private: // painted onto its surface. bool mIsDirty = false; SwapBehavior mSwapBehavior = SwapBehavior::kSwap_default; - int mRenderAheadDepth = 0; + uint32_t mRenderAheadDepth = 0; struct SwapHistory { SkRect damage; nsecs_t vsyncTime; |