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

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

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

Powered by Google App Engine
This is Rietveld 408576698