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

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

Issue 925343002: Swap render target instead of creating a new gpu device for surface copy-on-write (Closed) Base URL: https://skia.googlesource.com/skia.git@skimage-filters-02-use-sksurface-constructor-skgpudevice
Patch Set: Created 5 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/core/SkCanvas.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
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 kGeneral_U sage, 55 kGeneral_U sage,
56 props.pixe lGeometry())); 56 props.pixe lGeometry()));
57 return static_cast<SkGpuDevice*>(dev); 57 return static_cast<SkGpuDevice*>(dev);
58 } 58 }
59 59
60 GrContext* context() const { return fRenderTarget->getContext(); } 60 GrContext* context() const { return fRenderTarget->getContext(); }
61 61
62 // set all pixels to 0 62 // set all pixels to 0
63 void clearAll(); 63 void clearAll();
64 64
65 void replaceRenderTarget(bool shouldRetainContent);
66
65 GrRenderTarget* accessRenderTarget() SK_OVERRIDE; 67 GrRenderTarget* accessRenderTarget() SK_OVERRIDE;
66 68
67 SkImageInfo imageInfo() const SK_OVERRIDE { 69 SkImageInfo imageInfo() const SK_OVERRIDE {
68 return fRenderTarget ? fRenderTarget->surfacePriv().info() : SkImageInfo ::MakeUnknown(); 70 return fRenderTarget ? fRenderTarget->surfacePriv().info() : SkImageInfo ::MakeUnknown();
69 } 71 }
70 72
71 const SkSurfaceProps& surfaceProps() const { return fSurfaceProps; } 73 const SkSurfaceProps& surfaceProps() const { return fSurfaceProps; }
72 74
73 void drawPaint(const SkDraw&, const SkPaint& paint) SK_OVERRIDE; 75 void drawPaint(const SkDraw&, const SkPaint& paint) SK_OVERRIDE;
74 virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t coun t, 76 virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t coun t,
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 const GrTextureParams& params, 194 const GrTextureParams& params,
193 const SkPaint& paint, 195 const SkPaint& paint,
194 SkCanvas::DrawBitmapRectFlags flags, 196 SkCanvas::DrawBitmapRectFlags flags,
195 int tileSize, 197 int tileSize,
196 bool bicubic); 198 bool bicubic);
197 199
198 bool drawDashLine(const SkPoint pts[2], const SkPaint& paint); 200 bool drawDashLine(const SkPoint pts[2], const SkPaint& paint);
199 201
200 static SkPicture::AccelData::Key ComputeAccelDataKey(); 202 static SkPicture::AccelData::Key ComputeAccelDataKey();
201 203
204 static GrRenderTarget* CreateRenderTarget(GrContext*, SkSurface::Budgeted, c onst SkImageInfo&,
205 int sampleCount);
206
202 typedef SkBaseDevice INHERITED; 207 typedef SkBaseDevice INHERITED;
203 }; 208 };
204 209
205 #endif 210 #endif
OLDNEW
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698