Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 156 // Given a GrPixelConfig return the index into the stencil format array on G rGLCaps to a | 156 // Given a GrPixelConfig return the index into the stencil format array on G rGLCaps to a |
| 157 // compatible stencil format, or negative if there is no compatible stencil format. | 157 // compatible stencil format, or negative if there is no compatible stencil format. |
| 158 int getCompatibleStencilIndex(GrPixelConfig config); | 158 int getCompatibleStencilIndex(GrPixelConfig config); |
| 159 | 159 |
| 160 void onClear(GrRenderTarget*, const SkIRect& rect, GrColor color) override; | 160 void onClear(GrRenderTarget*, const SkIRect& rect, GrColor color) override; |
| 161 | 161 |
| 162 void onClearStencilClip(GrRenderTarget*, const SkIRect& rect, bool insideCli p) override; | 162 void onClearStencilClip(GrRenderTarget*, const SkIRect& rect, bool insideCli p) override; |
| 163 | 163 |
| 164 bool onMakeCopyForTextureParams(GrTexture*, const GrTextureParams&, | 164 bool onMakeCopyForTextureParams(GrTexture*, const GrTextureParams&, |
| 165 GrTextureProducer::CopyParams*) const overri de; | 165 GrTextureProducer::CopyParams*) const overri de; |
| 166 | 166 |
|
robertphillips
2016/01/22 14:56:10
pixels -> pixel ?
Here and in other two comments t
bsalomon
2016/01/22 15:50:19
Done.
| |
| 167 // Checks whether glReadPixels can be called to get pixels values in readCon fig from the | |
| 168 // render target. | |
| 167 bool readPixelsSupported(GrRenderTarget* target, GrPixelConfig readConfig); | 169 bool readPixelsSupported(GrRenderTarget* target, GrPixelConfig readConfig); |
| 168 | 170 |
| 171 // Checks whether glReadPixels can be called to get pixels values in readCon fig from a | |
| 172 // render target that has renderTargetConfig. This may have to create a temp orary | |
| 173 // render target and thus is less preferable than the variant that takes a r ender target. | |
| 174 bool readPixelsSupported(GrPixelConfig renderTargetConfig, GrPixelConfig rea dConfig); | |
| 175 | |
| 176 // Checks whether glReadPixels can be called to get pixels values in readCon fig from a | |
| 177 // render target that has the same config as surfaceForConfig. Calls one of the the two | |
| 178 // variations above, depending on whether the surface is a render target or not. | |
| 179 bool readPixelsSupported(GrSurface* surfaceForConfig, GrPixelConfig readConf ig); | |
| 180 | |
| 169 bool onReadPixels(GrSurface*, | 181 bool onReadPixels(GrSurface*, |
| 170 int left, int top, | 182 int left, int top, |
| 171 int width, int height, | 183 int width, int height, |
| 172 GrPixelConfig, | 184 GrPixelConfig, |
| 173 void* buffer, | 185 void* buffer, |
| 174 size_t rowBytes) override; | 186 size_t rowBytes) override; |
| 175 | 187 |
| 176 bool onWritePixels(GrSurface*, | 188 bool onWritePixels(GrSurface*, |
| 177 int left, int top, int width, int height, | 189 int left, int top, int width, int height, |
| 178 GrPixelConfig config, const void* buffer, | 190 GrPixelConfig config, const void* buffer, |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 551 SkFAIL("Unexpected texture target type."); | 563 SkFAIL("Unexpected texture target type."); |
| 552 return 0; | 564 return 0; |
| 553 } | 565 } |
| 554 } | 566 } |
| 555 | 567 |
| 556 typedef GrGpu INHERITED; | 568 typedef GrGpu INHERITED; |
| 557 friend class GrGLPathRendering; // For accessing setTextureUnit. | 569 friend class GrGLPathRendering; // For accessing setTextureUnit. |
| 558 }; | 570 }; |
| 559 | 571 |
| 560 #endif | 572 #endif |
| OLD | NEW |