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

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

Issue 696293004: Rename and clarify semantics of GrContext::resolveRenderTarget. (Closed) Base URL: https://skia.googlesource.com/skia.git@fix
Patch Set: Created 6 years, 1 month 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
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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 GrPixelConfig config, 109 GrPixelConfig config,
110 const void* buffer, 110 const void* buffer,
111 size_t rowBytes = 0, 111 size_t rowBytes = 0,
112 uint32_t pixelOpsFlags = 0); 112 uint32_t pixelOpsFlags = 0);
113 113
114 /** 114 /**
115 * After this returns any pending writes to the surface will be issued to th e backend 3D API. 115 * After this returns any pending writes to the surface will be issued to th e backend 3D API.
116 */ 116 */
117 void flushWrites(); 117 void flushWrites();
118 118
119
120 /**
121 * After this returns any pending writes to the surface will be issued to th e backend 3D API and
122 * if the surface has MSAA it will be resolved.
123 */
124 void prepareForExternalRead();
125
119 /** Access methods that are only to be used within Skia code. */ 126 /** Access methods that are only to be used within Skia code. */
120 inline GrSurfacePriv surfacePriv(); 127 inline GrSurfacePriv surfacePriv();
121 inline const GrSurfacePriv surfacePriv() const; 128 inline const GrSurfacePriv surfacePriv() const;
122 129
123 protected: 130 protected:
124 // Methods made available via GrSurfacePriv 131 // Methods made available via GrSurfacePriv
125 SkImageInfo info() const; 132 SkImageInfo info() const;
126 bool savePixels(const char* filename); 133 bool savePixels(const char* filename);
127 bool hasPendingRead() const; 134 bool hasPendingRead() const;
128 bool hasPendingWrite() const; 135 bool hasPendingWrite() const;
129 bool hasPendingIO() const; 136 bool hasPendingIO() const;
130 bool isSameAs(const GrSurface* other) const; 137 bool isSameAs(const GrSurface* other) const;
131 138
132 // Provides access to methods that should be public within Skia code. 139 // Provides access to methods that should be public within Skia code.
133 friend class GrSurfacePriv; 140 friend class GrSurfacePriv;
134 141
135 GrSurface(GrGpu* gpu, bool isWrapped, const GrSurfaceDesc& desc) 142 GrSurface(GrGpu* gpu, bool isWrapped, const GrSurfaceDesc& desc)
136 : INHERITED(gpu, isWrapped) 143 : INHERITED(gpu, isWrapped)
137 , fDesc(desc) { 144 , fDesc(desc) {
138 } 145 }
139 146
140 GrSurfaceDesc fDesc; 147 GrSurfaceDesc fDesc;
141 148
142 private: 149 private:
143 typedef GrGpuResource INHERITED; 150 typedef GrGpuResource INHERITED;
144 }; 151 };
145 152
146 #endif 153 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrRenderTarget.h ('k') | src/gpu/GrContext.cpp » ('j') | src/gpu/GrContext.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698