| Index: include/gpu/GrContext.h
 | 
| diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
 | 
| index d59b2a28f0c7c98be5029f1cca0ab02f8183d8b9..6e6de38a850a494f247636f0fb264aa6f12d3321 100644
 | 
| --- a/include/gpu/GrContext.h
 | 
| +++ b/include/gpu/GrContext.h
 | 
| @@ -283,6 +283,39 @@ public:
 | 
|                              uint32_t pixelOpsFlags = 0);
 | 
|  
 | 
|      /**
 | 
| +    * These flags can be used with the color-space converting write pixels function below.
 | 
| +    */
 | 
| +    enum ColorSpaceOpsFlags {
 | 
| +        /** Gamma curve of the destination needs to be done manually. */
 | 
| +        kManualDstGamma_ColorSpaceOpsFlag = 0x1,
 | 
| +    };
 | 
| +
 | 
| +    /**
 | 
| +    * Writes a rectangle of pixels to a surface, performing color space conversion.
 | 
| +    * @param surface       the surface to write to.
 | 
| +    * @param left          left edge of the rectangle to write (inclusive)
 | 
| +    * @param top           top edge of the rectangle to write (inclusive)
 | 
| +    * @param width         width of rectangle to write in pixels.
 | 
| +    * @param height        height of rectangle to write in pixels.
 | 
| +    * @param config        the pixel config of the source buffer
 | 
| +    * @param srcColorSpace color space of the source buffer
 | 
| +    * @param dstColorSpace color space to conver to
 | 
| +    * @param buffer        memory to read pixels from
 | 
| +    * @param rowBytes      number of bytes between consecutive rows. Zero
 | 
| +    *                      means rows are tightly packed.
 | 
| +    * @param colorSpaceOpsFlags  see ColorSpaceOpsFlags enum above.
 | 
| +    * @return true if the write succeeded, false if not. The write can fail because of an
 | 
| +    *         unsupported combination of surface and src configs.
 | 
| +    */
 | 
| +    bool writeSurfacePixelsWithColorSpace(GrSurface* surface,
 | 
| +                                          int left, int top, int width, int height,
 | 
| +                                          GrPixelConfig srcConfig,
 | 
| +                                          const SkColorSpace* srcColorSpace,
 | 
| +                                          const SkColorSpace* dstColorSpace,
 | 
| +                                          const void* buffer, size_t rowBytes,
 | 
| +                                          uint32_t colorSpaceOpsFlags = 0);
 | 
| +
 | 
| +    /**
 | 
|       * Copies a rectangle of texels from src to dst.
 | 
|       * bounds.
 | 
|       * @param dst           the surface to copy to.
 | 
| 
 |