Disable Ganesh layer hoister in a more revertable form
I have a worry that disabling the layer hoister might cause a perf regression on tiled architectures. This CL will be easier to revert than https://codereview.chromium.org/1950523002/ (Remove GrLayerHoister)
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1945413003
Review-Url: https://codereview.chromium.org/1945413003
diff --git a/src/gpu/GrLayerHoister.cpp b/src/gpu/GrLayerHoister.cpp
index 4a2a7f5..71c0080 100644
--- a/src/gpu/GrLayerHoister.cpp
+++ b/src/gpu/GrLayerHoister.cpp
@@ -5,11 +5,6 @@
* found in the LICENSE file.
*/
-#include "GrContext.h"
-#include "GrLayerCache.h"
-#include "GrLayerHoister.h"
-#include "GrRecordReplaceDraw.h"
-
#include "SkBigPicture.h"
#include "SkCanvas.h"
#include "SkImageFilterCache.h"
@@ -18,6 +13,14 @@
#include "SkSpecialImage.h"
#include "SkSurface.h"
+#include "GrLayerHoister.h"
+
+#if !defined(SK_IGNORE_GPU_LAYER_HOISTING) && SK_SUPPORT_GPU
+
+#include "GrContext.h"
+#include "GrLayerCache.h"
+#include "GrRecordReplaceDraw.h"
+
// Create the layer information for the hoisted layer and secure the
// required texture/render target resources.
static void prepare_for_hoisting(GrLayerCache* layerCache,
@@ -395,3 +398,5 @@
layerCache->end();
}
+
+#endif