| 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 GrContext_DEFINED | 8 #ifndef GrContext_DEFINED |
| 9 #define GrContext_DEFINED | 9 #define GrContext_DEFINED |
| 10 | 10 |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 * @return true if the write succeeded, false if not. The write can fail bec
ause of an | 288 * @return true if the write succeeded, false if not. The write can fail bec
ause of an |
| 289 * unsupported combination of surface and src configs. | 289 * unsupported combination of surface and src configs. |
| 290 */ | 290 */ |
| 291 bool writeSurfacePixels(GrSurface* surface, | 291 bool writeSurfacePixels(GrSurface* surface, |
| 292 int left, int top, int width, int height, | 292 int left, int top, int width, int height, |
| 293 GrPixelConfig config, const void* buffer, | 293 GrPixelConfig config, const void* buffer, |
| 294 size_t rowBytes, | 294 size_t rowBytes, |
| 295 uint32_t pixelOpsFlags = 0); | 295 uint32_t pixelOpsFlags = 0); |
| 296 | 296 |
| 297 /** | 297 /** |
| 298 * Copies contents of src to dst, while applying a gamma curve. Fails if the
two surfaces | |
| 299 * are not identically sized. | |
| 300 * @param dst the surface to copy to. | |
| 301 * @param src the texture to copy from. | |
| 302 * @param gamma the gamma value to apply. | |
| 303 */ | |
| 304 bool applyGamma(GrRenderTarget* dst, GrTexture* src, SkScalar gamma); | |
| 305 | |
| 306 /** | |
| 307 * Copies a rectangle of texels from src to dst. | 298 * Copies a rectangle of texels from src to dst. |
| 308 * @param dst the surface to copy to. | 299 * @param dst the surface to copy to. |
| 309 * @param src the surface to copy from. | 300 * @param src the surface to copy from. |
| 310 * @param srcRect the rectangle of the src that should be copied. | 301 * @param srcRect the rectangle of the src that should be copied. |
| 311 * @param dstPoint the translation applied when writing the srcRect's p
ixels to the dst. | 302 * @param dstPoint the translation applied when writing the srcRect's p
ixels to the dst. |
| 312 */ | 303 */ |
| 313 bool copySurface(GrSurface* dst, | 304 bool copySurface(GrSurface* dst, |
| 314 GrSurface* src, | 305 GrSurface* src, |
| 315 const SkIRect& srcRect, | 306 const SkIRect& srcRect, |
| 316 const SkIPoint& dstPoint); | 307 const SkIPoint& dstPoint); |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 SkAutoTUnref<const GrCaps> fCaps; | 487 SkAutoTUnref<const GrCaps> fCaps; |
| 497 uint32_t fContextUniqueID; | 488 uint32_t fContextUniqueID; |
| 498 | 489 |
| 499 friend class GrContext; | 490 friend class GrContext; |
| 500 friend class SkImage; | 491 friend class SkImage; |
| 501 | 492 |
| 502 typedef SkRefCnt INHERITED; | 493 typedef SkRefCnt INHERITED; |
| 503 }; | 494 }; |
| 504 | 495 |
| 505 #endif | 496 #endif |
| OLD | NEW |