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

Side by Side Diff: src/gpu/gl/GrGLGpu.h

Issue 1615023003: Add ability to query read pixels support without a render target. (Closed) Base URL: https://skia.googlesource.com/skia.git@fixsupp
Patch Set: squash with prev cl in series Created 4 years, 11 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/gpu/gl/GrGLCaps.cpp ('k') | src/gpu/gl/GrGLGpu.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 2011 Google Inc. 2 * Copyright 2011 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 #ifndef GrGLGpu_DEFINED 8 #ifndef GrGLGpu_DEFINED
9 #define GrGLGpu_DEFINED 9 #define GrGLGpu_DEFINED
10 10
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 // compatible stencil format, or negative if there is no compatible stencil format. 159 // compatible stencil format, or negative if there is no compatible stencil format.
160 int getCompatibleStencilIndex(GrPixelConfig config); 160 int getCompatibleStencilIndex(GrPixelConfig config);
161 161
162 void onClear(GrRenderTarget*, const SkIRect& rect, GrColor color) override; 162 void onClear(GrRenderTarget*, const SkIRect& rect, GrColor color) override;
163 163
164 void onClearStencilClip(GrRenderTarget*, const SkIRect& rect, bool insideCli p) override; 164 void onClearStencilClip(GrRenderTarget*, const SkIRect& rect, bool insideCli p) override;
165 165
166 bool onMakeCopyForTextureParams(GrTexture*, const GrTextureParams&, 166 bool onMakeCopyForTextureParams(GrTexture*, const GrTextureParams&,
167 GrTextureProducer::CopyParams*) const overri de; 167 GrTextureProducer::CopyParams*) const overri de;
168 168
169 // Checks whether glReadPixels can be called to get pixel values in readConf ig from the
170 // render target.
171 bool readPixelsSupported(GrRenderTarget* target, GrPixelConfig readConfig);
172
173 // Checks whether glReadPixels can be called to get pixel values in readConf ig from a
174 // render target that has renderTargetConfig. This may have to create a temp orary
175 // render target and thus is less preferable than the variant that takes a r ender target.
176 bool readPixelsSupported(GrPixelConfig renderTargetConfig, GrPixelConfig rea dConfig);
177
178 // Checks whether glReadPixels can be called to get pixel values in readConf ig from a
179 // render target that has the same config as surfaceForConfig. Calls one of the the two
180 // variations above, depending on whether the surface is a render target or not.
181 bool readPixelsSupported(GrSurface* surfaceForConfig, GrPixelConfig readConf ig);
182
169 bool onReadPixels(GrSurface*, 183 bool onReadPixels(GrSurface*,
170 int left, int top, 184 int left, int top,
171 int width, int height, 185 int width, int height,
172 GrPixelConfig, 186 GrPixelConfig,
173 void* buffer, 187 void* buffer,
174 size_t rowBytes) override; 188 size_t rowBytes) override;
175 189
176 bool onWritePixels(GrSurface*, 190 bool onWritePixels(GrSurface*,
177 int left, int top, int width, int height, 191 int left, int top, int width, int height,
178 GrPixelConfig config, const void* buffer, 192 GrPixelConfig config, const void* buffer,
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 } fPLSSetupProgram; 581 } fPLSSetupProgram;
568 582
569 bool fHWPLSEnabled; 583 bool fHWPLSEnabled;
570 bool fPLSHasBeenUsed; 584 bool fPLSHasBeenUsed;
571 585
572 typedef GrGpu INHERITED; 586 typedef GrGpu INHERITED;
573 friend class GrGLPathRendering; // For accessing setTextureUnit. 587 friend class GrGLPathRendering; // For accessing setTextureUnit.
574 }; 588 };
575 589
576 #endif 590 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698