OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #ifndef GrGpu_DEFINED | 10 #ifndef GrGpu_DEFINED |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 | 146 |
147 /** | 147 /** |
148 * Ensures that the current render target is actually set in the | 148 * Ensures that the current render target is actually set in the |
149 * underlying 3D API. Used when client wants to use 3D API to directly | 149 * underlying 3D API. Used when client wants to use 3D API to directly |
150 * render to the RT. | 150 * render to the RT. |
151 */ | 151 */ |
152 void forceRenderTargetFlush(); | 152 void forceRenderTargetFlush(); |
153 | 153 |
154 /** | 154 /** |
155 * Gets a preferred 8888 config to use for writing / reading pixel data. The
returned config | 155 * Gets a preferred 8888 config to use for writing / reading pixel data. The
returned config |
156 * must have at least as many bits per channel as the config param. | 156 * must have at least as many bits per channel as the readConfig or writeCon
fig param. |
157 */ | 157 */ |
158 virtual GrPixelConfig preferredReadPixelsConfig(GrPixelConfig config) const
{ return config; } | 158 virtual GrPixelConfig preferredReadPixelsConfig(GrPixelConfig readConfig, Gr
PixelConfig targetConfig) const { return readConfig; } |
159 virtual GrPixelConfig preferredWritePixelsConfig(GrPixelConfig config) const
{ return config; } | 159 virtual GrPixelConfig preferredWritePixelsConfig(GrPixelConfig writeConfig,
GrPixelConfig targetConfig) const { return writeConfig; } |
160 | 160 |
161 /** | 161 /** |
162 * Called before uploading writing pixels to a GrTexture when the src pixel
config doesn't | 162 * Called before uploading writing pixels to a GrTexture when the src pixel
config doesn't |
163 * match the texture's config. | 163 * match the texture's config. |
164 */ | 164 */ |
165 virtual bool canWriteTexturePixels(const GrTexture*, GrPixelConfig srcConfig
) const = 0; | 165 virtual bool canWriteTexturePixels(const GrTexture*, GrPixelConfig srcConfig
) const = 0; |
166 | 166 |
167 /** | 167 /** |
168 * OpenGL's readPixels returns the result bottom-to-top while the skia | 168 * OpenGL's readPixels returns the result bottom-to-top while the skia |
169 * API is top-to-bottom. Thus we have to do a y-axis flip. The obvious | 169 * API is top-to-bottom. Thus we have to do a y-axis flip. The obvious |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 mutable GrIndexBuffer* fQuadInd
exBuffer; | 524 mutable GrIndexBuffer* fQuadInd
exBuffer; |
525 bool fContext
IsDirty; | 525 bool fContext
IsDirty; |
526 // Used to abandon/release all resources created by this GrGpu. TODO: Move t
his | 526 // Used to abandon/release all resources created by this GrGpu. TODO: Move t
his |
527 // functionality to GrResourceCache. | 527 // functionality to GrResourceCache. |
528 ResourceList fResourc
eList; | 528 ResourceList fResourc
eList; |
529 | 529 |
530 typedef GrDrawTarget INHERITED; | 530 typedef GrDrawTarget INHERITED; |
531 }; | 531 }; |
532 | 532 |
533 #endif | 533 #endif |
OLD | NEW |