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