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

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

Issue 1506203002: Move texture drawing utility method to SkGpuDevice (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix comment Created 5 years 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/GrTest.cpp ('k') | no next file » | 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 #ifndef SkGpuDevice_DEFINED 9 #ifndef SkGpuDevice_DEFINED
10 #define SkGpuDevice_DEFINED 10 #define SkGpuDevice_DEFINED
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 virtual bool filterImage(const SkImageFilter*, const SkBitmap&, 133 virtual bool filterImage(const SkImageFilter*, const SkBitmap&,
134 const SkImageFilter::Context&, 134 const SkImageFilter::Context&,
135 SkBitmap*, SkIPoint*) override; 135 SkBitmap*, SkIPoint*) override;
136 136
137 bool filterTexture(GrContext*, GrTexture*, int width, int height, const SkIm ageFilter*, 137 bool filterTexture(GrContext*, GrTexture*, int width, int height, const SkIm ageFilter*,
138 const SkImageFilter::Context&, 138 const SkImageFilter::Context&,
139 SkBitmap* result, SkIPoint* offset); 139 SkBitmap* result, SkIPoint* offset);
140 140
141 static SkImageFilter::Cache* NewImageFilterCache(); 141 static SkImageFilter::Cache* NewImageFilterCache();
142 142
143 // for debugging purposes only
144 void drawTexture(GrTexture*, const SkRect& dst, const SkPaint&);
145
143 protected: 146 protected:
144 bool onReadPixels(const SkImageInfo&, void*, size_t, int, int) override; 147 bool onReadPixels(const SkImageInfo&, void*, size_t, int, int) override;
145 bool onWritePixels(const SkImageInfo&, const void*, size_t, int, int) overri de; 148 bool onWritePixels(const SkImageInfo&, const void*, size_t, int, int) overri de;
146 bool onShouldDisableLCD(const SkPaint&) const final; 149 bool onShouldDisableLCD(const SkPaint&) const final;
147 150
148 /** PRIVATE / EXPERIMENTAL -- do not call */ 151 /** PRIVATE / EXPERIMENTAL -- do not call */
149 virtual bool EXPERIMENTAL_drawPicture(SkCanvas* canvas, const SkPicture* pic ture, 152 virtual bool EXPERIMENTAL_drawPicture(SkCanvas* canvas, const SkPicture* pic ture,
150 const SkMatrix*, const SkPaint*) overr ide; 153 const SkMatrix*, const SkPaint*) overr ide;
151 154
152 private: 155 private:
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 253
251 static GrRenderTarget* CreateRenderTarget(GrContext*, SkSurface::Budgeted, c onst SkImageInfo&, 254 static GrRenderTarget* CreateRenderTarget(GrContext*, SkSurface::Budgeted, c onst SkImageInfo&,
252 int sampleCount); 255 int sampleCount);
253 256
254 friend class GrAtlasTextContext; 257 friend class GrAtlasTextContext;
255 friend class SkSurface_Gpu; // for access to surfaceProps 258 friend class SkSurface_Gpu; // for access to surfaceProps
256 typedef SkBaseDevice INHERITED; 259 typedef SkBaseDevice INHERITED;
257 }; 260 };
258 261
259 #endif 262 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698