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

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

Issue 2255963002: Batched implementation of drawLattice() for GPU (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Improve bench Created 4 years, 4 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
OLDNEW
1 /* 1 /*
2 * Copyright 2010 Google Inc. 2 * Copyright 2010 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 SkGpuDevice_DEFINED 8 #ifndef SkGpuDevice_DEFINED
9 #define SkGpuDevice_DEFINED 9 #define SkGpuDevice_DEFINED
10 10
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 115
116 void drawImage(const SkDraw&, const SkImage*, SkScalar x, SkScalar y, const SkPaint&) override; 116 void drawImage(const SkDraw&, const SkImage*, SkScalar x, SkScalar y, const SkPaint&) override;
117 void drawImageRect(const SkDraw&, const SkImage*, const SkRect* src, const S kRect& dst, 117 void drawImageRect(const SkDraw&, const SkImage*, const SkRect* src, const S kRect& dst,
118 const SkPaint&, SkCanvas::SrcRectConstraint) override; 118 const SkPaint&, SkCanvas::SrcRectConstraint) override;
119 119
120 void drawImageNine(const SkDraw& draw, const SkImage* image, const SkIRect& center, 120 void drawImageNine(const SkDraw& draw, const SkImage* image, const SkIRect& center,
121 const SkRect& dst, const SkPaint& paint) override; 121 const SkRect& dst, const SkPaint& paint) override;
122 void drawBitmapNine(const SkDraw& draw, const SkBitmap& bitmap, const SkIRec t& center, 122 void drawBitmapNine(const SkDraw& draw, const SkBitmap& bitmap, const SkIRec t& center,
123 const SkRect& dst, const SkPaint& paint) override; 123 const SkRect& dst, const SkPaint& paint) override;
124 124
125 void drawImageLattice(const SkDraw&, const SkImage*, const SkCanvas::Lattice &,
126 const SkRect& dst, const SkPaint&) override;
127 void drawBitmapLattice(const SkDraw&, const SkBitmap&, const SkCanvas::Latti ce&,
128 const SkRect& dst, const SkPaint&) override;
129
125 void drawSpecial(const SkDraw&, SkSpecialImage*, 130 void drawSpecial(const SkDraw&, SkSpecialImage*,
126 int left, int top, const SkPaint& paint) override; 131 int left, int top, const SkPaint& paint) override;
127 sk_sp<SkSpecialImage> makeSpecial(const SkBitmap&) override; 132 sk_sp<SkSpecialImage> makeSpecial(const SkBitmap&) override;
128 sk_sp<SkSpecialImage> makeSpecial(const SkImage*) override; 133 sk_sp<SkSpecialImage> makeSpecial(const SkImage*) override;
129 sk_sp<SkSpecialImage> snapSpecial() override; 134 sk_sp<SkSpecialImage> snapSpecial() override;
130 135
131 void flush() override; 136 void flush() override;
132 137
133 bool onAccessPixels(SkPixmap*) override; 138 bool onAccessPixels(SkPixmap*) override;
134 139
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 const SkMatrix& srcToDstMatrix, 243 const SkMatrix& srcToDstMatrix,
239 const GrClip&, 244 const GrClip&,
240 const SkPaint&); 245 const SkPaint&);
241 246
242 bool drawFilledDRRect(const SkMatrix& viewMatrix, const SkRRect& outer, 247 bool drawFilledDRRect(const SkMatrix& viewMatrix, const SkRRect& outer,
243 const SkRRect& inner, const SkPaint& paint); 248 const SkRRect& inner, const SkPaint& paint);
244 249
245 void drawProducerNine(const SkDraw&, GrTextureProducer*, const SkIRect& cent er, 250 void drawProducerNine(const SkDraw&, GrTextureProducer*, const SkIRect& cent er,
246 const SkRect& dst, const SkPaint&); 251 const SkRect& dst, const SkPaint&);
247 252
253 void drawProducerLattice(const SkDraw&, GrTextureProducer*, const SkCanvas:: Lattice& lattice,
254 const SkRect& dst, const SkPaint&);
255
248 bool drawDashLine(const SkPoint pts[2], const SkPaint& paint); 256 bool drawDashLine(const SkPoint pts[2], const SkPaint& paint);
249 void drawStrokedLine(const SkPoint pts[2], const SkDraw&, const SkPaint&); 257 void drawStrokedLine(const SkPoint pts[2], const SkDraw&, const SkPaint&);
250 258
251 static sk_sp<GrDrawContext> MakeDrawContext(GrContext*, 259 static sk_sp<GrDrawContext> MakeDrawContext(GrContext*,
252 SkBudgeted, 260 SkBudgeted,
253 const SkImageInfo&, 261 const SkImageInfo&,
254 int sampleCount, 262 int sampleCount,
255 GrSurfaceOrigin, 263 GrSurfaceOrigin,
256 const SkSurfaceProps*); 264 const SkSurfaceProps*);
257 265
258 friend class GrAtlasTextContext; 266 friend class GrAtlasTextContext;
259 friend class SkSurface_Gpu; // for access to surfaceProps 267 friend class SkSurface_Gpu; // for access to surfaceProps
260 typedef SkBaseDevice INHERITED; 268 typedef SkBaseDevice INHERITED;
261 }; 269 };
262 270
263 #endif 271 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698