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

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

Issue 732693002: Drawstate on stack (Closed) Base URL: https://skia.googlesource.com/skia.git@real_def_gp
Patch Set: tiny fix Created 6 years, 1 month 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 | « src/gpu/GrPathRendererChain.cpp ('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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // GrSoftwarePathRenderer uses it to fulfill a drawPath call. 85 // GrSoftwarePathRenderer uses it to fulfill a drawPath call.
86 // It draws with "texture" as a path mask into "target" using "rect" as 86 // It draws with "texture" as a path mask into "target" using "rect" as
87 // geometry and the current drawState. The current drawState is altered to 87 // geometry and the current drawState. The current drawState is altered to
88 // accommodate the mask. 88 // accommodate the mask.
89 // Note that this method assumes that the GrPaint::kTotalStages slot in 89 // Note that this method assumes that the GrPaint::kTotalStages slot in
90 // the draw state can be used to hold the mask texture stage. 90 // the draw state can be used to hold the mask texture stage.
91 // This method is really only intended to be used with the 91 // This method is really only intended to be used with the
92 // output of DrawPathMaskToTexture. 92 // output of DrawPathMaskToTexture.
93 static void DrawToTargetWithPathMask(GrTexture* texture, 93 static void DrawToTargetWithPathMask(GrTexture* texture,
94 GrDrawTarget* target, 94 GrDrawTarget* target,
95 GrDrawState* drawState,
95 const SkIRect& rect); 96 const SkIRect& rect);
96 97
97 private: 98 private:
98 // Helper function to get a scratch texture suitable for capturing the 99 // Helper function to get a scratch texture suitable for capturing the
99 // result (i.e., right size & format) 100 // result (i.e., right size & format)
100 GrTexture* createTexture(); 101 GrTexture* createTexture();
101 102
102 GrContext* fContext; 103 GrContext* fContext;
103 SkMatrix fMatrix; 104 SkMatrix fMatrix;
104 SkBitmap fBM; 105 SkBitmap fBM;
(...skipping 24 matching lines...) Expand all
129 const void *data, int rowbytes); 130 const void *data, int rowbytes);
130 131
131 // Compresses the bitmap stored in fBM and sends the compressed data 132 // Compresses the bitmap stored in fBM and sends the compressed data
132 // to the GPU to be stored in 'texture' using sendTextureData. 133 // to the GPU to be stored in 'texture' using sendTextureData.
133 void compressTextureData(GrTexture *texture, const GrSurfaceDesc& desc); 134 void compressTextureData(GrTexture *texture, const GrSurfaceDesc& desc);
134 135
135 typedef SkNoncopyable INHERITED; 136 typedef SkNoncopyable INHERITED;
136 }; 137 };
137 138
138 #endif // GrSWMaskHelper_DEFINED 139 #endif // GrSWMaskHelper_DEFINED
OLDNEW
« no previous file with comments | « src/gpu/GrPathRendererChain.cpp ('k') | src/gpu/GrSWMaskHelper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698