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

Side by Side Diff: include/gpu/SkGpuDevice.h

Issue 18686007: Make GrPaint have a variable sized array of color and coverage stages rather than a fixed size. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rob's comments Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « include/gpu/GrPaint.h ('k') | src/core/SkImageFilter.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 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 10
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 // used by createCompatibleDevice 145 // used by createCompatibleDevice
146 SkGpuDevice(GrContext*, GrTexture* texture, bool needClear); 146 SkGpuDevice(GrContext*, GrTexture* texture, bool needClear);
147 147
148 // override from SkDevice 148 // override from SkDevice
149 virtual SkDevice* onCreateCompatibleDevice(SkBitmap::Config config, 149 virtual SkDevice* onCreateCompatibleDevice(SkBitmap::Config config,
150 int width, int height, 150 int width, int height,
151 bool isOpaque, 151 bool isOpaque,
152 Usage usage) SK_OVERRIDE; 152 Usage usage) SK_OVERRIDE;
153 153
154 SkDrawProcs* initDrawForText(GrTextContext*); 154 SkDrawProcs* initDrawForText(GrTextContext*);
155 bool bindDeviceAsTexture(GrPaint* paint);
156 155
157 // sets the render target, clip, and matrix on GrContext. Use forceIdenity t o override 156 // sets the render target, clip, and matrix on GrContext. Use forceIdenity t o override
158 // SkDraw's matrix and draw in device coords. 157 // SkDraw's matrix and draw in device coords.
159 void prepareDraw(const SkDraw&, bool forceIdentity); 158 void prepareDraw(const SkDraw&, bool forceIdentity);
160 159
161 /** 160 /**
162 * Implementation for both drawBitmap and drawBitmapRect. 161 * Implementation for both drawBitmap and drawBitmapRect.
163 */ 162 */
164 void drawBitmapCommon(const SkDraw&, 163 void drawBitmapCommon(const SkDraw&,
165 const SkBitmap& bitmap, 164 const SkBitmap& bitmap,
166 const SkRect* srcRectPtr, 165 const SkRect* srcRectPtr,
167 const SkMatrix&, 166 const SkMatrix&,
168 const SkPaint&); 167 const SkPaint&);
169 168
170 /** 169 /**
171 * Helper functions called by drawBitmapCommon. By the time these are called the SkDraw's 170 * Helper functions called by drawBitmapCommon. By the time these are called the SkDraw's
172 * matrix has already been set on GrContext 171 * matrix has already been set on GrContext
173 */ 172 */
174 bool shouldTileBitmap(const SkBitmap& bitmap, 173 bool shouldTileBitmap(const SkBitmap& bitmap,
175 const GrTextureParams& sampler, 174 const GrTextureParams& sampler,
176 const SkRect* srcRectPtr) const; 175 const SkRect* srcRectPtr) const;
177 void internalDrawBitmap(const SkBitmap&, 176 void internalDrawBitmap(const SkBitmap&,
178 const SkRect&, 177 const SkRect&,
179 const SkMatrix&, 178 const SkMatrix&,
180 const GrTextureParams& params, 179 const GrTextureParams& params,
181 GrPaint* grPaint); 180 const SkPaint& paint);
182 void drawTiledBitmap(const SkBitmap& bitmap, 181 void drawTiledBitmap(const SkBitmap& bitmap,
183 const SkRect& srcRect, 182 const SkRect& srcRect,
184 const SkMatrix& m, 183 const SkMatrix& m,
185 const GrTextureParams& params, 184 const GrTextureParams& params,
186 GrPaint* grPaint); 185 const SkPaint& paint);
187 186
188 /** 187 /**
189 * Returns non-initialized instance. 188 * Returns non-initialized instance.
190 */ 189 */
191 GrTextContext* getTextContext(); 190 GrTextContext* getTextContext();
192 191
193 typedef SkDevice INHERITED; 192 typedef SkDevice INHERITED;
194 }; 193 };
195 194
196 #endif 195 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrPaint.h ('k') | src/core/SkImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698