Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(279)

Unified Diff: src/gpu/GrSWMaskHelper.h

Issue 1974943002: Simplify GrSWMaskHelper (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix indent Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrClipMaskManager.cpp ('k') | src/gpu/GrSWMaskHelper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrSWMaskHelper.h
diff --git a/src/gpu/GrSWMaskHelper.h b/src/gpu/GrSWMaskHelper.h
index ee38ab7976e7cddf20ce79c15745298c787bd714..046f9fab9a15c061d1fe85546a113b7b2e8e27db 100644
--- a/src/gpu/GrSWMaskHelper.h
+++ b/src/gpu/GrSWMaskHelper.h
@@ -16,7 +16,6 @@
#include "SkMatrix.h"
#include "SkRasterClip.h"
#include "SkRegion.h"
-#include "SkTextureCompressor.h"
#include "SkTypes.h"
class GrClip;
@@ -42,24 +41,20 @@ class GrDrawTarget;
*/
class GrSWMaskHelper : SkNoncopyable {
public:
- GrSWMaskHelper(GrContext* context)
- : fContext(context)
- , fCompressionMode(kNone_CompressionMode) {
- }
+ GrSWMaskHelper(GrContext* context) : fContext(context) { }
// set up the internal state in preparation for draws. Since many masks
// may be accumulated in the helper during creation, "resultBounds"
// allows the caller to specify the region of interest - to limit the
- // amount of work. allowCompression should be set to false if you plan on using
- // your own texture to draw into, and not a scratch texture via getTexture().
- bool init(const SkIRect& resultBounds, const SkMatrix* matrix, bool allowCompression = true);
+ // amount of work.
+ bool init(const SkIRect& resultBounds, const SkMatrix* matrix);
// Draw a single rect into the accumulation bitmap using the specified op
- void draw(const SkRect& rect, SkRegion::Op op, bool antiAlias, uint8_t alpha);
+ void drawRect(const SkRect& rect, SkRegion::Op op, bool antiAlias, uint8_t alpha);
// Draw a single path into the accumuation bitmap using the specified op
- void draw(const SkPath& path, const GrStyle& style, SkRegion::Op op,
- bool antiAlias, uint8_t alpha);
+ void drawPath(const SkPath& path, const GrStyle& style, SkRegion::Op op,
+ bool antiAlias, uint8_t alpha);
// Move the mask generation results from the internal bitmap to the gpu.
void toTexture(GrTexture* texture);
@@ -109,33 +104,6 @@ private:
SkDraw fDraw;
SkRasterClip fRasterClip;
- // This enum says whether or not we should compress the mask:
- // kNone_CompressionMode: compression is not supported on this device.
- // kCompress_CompressionMode: compress the bitmap before it gets sent to the gpu
- // kBlitter_CompressionMode: write to the bitmap using a special compressed blitter.
- enum CompressionMode {
- kNone_CompressionMode,
- kCompress_CompressionMode,
- kBlitter_CompressionMode,
- } fCompressionMode;
-
- // This is the buffer into which we store our compressed data. This buffer is
- // only allocated (non-null) if fCompressionMode is kBlitter_CompressionMode
- SkAutoMalloc fCompressedBuffer;
-
- // This is the desired format within which to compress the
- // texture. This value is only valid if fCompressionMode is not kNone_CompressionMode.
- SkTextureCompressor::Format fCompressedFormat;
-
- // Actually sends the texture data to the GPU. This is called from
- // toTexture with the data filled in depending on the texture config.
- void sendTextureData(GrTexture *texture, const GrSurfaceDesc& desc,
- const void *data, size_t rowbytes);
-
- // Compresses the bitmap stored in fBM and sends the compressed data
- // to the GPU to be stored in 'texture' using sendTextureData.
- void compressTextureData(GrTexture *texture, const GrSurfaceDesc& desc);
-
typedef SkNoncopyable INHERITED;
};
« no previous file with comments | « src/gpu/GrClipMaskManager.cpp ('k') | src/gpu/GrSWMaskHelper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698