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

Side by Side Diff: include/gpu/GrSurface.h

Issue 594543004: Revert of Don't flush on read/write pixels unless necessary (Closed) Base URL: https://skia.googlesource.com/skia.git@iotype
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 | « include/gpu/GrGpuResource.h ('k') | src/gpu/GrContext.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 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 8
9 #ifndef GrSurface_DEFINED 9 #ifndef GrSurface_DEFINED
10 #define GrSurface_DEFINED 10 #define GrSurface_DEFINED
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 const void* buffer, 128 const void* buffer,
129 size_t rowBytes = 0, 129 size_t rowBytes = 0,
130 uint32_t pixelOpsFlags = 0) = 0; 130 uint32_t pixelOpsFlags = 0) = 0;
131 131
132 /** 132 /**
133 * Write the contents of the surface to a PNG. Returns true if successful. 133 * Write the contents of the surface to a PNG. Returns true if successful.
134 * @param filename Full path to desired file 134 * @param filename Full path to desired file
135 */ 135 */
136 bool savePixels(const char* filename); 136 bool savePixels(const char* filename);
137 137
138 bool hasPendingRead() const;
139 bool hasPendingWrite() const;
140 bool hasPendingIO() const;
141
142 protected: 138 protected:
143 GrSurface(GrGpu* gpu, bool isWrapped, const GrTextureDesc& desc) 139 GrSurface(GrGpu* gpu, bool isWrapped, const GrTextureDesc& desc)
144 : INHERITED(gpu, isWrapped) 140 : INHERITED(gpu, isWrapped)
145 , fDesc(desc) { 141 , fDesc(desc) {
146 } 142 }
147 143
148 GrTextureDesc fDesc; 144 GrTextureDesc fDesc;
149 145
150 private: 146 private:
151 typedef GrGpuResource INHERITED; 147 typedef GrGpuResource INHERITED;
152 }; 148 };
153 149
154 #endif // GrSurface_DEFINED 150 #endif // GrSurface_DEFINED
OLDNEW
« no previous file with comments | « include/gpu/GrGpuResource.h ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698