Revert "Created HardwareBufferRenderer to support rendering into..."

Revert submission 20579518-hardware_buffer_renderer

Reason for revert: The submission timing tracks with a major regression in CtsUiRenderingTestCases stability: https://screenshot.googleplex.com/3TxXCSP4xCZq7Zy.png and also some crash bugs, eg: https://b.corp.google.com/issues/264889058

Reverting to re-stabilize the tree

Reverted changes: /q/submissionid:20579518-hardware_buffer_renderer

Change-Id: I29f47da097257bdeaa963fccb9ad0dbe39ead063
diff --git a/libs/hwui/renderthread/DrawFrameTask.cpp b/libs/hwui/renderthread/DrawFrameTask.cpp
index fab2f46..ccdf715 100644
--- a/libs/hwui/renderthread/DrawFrameTask.cpp
+++ b/libs/hwui/renderthread/DrawFrameTask.cpp
@@ -26,7 +26,6 @@
 #include "../Properties.h"
 #include "../RenderNode.h"
 #include "CanvasContext.h"
-#include "HardwareBufferRenderParams.h"
 #include "RenderThread.h"
 
 namespace android {
@@ -93,9 +92,6 @@
     mContext->setSyncDelayDuration(systemTime(SYSTEM_TIME_MONOTONIC) - mSyncQueued);
     mContext->setTargetSdrHdrRatio(mRenderSdrHdrRatio);
 
-    auto hardwareBufferParams = mHardwareBufferParams;
-    mContext->setHardwareBufferRenderParams(hardwareBufferParams);
-    IRenderPipeline* pipeline = mContext->getRenderPipeline();
     bool canUnblockUiThread;
     bool canDrawThisFrame;
     {
@@ -155,11 +151,6 @@
     if (!canUnblockUiThread) {
         unblockUiThread();
     }
-
-    if (pipeline->hasHardwareBuffer()) {
-        auto fence = pipeline->flush();
-        hardwareBufferParams.invokeRenderCallback(std::move(fence), 0);
-    }
 }
 
 bool DrawFrameTask::syncFrameState(TreeInfo& info) {
@@ -185,9 +176,8 @@
 
     // This is after the prepareTree so that any pending operations
     // (RenderNode tree state, prefetched layers, etc...) will be flushed.
-    bool hasTarget = mContext->hasOutputTarget();
-    if (CC_UNLIKELY(!hasTarget || !canDraw)) {
-        if (!hasTarget) {
+    if (CC_UNLIKELY(!mContext->hasSurface() || !canDraw)) {
+        if (!mContext->hasSurface()) {
             mSyncResult |= SyncResult::LostSurfaceRewardIfFound;
         } else {
             // If we have a surface but can't draw we must be stopped