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

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

Issue 1669213002: Revert of skia: Add support for CHROMIUM_image backed textures. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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/GrTextureProvider.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 #ifndef SkGpuDevice_DEFINED 9 #ifndef SkGpuDevice_DEFINED
10 #define SkGpuDevice_DEFINED 10 #define SkGpuDevice_DEFINED
11 11
12 #include "SkGr.h" 12 #include "SkGr.h"
13 #include "SkBitmap.h" 13 #include "SkBitmap.h"
14 #include "SkDevice.h" 14 #include "SkDevice.h"
15 #include "SkPicture.h" 15 #include "SkPicture.h"
16 #include "SkRegion.h" 16 #include "SkRegion.h"
17 #include "SkSurface.h" 17 #include "SkSurface.h"
18 #include "GrDrawContext.h" 18 #include "GrDrawContext.h"
19 #include "GrContext.h" 19 #include "GrContext.h"
20 #include "GrSurfacePriv.h" 20 #include "GrSurfacePriv.h"
21 #include "GrTypes.h"
22 21
23 class GrAccelData; 22 class GrAccelData;
24 class GrTextureProducer; 23 class GrTextureProducer;
25 struct GrCachedLayer; 24 struct GrCachedLayer;
26 25
27 /** 26 /**
28 * Subclass of SkBaseDevice, which directs all drawing to the GrGpu owned by th e 27 * Subclass of SkBaseDevice, which directs all drawing to the GrGpu owned by th e
29 * canvas. 28 * canvas.
30 */ 29 */
31 class SK_API SkGpuDevice : public SkBaseDevice { 30 class SK_API SkGpuDevice : public SkBaseDevice {
(...skipping 14 matching lines...) Expand all
46 */ 45 */
47 static SkGpuDevice* Create(GrRenderTarget* target, int width, int height, 46 static SkGpuDevice* Create(GrRenderTarget* target, int width, int height,
48 const SkSurfaceProps*, InitContents); 47 const SkSurfaceProps*, InitContents);
49 48
50 /** 49 /**
51 * New device that will create an offscreen renderTarget based on the ImageI nfo and 50 * New device that will create an offscreen renderTarget based on the ImageI nfo and
52 * sampleCount. The Budgeted param controls whether the device's backing sto re counts against 51 * sampleCount. The Budgeted param controls whether the device's backing sto re counts against
53 * the resource cache budget. On failure, returns nullptr. 52 * the resource cache budget. On failure, returns nullptr.
54 */ 53 */
55 static SkGpuDevice* Create(GrContext*, SkSurface::Budgeted, const SkImageInf o&, 54 static SkGpuDevice* Create(GrContext*, SkSurface::Budgeted, const SkImageInf o&,
56 int sampleCount, const SkSurfaceProps*, 55 int sampleCount, const SkSurfaceProps*, InitConte nts);
57 InitContents, GrTextureStorageAllocator = GrTextu reStorageAllocator());
58 56
59 ~SkGpuDevice() override {} 57 ~SkGpuDevice() override {}
60 58
61 SkGpuDevice* cloneDevice(const SkSurfaceProps& props) { 59 SkGpuDevice* cloneDevice(const SkSurfaceProps& props) {
62 SkBaseDevice* dev = this->onCreateDevice(CreateInfo(this->imageInfo(), k Possible_TileUsage, 60 SkBaseDevice* dev = this->onCreateDevice(CreateInfo(this->imageInfo(), k Possible_TileUsage,
63 props.pixelGeometry( )), 61 props.pixelGeometry( )),
64 nullptr); 62 nullptr);
65 return static_cast<SkGpuDevice*>(dev); 63 return static_cast<SkGpuDevice*>(dev);
66 } 64 }
67 65
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 const SkMatrix& srcToDstMatrix, 249 const SkMatrix& srcToDstMatrix,
252 const GrClip&, 250 const GrClip&,
253 const SkPaint&); 251 const SkPaint&);
254 252
255 void drawProducerNine(const SkDraw&, GrTextureProducer*, const SkIRect& cent er, 253 void drawProducerNine(const SkDraw&, GrTextureProducer*, const SkIRect& cent er,
256 const SkRect& dst, const SkPaint&); 254 const SkRect& dst, const SkPaint&);
257 255
258 bool drawDashLine(const SkPoint pts[2], const SkPaint& paint); 256 bool drawDashLine(const SkPoint pts[2], const SkPaint& paint);
259 257
260 static GrRenderTarget* CreateRenderTarget(GrContext*, SkSurface::Budgeted, c onst SkImageInfo&, 258 static GrRenderTarget* CreateRenderTarget(GrContext*, SkSurface::Budgeted, c onst SkImageInfo&,
261 int sampleCount, GrTextureStorageA llocator); 259 int sampleCount);
262 260
263 friend class GrAtlasTextContext; 261 friend class GrAtlasTextContext;
264 friend class SkSurface_Gpu; // for access to surfaceProps 262 friend class SkSurface_Gpu; // for access to surfaceProps
265 typedef SkBaseDevice INHERITED; 263 typedef SkBaseDevice INHERITED;
266 }; 264 };
267 265
268 #endif 266 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrTextureProvider.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698