Refactor GrGpu path rendering functions to GrPathRendering
GrGpu, GrGLGpu, GrPathRendering, GrGLPathRendering all duplicated
each others' path rendering related member functions. Make
GrPathRending the logical extension of GrGpu by removing the methods
from GrGpu. Similarly to the GL variants.
Changes includes and forward declarations due to removing
GrDrawTarget.h include from GrGpu.h. This was necessary due to
GrDrawTarget.h including GrPathRendering.h, and now GrPathRendering.h
includes GrGpu.h. (Also GrGpu.h does not need GrDrawTarget.h anymore).
Very slight runtime improvement on x86_64:
desk_fontwipe.skp_1 836us -> 841us 1.01x
desk_silkfinance.skp_1 2.01ms -> 2.01ms 1x
desk_forecastio.skp_1 7.03ms -> 7.05ms 1x
desk_weather.skp_1 3.74ms -> 3.74ms 1x
desk_twitter.skp_1 8.02ms -> 8.01ms 1x
desk_mapsvg.skp_1 5.24ms -> 5.23ms 1x
desk_pokemonwiki.skp_1 7.06ms -> 7.03ms 1x
desk_sfgate.skp_1 3.19ms -> 3.17ms 1x
tabl_cuteoverload.skp_1 2.66ms -> 2.64ms 0.99x
...
tabl_transformice.skp_1 3.06ms -> 2.98ms 0.98x
tabl_googlecalendar.skp_1 11.3ms -> 11ms 0.97x
tabl_gamedeksiam.skp_1 12.8ms -> 12.4ms 0.97x
desk_samoasvg.skp_1 10.6ms -> 10.3ms 0.97x
tabl_worldjournal.skp_1 4.44ms -> 4.3ms 0.97x
Review URL: https://codereview.chromium.org/1157683006
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index 7fc1491..4d6f5d6 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -13,6 +13,7 @@
#include "GrContext.h"
#include "GrGpuResourcePriv.h"
#include "GrIndexBuffer.h"
+#include "GrPathRendering.h"
#include "GrResourceCache.h"
#include "GrRenderTargetPriv.h"
#include "GrStencilAttachment.h"
@@ -300,29 +301,3 @@
this->onDraw(args, *verts);
} while ((verts = iter.next()));
}
-
-void GrGpu::stencilPath(const GrPath* path, const StencilPathState& state) {
- this->handleDirtyContext();
- this->onStencilPath(path, state);
-}
-
-void GrGpu::drawPath(const DrawArgs& args,
- const GrPath* path,
- const GrStencilSettings& stencilSettings) {
- this->handleDirtyContext();
- this->onDrawPath(args, path, stencilSettings);
-}
-
-void GrGpu::drawPaths(const DrawArgs& args,
- const GrPathRange* pathRange,
- const void* indices,
- GrDrawTarget::PathIndexType indexType,
- const float transformValues[],
- GrDrawTarget::PathTransformType transformType,
- int count,
- const GrStencilSettings& stencilSettings) {
- this->handleDirtyContext();
- pathRange->willDrawPaths(indices, indexType, count);
- this->onDrawPaths(args, pathRange, indices, indexType, transformValues,
- transformType, count, stencilSettings);
-}