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

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

Issue 611383003: Revert of GrResourceCache2 manages scratch texture. (Closed) Base URL: https://skia.googlesource.com/skia.git@surfimpl
Patch Set: Created 6 years, 2 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
« no previous file with comments | « src/gpu/GrTexture.cpp ('k') | 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 16 matching lines...) Expand all
27 class GrTextContext; 27 class GrTextContext;
28 28
29 /** 29 /**
30 * Subclass of SkBaseDevice, which directs all drawing to the GrGpu owned by th e 30 * Subclass of SkBaseDevice, which directs all drawing to the GrGpu owned by th e
31 * canvas. 31 * canvas.
32 */ 32 */
33 class SK_API SkGpuDevice : public SkBaseDevice { 33 class SK_API SkGpuDevice : public SkBaseDevice {
34 public: 34 public:
35 enum Flags { 35 enum Flags {
36 kNeedClear_Flag = 1 << 0, //!< Surface requires an initial clear 36 kNeedClear_Flag = 1 << 0, //!< Surface requires an initial clear
37 kDFFonts_Flag = 1 << 1, //!< Surface should render fonts using signed distance fields 37 kCached_Flag = 1 << 1, //!< Surface is cached and needs to be unlock ed when released
38 kDFFonts_Flag = 1 << 2, //!< Surface should render fonts using signed distance fields
38 }; 39 };
39 40
40 /** 41 /**
41 * Creates an SkGpuDevice from a GrSurface. This will fail if the surface is not a render 42 * Creates an SkGpuDevice from a GrSurface. This will fail if the surface is not a render
42 * target. The caller owns a ref on the returned device. If the surface is c ached, 43 * target. The caller owns a ref on the returned device. If the surface is c ached,
43 * the kCached_Flag should be specified to make the device responsible for u nlocking 44 * the kCached_Flag should be specified to make the device responsible for u nlocking
44 * the surface when it is released. 45 * the surface when it is released.
45 */ 46 */
46 static SkGpuDevice* Create(GrSurface* surface, const SkSurfaceProps&, unsign ed flags = 0); 47 static SkGpuDevice* Create(GrSurface* surface, const SkSurfaceProps&, unsign ed flags = 0);
47 48
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 virtual void onAttachToCanvas(SkCanvas* canvas) SK_OVERRIDE; 110 virtual void onAttachToCanvas(SkCanvas* canvas) SK_OVERRIDE;
110 virtual void onDetachFromCanvas() SK_OVERRIDE; 111 virtual void onDetachFromCanvas() SK_OVERRIDE;
111 112
112 virtual const SkBitmap& onAccessBitmap() SK_OVERRIDE; 113 virtual const SkBitmap& onAccessBitmap() SK_OVERRIDE;
113 114
114 virtual bool canHandleImageFilter(const SkImageFilter*) SK_OVERRIDE; 115 virtual bool canHandleImageFilter(const SkImageFilter*) SK_OVERRIDE;
115 virtual bool filterImage(const SkImageFilter*, const SkBitmap&, 116 virtual bool filterImage(const SkImageFilter*, const SkBitmap&,
116 const SkImageFilter::Context&, 117 const SkImageFilter::Context&,
117 SkBitmap*, SkIPoint*) SK_OVERRIDE; 118 SkBitmap*, SkIPoint*) SK_OVERRIDE;
118 119
120 class SkAutoCachedTexture; // used internally
121
122
119 protected: 123 protected:
120 virtual bool onReadPixels(const SkImageInfo&, void*, size_t, int, int) SK_OV ERRIDE; 124 virtual bool onReadPixels(const SkImageInfo&, void*, size_t, int, int) SK_OV ERRIDE;
121 virtual bool onWritePixels(const SkImageInfo&, const void*, size_t, int, int ) SK_OVERRIDE; 125 virtual bool onWritePixels(const SkImageInfo&, const void*, size_t, int, int ) SK_OVERRIDE;
122 126
123 /** PRIVATE / EXPERIMENTAL -- do not call */ 127 /** PRIVATE / EXPERIMENTAL -- do not call */
124 virtual void EXPERIMENTAL_optimize(const SkPicture* picture) SK_OVERRIDE; 128 virtual void EXPERIMENTAL_optimize(const SkPicture* picture) SK_OVERRIDE;
125 /** PRIVATE / EXPERIMENTAL -- do not call */ 129 /** PRIVATE / EXPERIMENTAL -- do not call */
126 virtual bool EXPERIMENTAL_drawPicture(SkCanvas* canvas, const SkPicture* pic ture, 130 virtual bool EXPERIMENTAL_drawPicture(SkCanvas* canvas, const SkPicture* pic ture,
127 const SkMatrix*, const SkPaint*) SK_OV ERRIDE; 131 const SkMatrix*, const SkPaint*) SK_OV ERRIDE;
128 132
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 bool bicubic); 201 bool bicubic);
198 202
199 bool drawDashLine(const SkPoint pts[2], const SkPaint& paint); 203 bool drawDashLine(const SkPoint pts[2], const SkPaint& paint);
200 204
201 static SkPicture::AccelData::Key ComputeAccelDataKey(); 205 static SkPicture::AccelData::Key ComputeAccelDataKey();
202 206
203 typedef SkBaseDevice INHERITED; 207 typedef SkBaseDevice INHERITED;
204 }; 208 };
205 209
206 #endif 210 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrTexture.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698