| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2010 Google Inc. | 2 * Copyright 2010 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 GrDrawTarget_DEFINED | 8 #ifndef GrDrawTarget_DEFINED |
| 9 #define GrDrawTarget_DEFINED | 9 #define GrDrawTarget_DEFINED |
| 10 | 10 |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 */ | 177 */ |
| 178 void saveActiveTraceMarkers(); | 178 void saveActiveTraceMarkers(); |
| 179 void restoreActiveTraceMarkers(); | 179 void restoreActiveTraceMarkers(); |
| 180 | 180 |
| 181 /** | 181 /** |
| 182 * Copies a pixel rectangle from one surface to another. This call may final
ize | 182 * Copies a pixel rectangle from one surface to another. This call may final
ize |
| 183 * reserved vertex/index data (as though a draw call was made). The src pixe
ls | 183 * reserved vertex/index data (as though a draw call was made). The src pixe
ls |
| 184 * copied are specified by srcRect. They are copied to a rect of the same | 184 * copied are specified by srcRect. They are copied to a rect of the same |
| 185 * size in dst with top left at dstPoint. If the src rect is clipped by the | 185 * size in dst with top left at dstPoint. If the src rect is clipped by the |
| 186 * src bounds then pixel values in the dst rect corresponding to area clipp
ed | 186 * src bounds then pixel values in the dst rect corresponding to area clipp
ed |
| 187 * by the src rect are not overwritten. This method can fail and return fals
e | 187 * by the src rect are not overwritten. This method is not guaranteed to suc
ceed |
| 188 * depending on the type of surface, configs, etc, and the backend-specific | 188 * depending on the type of surface, configs, etc, and the backend-specific |
| 189 * limitations. If rect is clipped out entirely by the src or dst bounds the
n | 189 * limitations. |
| 190 * true is returned since there is no actual copy necessary to succeed. | |
| 191 */ | 190 */ |
| 192 bool copySurface(GrSurface* dst, | 191 void copySurface(GrSurface* dst, |
| 193 GrSurface* src, | 192 GrSurface* src, |
| 194 const SkIRect& srcRect, | 193 const SkIRect& srcRect, |
| 195 const SkIPoint& dstPoint); | 194 const SkIPoint& dstPoint); |
| 196 /** | 195 /** |
| 197 * Function that determines whether a copySurface call would succeed without
actually | |
| 198 * performing the copy. | |
| 199 */ | |
| 200 bool canCopySurface(const GrSurface* dst, | |
| 201 const GrSurface* src, | |
| 202 const SkIRect& srcRect, | |
| 203 const SkIPoint& dstPoint); | |
| 204 | |
| 205 /** | |
| 206 * Release any resources that are cached but not currently in use. This | 196 * Release any resources that are cached but not currently in use. This |
| 207 * is intended to give an application some recourse when resources are low. | 197 * is intended to give an application some recourse when resources are low. |
| 208 */ | 198 */ |
| 209 virtual void purgeResources() {}; | 199 virtual void purgeResources() {}; |
| 210 | 200 |
| 211 bool programUnitTest(GrContext* owner, int maxStages); | 201 bool programUnitTest(GrContext* owner, int maxStages); |
| 212 | 202 |
| 213 protected: | 203 protected: |
| 214 friend class GrCommandBuilder; // for PipelineInfo | 204 friend class GrCommandBuilder; // for PipelineInfo |
| 215 friend class GrInOrderCommandBuilder; // for PipelineInfo | 205 friend class GrInOrderCommandBuilder; // for PipelineInfo |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 virtual bool setupClip(GrPipelineBuilder*, | 342 virtual bool setupClip(GrPipelineBuilder*, |
| 353 GrPipelineBuilder::AutoRestoreFragmentProcessors*, | 343 GrPipelineBuilder::AutoRestoreFragmentProcessors*, |
| 354 GrPipelineBuilder::AutoRestoreStencil*, | 344 GrPipelineBuilder::AutoRestoreStencil*, |
| 355 GrScissorState* scissorState, | 345 GrScissorState* scissorState, |
| 356 const SkRect* devBounds) override; | 346 const SkRect* devBounds) override; |
| 357 | 347 |
| 358 typedef GrDrawTarget INHERITED; | 348 typedef GrDrawTarget INHERITED; |
| 359 }; | 349 }; |
| 360 | 350 |
| 361 #endif | 351 #endif |
| OLD | NEW |