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

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

Issue 40403002: Compute clipped src rect once in tiled bitmap draws (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/gpu/SkGpuDevice.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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 */ 177 */
178 void drawBitmapCommon(const SkDraw&, 178 void drawBitmapCommon(const SkDraw&,
179 const SkBitmap& bitmap, 179 const SkBitmap& bitmap,
180 const SkRect* srcRectPtr, 180 const SkRect* srcRectPtr,
181 const SkMatrix&, 181 const SkMatrix&,
182 const SkPaint&, 182 const SkPaint&,
183 SkCanvas::DrawBitmapRectFlags flags); 183 SkCanvas::DrawBitmapRectFlags flags);
184 184
185 /** 185 /**
186 * Helper functions called by drawBitmapCommon. By the time these are called the SkDraw's 186 * Helper functions called by drawBitmapCommon. By the time these are called the SkDraw's
187 * matrix has already been set on GrContext 187 * matrix, clip, and the device's render target has already been set on GrCo ntext.
188 */ 188 */
189
190 // The tileSize and clippedSrcRect will be valid only if true is returned.
189 bool shouldTileBitmap(const SkBitmap& bitmap, 191 bool shouldTileBitmap(const SkBitmap& bitmap,
190 const GrTextureParams& sampler, 192 const GrTextureParams& sampler,
191 const SkRect* srcRectPtr, 193 const SkRect* srcRectPtr,
192 int maxTileSize, 194 int maxTileSize,
193 int* tileSize) const; 195 int* tileSize,
196 SkIRect* clippedSrcRect) const;
194 void internalDrawBitmap(const SkBitmap&, 197 void internalDrawBitmap(const SkBitmap&,
195 const SkRect&, 198 const SkRect&,
196 const GrTextureParams& params, 199 const GrTextureParams& params,
197 const SkPaint& paint, 200 const SkPaint& paint,
198 SkCanvas::DrawBitmapRectFlags flags); 201 SkCanvas::DrawBitmapRectFlags flags);
199 void drawTiledBitmap(const SkBitmap& bitmap, 202 void drawTiledBitmap(const SkBitmap& bitmap,
200 const SkRect& srcRect, 203 const SkRect& srcRect,
204 const SkIRect& clippedSrcRect,
201 const GrTextureParams& params, 205 const GrTextureParams& params,
202 const SkPaint& paint, 206 const SkPaint& paint,
203 SkCanvas::DrawBitmapRectFlags flags, 207 SkCanvas::DrawBitmapRectFlags flags,
204 int tileSize); 208 int tileSize);
205 209
206 /** 210 /**
207 * Returns non-initialized instance. 211 * Returns non-initialized instance.
208 */ 212 */
209 GrTextContext* getTextContext(); 213 GrTextContext* getTextContext();
210 214
211 typedef SkBitmapDevice INHERITED; 215 typedef SkBitmapDevice INHERITED;
212 }; 216 };
213 217
214 #endif 218 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698