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

Side by Side Diff: src/gpu/GrSWMaskHelper.h

Issue 326223002: Add an LATC compressor to the A8 masks, and hide it behind an ifdef. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove some paranoia Created 6 years, 6 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 unified diff | Download patch
« no previous file with comments | « gyp/gpu.gyp ('k') | src/gpu/GrSWMaskHelper.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrSWMaskHelper_DEFINED 8 #ifndef GrSWMaskHelper_DEFINED
9 #define GrSWMaskHelper_DEFINED 9 #define GrSWMaskHelper_DEFINED
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 void draw(const SkPath& path, const SkStrokeRec& stroke, SkRegion::Op op, 58 void draw(const SkPath& path, const SkStrokeRec& stroke, SkRegion::Op op,
59 bool antiAlias, uint8_t alpha); 59 bool antiAlias, uint8_t alpha);
60 60
61 // Helper function to get a scratch texture suitable for capturing the 61 // Helper function to get a scratch texture suitable for capturing the
62 // result (i.e., right size & format) 62 // result (i.e., right size & format)
63 bool getTexture(GrAutoScratchTexture* texture); 63 bool getTexture(GrAutoScratchTexture* texture);
64 64
65 // Move the mask generation results from the internal bitmap to the gpu. 65 // Move the mask generation results from the internal bitmap to the gpu.
66 void toTexture(GrTexture* texture); 66 void toTexture(GrTexture* texture);
67 67
68 GrTexture* toLATCTexture(GrContext* ctx);
69
68 // Reset the internal bitmap 70 // Reset the internal bitmap
69 void clear(uint8_t alpha) { 71 void clear(uint8_t alpha) {
70 fBM.eraseColor(SkColorSetARGB(alpha, alpha, alpha, alpha)); 72 fBM.eraseColor(SkColorSetARGB(alpha, alpha, alpha, alpha));
71 } 73 }
72 74
73 // Canonical usage utility that draws a single path and uploads it 75 // Canonical usage utility that draws a single path and uploads it
74 // to the GPU. The result is returned in "result". 76 // to the GPU. The result is returned in "result".
75 static GrTexture* DrawPathMaskToTexture(GrContext* context, 77 static GrTexture* DrawPathMaskToTexture(GrContext* context,
76 const SkPath& path, 78 const SkPath& path,
77 const SkStrokeRec& stroke, 79 const SkStrokeRec& stroke,
(...skipping 20 matching lines...) Expand all
98 GrContext* fContext; 100 GrContext* fContext;
99 SkMatrix fMatrix; 101 SkMatrix fMatrix;
100 SkBitmap fBM; 102 SkBitmap fBM;
101 SkDraw fDraw; 103 SkDraw fDraw;
102 SkRasterClip fRasterClip; 104 SkRasterClip fRasterClip;
103 105
104 typedef SkNoncopyable INHERITED; 106 typedef SkNoncopyable INHERITED;
105 }; 107 };
106 108
107 #endif // GrSWMaskHelper_DEFINED 109 #endif // GrSWMaskHelper_DEFINED
OLDNEW
« no previous file with comments | « gyp/gpu.gyp ('k') | src/gpu/GrSWMaskHelper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698