| Index: include/gpu/GrContext.h
|
| diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
|
| index b886560cbfb8d35ebdee62743b90a12b1a4ee693..a0b14fe1d040e8bfe1c4398df03e6c80825d9760 100644
|
| --- a/include/gpu/GrContext.h
|
| +++ b/include/gpu/GrContext.h
|
| @@ -16,7 +16,9 @@
|
| #include "GrTextureProvider.h"
|
| #include "SkMatrix.h"
|
| #include "../private/SkMutex.h"
|
| +#include "SkMipMapLevel.h"
|
| #include "SkPathEffect.h"
|
| +#include "SkTArray.h"
|
| #include "SkTypes.h"
|
|
|
| struct GrBatchAtlasConfig;
|
| @@ -258,15 +260,32 @@ public:
|
| * @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 buffer memory to read pixels from
|
| - * @param rowBytes number of bytes between consecutive rows. Zero
|
| - * means rows are tightly packed.
|
| + * @param texels array of mipmap levels containing texel data to load.
|
| + * Begins with full-sized palette data for paletted textures.
|
| + * For compressed formats it contains the compressed pixel data.
|
| + * Otherwise, it contains width*height texels. If the array is empty,
|
| + * texture data is uninitialized.
|
| * @param pixelOpsFlags see PixelOpsFlags 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 writeSurfacePixels(GrSurface* surface,
|
| int left, int top, int width, int height,
|
| + GrPixelConfig config, const SkTArray<SkMipMapLevel>& texels,
|
| + uint32_t pixelOpsFlags = 0);
|
| +
|
| + /**
|
| + * This function is a shim which creates a SkTArray<SkMipMapLevel> of size 1.
|
| + * It then calls writeSurfacePixels with that SkTArray.
|
| + *
|
| + * @param buffer Pointer to the pixel values (optional).
|
| + * @param rowBytes The number of bytes between rows of the texture. Zero
|
| + * implies tightly packed rows. For compressed pixel configs, this
|
| + * field is ignored.
|
| + */
|
| + bool writeSurfacePixels(GrSurface* surface,
|
| + int left, int top, int width, int height,
|
| GrPixelConfig config, const void* buffer,
|
| size_t rowBytes,
|
| uint32_t pixelOpsFlags = 0);
|
|
|