| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 GrBatchBuffer_DEFINED | 8 #ifndef GrBatchBuffer_DEFINED |
| 9 #define GrBatchBuffer_DEFINED | 9 #define GrBatchBuffer_DEFINED |
| 10 | 10 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 * @param height height of rectangle to write in pixels. | 44 * @param height height of rectangle to write in pixels. |
| 45 * @param config the pixel config of the source buffer | 45 * @param config the pixel config of the source buffer |
| 46 * @param buffer memory to read pixels from | 46 * @param buffer memory to read pixels from |
| 47 * @param rowBytes number of bytes between consecutive rows. Zero | 47 * @param rowBytes number of bytes between consecutive rows. Zero |
| 48 * means rows are tightly packed. | 48 * means rows are tightly packed. |
| 49 */ | 49 */ |
| 50 bool writeTexturePixels(GrTexture* texture, | 50 bool writeTexturePixels(GrTexture* texture, |
| 51 int left, int top, int width, int height, | 51 int left, int top, int width, int height, |
| 52 GrPixelConfig config, const void* buffer, | 52 GrPixelConfig config, const void* buffer, |
| 53 size_t rowBytes) { | 53 size_t rowBytes) { |
| 54 return fGpu->writeTexturePixels(texture, left, top, width, height, c
onfig, buffer, | 54 return fGpu->writePixels(texture, left, top, width, height, config,
buffer, rowBytes); |
| 55 rowBytes); | |
| 56 } | 55 } |
| 57 | 56 |
| 58 private: | 57 private: |
| 59 GrGpu* fGpu; | 58 GrGpu* fGpu; |
| 60 }; | 59 }; |
| 61 | 60 |
| 62 class Uploader : public SkRefCnt { | 61 class Uploader : public SkRefCnt { |
| 63 public: | 62 public: |
| 64 Uploader(BatchToken lastUploadToken) : fLastUploadToken(lastUploadToken)
{} | 63 Uploader(BatchToken lastUploadToken) : fLastUploadToken(lastUploadToken)
{} |
| 65 BatchToken lastUploadToken() const { return fLastUploadToken; } | 64 BatchToken lastUploadToken() const { return fLastUploadToken; } |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 FlushBuffer::Iter fIter; | 159 FlushBuffer::Iter fIter; |
| 161 int fNumberOfDraws; | 160 int fNumberOfDraws; |
| 162 BatchToken fCurrentToken; | 161 BatchToken fCurrentToken; |
| 163 BatchToken fLastFlushedToken; // The next token to be flushed | 162 BatchToken fLastFlushedToken; // The next token to be flushed |
| 164 SkTArray<SkAutoTUnref<Uploader>, true> fAsapUploads; | 163 SkTArray<SkAutoTUnref<Uploader>, true> fAsapUploads; |
| 165 SkTArray<SkAutoTUnref<Uploader>, true> fInlineUploads; | 164 SkTArray<SkAutoTUnref<Uploader>, true> fInlineUploads; |
| 166 int fInlineUpdatesIndex; | 165 int fInlineUpdatesIndex; |
| 167 }; | 166 }; |
| 168 | 167 |
| 169 #endif | 168 #endif |
| OLD | NEW |