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

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

Issue 622663002: GrContext::copyTexture->GrContext::copySurface. Add a flush writes pixel ops flag. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 2 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/GrContext.h ('k') | samplecode/SampleApp.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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 * @param rowBytes number of bytes between consecutive rows. Zero means rows are tightly 105 * @param rowBytes number of bytes between consecutive rows. Zero means rows are tightly
106 * packed. 106 * packed.
107 * @param pixelOpsFlags See the GrContext::PixelOpsFlags enum. 107 * @param pixelOpsFlags See the GrContext::PixelOpsFlags enum.
108 */ 108 */
109 virtual void writePixels(int left, int top, int width, int height, 109 virtual void writePixels(int left, int top, int width, int height,
110 GrPixelConfig config, 110 GrPixelConfig config,
111 const void* buffer, 111 const void* buffer,
112 size_t rowBytes = 0, 112 size_t rowBytes = 0,
113 uint32_t pixelOpsFlags = 0) = 0; 113 uint32_t pixelOpsFlags = 0) = 0;
114 114
115 /**
116 * After this returns any pending writes to the surface will be issued to th e backend 3D API.
117 */
118 void flushWrites();
119
115 /** Access methods that are only to be used within Skia code. */ 120 /** Access methods that are only to be used within Skia code. */
116 inline GrSurfacePriv surfacePriv(); 121 inline GrSurfacePriv surfacePriv();
117 inline const GrSurfacePriv surfacePriv() const; 122 inline const GrSurfacePriv surfacePriv() const;
118 123
119 protected: 124 protected:
120 // Methods made available via GrSurfacePriv 125 // Methods made available via GrSurfacePriv
121 SkImageInfo info() const; 126 SkImageInfo info() const;
122 bool savePixels(const char* filename); 127 bool savePixels(const char* filename);
123 bool hasPendingRead() const; 128 bool hasPendingRead() const;
124 bool hasPendingWrite() const; 129 bool hasPendingWrite() const;
125 bool hasPendingIO() const; 130 bool hasPendingIO() const;
126 bool isSameAs(const GrSurface* other) const; 131 bool isSameAs(const GrSurface* other) const;
127 132
128 // Provides access to methods that should be public within Skia code. 133 // Provides access to methods that should be public within Skia code.
129 friend class GrSurfacePriv; 134 friend class GrSurfacePriv;
130 135
131 GrSurface(GrGpu* gpu, bool isWrapped, const GrTextureDesc& desc) 136 GrSurface(GrGpu* gpu, bool isWrapped, const GrTextureDesc& desc)
132 : INHERITED(gpu, isWrapped) 137 : INHERITED(gpu, isWrapped)
133 , fDesc(desc) { 138 , fDesc(desc) {
134 } 139 }
135 140
136 GrTextureDesc fDesc; 141 GrTextureDesc fDesc;
137 142
138 private: 143 private:
139 typedef GrGpuResource INHERITED; 144 typedef GrGpuResource INHERITED;
140 }; 145 };
141 146
142 #endif 147 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrContext.h ('k') | samplecode/SampleApp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698