Reduce max # of AA Quads that can be merged or chained into a single GrTextureOp (take 2)

It is, arguably, not a good metric but the max number of AA Quads that are merged or chained together across all Skia's GMs and SKPs is 276.

This should also reduce the memory consumed from 245,760 bytes to 30,720 bytes.

Bug: b/143572065 skia:9601
Change-Id: I86f3ae2830d8a64ebcc6f5b7da8c0a4dac8761d5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/254916
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This commit is contained in:
Robert Phillips 2019-11-15 12:04:48 -05:00 committed by Skia Commit-Bot
parent 2319b803c2
commit 8bc157e216
2 changed files with 1 additions and 7 deletions

View File

@ -414,7 +414,7 @@ int GrResourceProvider::NumVertsPerNonAAQuad() { return kVertsPerNonAAQuad; }
int GrResourceProvider::NumIndicesPerNonAAQuad() { return kIndicesPerNonAAQuad; }
///////////////////////////////////////////////////////////////////////////////////////////////////
static constexpr int kMaxNumAAQuads = 1 << 12; // max possible: (1 << 13) - 1;
static constexpr int kMaxNumAAQuads = 1 << 9; // max possible: (1 << 13) - 1;
static const int kVertsPerAAQuad = 8;
static const int kIndicesPerAAQuad = 30;

View File

@ -17,7 +17,6 @@ static std::unique_ptr<GrRenderTargetContext> new_RTC(GrContext* context) {
GrColorType::kRGBA_8888, nullptr);
}
#if 0
sk_sp<GrSurfaceProxy> create_proxy(GrContext* context) {
GrSurfaceDesc desc;
desc.fConfig = kRGBA_8888_GrPixelConfig;
@ -32,7 +31,6 @@ sk_sp<GrSurfaceProxy> create_proxy(GrContext* context) {
format, desc, GrRenderable::kYes, 1, kTopLeft_GrSurfaceOrigin, GrMipMapped::kNo,
SkBackingFit::kExact, SkBudgeted::kNo, GrProtected::kNo, GrInternalSurfaceFlags::kNone);
}
#endif
typedef GrQuadAAFlags (*PerQuadAAFunc)(int i);
@ -81,7 +79,6 @@ static void bulk_fill_rect_create_test(skiatest::Reporter* reporter, GrContext*
delete[] quads;
}
#if 0
//-------------------------------------------------------------------------------------------------
static void bulk_texture_rect_create_test(skiatest::Reporter* reporter, GrContext* context,
PerQuadAAFunc perQuadAA, GrAAType overallAA,
@ -132,7 +129,6 @@ static void bulk_texture_rect_create_test(skiatest::Reporter* reporter, GrContex
delete[] set;
}
#endif
//-------------------------------------------------------------------------------------------------
static void run_test(GrContext* context, skiatest::Reporter* reporter, BulkRectTest test) {
@ -200,8 +196,6 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(BulkFillRectTest, reporter, ctxInfo) {
run_test(ctxInfo.grContext(), reporter, bulk_fill_rect_create_test);
}
#if 0
DEF_GPUTEST_FOR_RENDERING_CONTEXTS(BulkTextureRectTest, reporter, ctxInfo) {
run_test(ctxInfo.grContext(), reporter, bulk_texture_rect_create_test);
}
#endif