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

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

Issue 583773004: Revert of introduce Props to surface (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 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/GrLayerHoister.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 25 matching lines...) Expand all
36 kCached_Flag = 1 << 1, //!< Surface is cached and needs to be unlock ed when released 36 kCached_Flag = 1 << 1, //!< Surface is cached and needs to be unlock ed when released
37 kDFFonts_Flag = 1 << 2, //!< Surface should render fonts using signed distance fields 37 kDFFonts_Flag = 1 << 2, //!< Surface should render fonts using signed distance fields
38 }; 38 };
39 39
40 /** 40 /**
41 * 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
42 * 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,
43 * 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
44 * the surface when it is released. 44 * the surface when it is released.
45 */ 45 */
46 static SkGpuDevice* Create(GrSurface* surface, const SkSurfaceProps&, unsign ed flags = 0); 46 static SkGpuDevice* Create(GrSurface* surface, unsigned flags = 0);
47 47
48 /** 48 /**
49 * New device that will create an offscreen renderTarget based on the 49 * New device that will create an offscreen renderTarget based on the
50 * ImageInfo and sampleCount. The device's storage will not 50 * ImageInfo and sampleCount. The device's storage will not
51 * count against the GrContext's texture cache budget. The device's pixels 51 * count against the GrContext's texture cache budget. The device's pixels
52 * will be uninitialized. On failure, returns NULL. 52 * will be uninitialized. On failure, returns NULL.
53 */ 53 */
54 static SkGpuDevice* Create(GrContext*, const SkImageInfo&, const SkSurfacePr ops&, 54 static SkGpuDevice* Create(GrContext*, const SkImageInfo&, int sampleCount);
55 int sampleCount);
56 55
57 virtual ~SkGpuDevice(); 56 virtual ~SkGpuDevice();
58 57
59 GrContext* context() const { return fContext; } 58 GrContext* context() const { return fContext; }
60 59
61 virtual GrRenderTarget* accessRenderTarget() SK_OVERRIDE; 60 virtual GrRenderTarget* accessRenderTarget() SK_OVERRIDE;
62 61
63 virtual SkImageInfo imageInfo() const SK_OVERRIDE { 62 virtual SkImageInfo imageInfo() const SK_OVERRIDE {
64 return fRenderTarget ? fRenderTarget->info() : SkImageInfo::MakeUnknown( ); 63 return fRenderTarget ? fRenderTarget->info() : SkImageInfo::MakeUnknown( );
65 } 64 }
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 GrTextContext* fMainTextContext; 138 GrTextContext* fMainTextContext;
140 GrTextContext* fFallbackTextContext; 139 GrTextContext* fFallbackTextContext;
141 140
142 // state for our render-target 141 // state for our render-target
143 GrRenderTarget* fRenderTarget; 142 GrRenderTarget* fRenderTarget;
144 bool fNeedClear; 143 bool fNeedClear;
145 144
146 // remove when our clients don't rely on accessBitmap() 145 // remove when our clients don't rely on accessBitmap()
147 SkBitmap fLegacyBitmap; 146 SkBitmap fLegacyBitmap;
148 147
149 SkGpuDevice(GrSurface*, const SkSurfaceProps&, unsigned flags = 0); 148 SkGpuDevice(GrSurface*, unsigned flags = 0);
150 149
151 virtual SkBaseDevice* onCreateDevice(const SkImageInfo&, Usage) SK_OVERRIDE; 150 virtual SkBaseDevice* onCreateDevice(const SkImageInfo&, Usage) SK_OVERRIDE;
152 151
153 virtual SkSurface* newSurface(const SkImageInfo&, const SkSurfaceProps&) SK_ OVERRIDE; 152 virtual SkSurface* newSurface(const SkImageInfo&) SK_OVERRIDE;
154 153
155 virtual SkImageFilter::Cache* getImageFilterCache() SK_OVERRIDE; 154 virtual SkImageFilter::Cache* getImageFilterCache() SK_OVERRIDE;
156 155
157 // temporarily change the return to false, until we understand the issues wi th filters and persp 156 // temporarily change the return to false, until we understand the issues wi th filters and persp
158 virtual bool forceConservativeRasterClip() const SK_OVERRIDE { return true; } 157 virtual bool forceConservativeRasterClip() const SK_OVERRIDE { return true; }
159 158
160 // sets the render target, clip, and matrix on GrContext. Use forceIdenity t o override 159 // sets the render target, clip, and matrix on GrContext. Use forceIdenity t o override
161 // SkDraw's matrix and draw in device coords. 160 // SkDraw's matrix and draw in device coords.
162 void prepareDraw(const SkDraw&, bool forceIdentity); 161 void prepareDraw(const SkDraw&, bool forceIdentity);
163 162
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 bool bicubic); 199 bool bicubic);
201 200
202 bool drawDashLine(const SkPoint pts[2], const SkPaint& paint); 201 bool drawDashLine(const SkPoint pts[2], const SkPaint& paint);
203 202
204 static SkPicture::AccelData::Key ComputeAccelDataKey(); 203 static SkPicture::AccelData::Key ComputeAccelDataKey();
205 204
206 typedef SkBaseDevice INHERITED; 205 typedef SkBaseDevice INHERITED;
207 }; 206 };
208 207
209 #endif 208 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrLayerHoister.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698