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

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

Issue 586073002: Don't flush on read/write pixels unless necessary (Closed) Base URL: https://skia.googlesource.com/skia.git@iotype
Patch Set: Flush when drawing direct to GrGpu in GrContext 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
138 protected: 142 protected:
139 GrSurface(GrGpu* gpu, bool isWrapped, const GrTextureDesc& desc) 143 GrSurface(GrGpu* gpu, bool isWrapped, const GrTextureDesc& desc)
140 : INHERITED(gpu, isWrapped) 144 : INHERITED(gpu, isWrapped)
141 , fDesc(desc) { 145 , fDesc(desc) {
142 } 146 }
143 147
144 GrTextureDesc fDesc; 148 GrTextureDesc fDesc;
145 149
146 private: 150 private:
147 typedef GrGpuResource INHERITED; 151 typedef GrGpuResource INHERITED;
148 }; 152 };
149 153
150 #endif // GrSurface_DEFINED 154 #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