Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(250)

Side by Side Diff: src/gpu/batches/GrDrawBatch.h

Issue 1904723003: Revert of Use transfer buffer for BatchAtlas texture copies (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/GrResourceProvider.cpp ('k') | src/gpu/gl/GrGLBuffer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 GrDrawBatch_DEFINED 8 #ifndef GrDrawBatch_DEFINED
9 #define GrDrawBatch_DEFINED 9 #define GrDrawBatch_DEFINED
10 10
(...skipping 28 matching lines...) Expand all
39 explicit GrBatchDrawToken(uint64_t sequenceNumber) : fSequenceNumber(sequenc eNumber) {} 39 explicit GrBatchDrawToken(uint64_t sequenceNumber) : fSequenceNumber(sequenc eNumber) {}
40 friend class GrBatchFlushState; 40 friend class GrBatchFlushState;
41 uint64_t fSequenceNumber; 41 uint64_t fSequenceNumber;
42 }; 42 };
43 43
44 /** 44 /**
45 * Base class for GrBatches that draw. These batches have a GrPipeline installed by GrDrawTarget. 45 * Base class for GrBatches that draw. These batches have a GrPipeline installed by GrDrawTarget.
46 */ 46 */
47 class GrDrawBatch : public GrBatch { 47 class GrDrawBatch : public GrBatch {
48 public: 48 public:
49 /** Method that performs a texture write on behalf of a DeferredUploadFn. */ 49 /** Method that performs an upload on behalf of a DeferredUploadFn. */
50 using WritePixelsFn = std::function<bool(GrSurface* texture, 50 using WritePixelsFn = std::function<bool(GrSurface* texture,
51 int left, int top, int width, int h eight, 51 int left, int top, int width, int h eight,
52 GrPixelConfig config, const void* b uffer, 52 GrPixelConfig config, const void* b uffer,
53 size_t rowBytes)>; 53 size_t rowBytes)>;
54 using TransferPixelsFn = std::function<bool(GrTexture* texture,
55 int left, int top, int width, in t height,
56 GrPixelConfig config, GrBuffer* buffer,
57 size_t offset, size_t rowBytes)> ;
58 /** See comments before GrDrawBatch::Target definition on how deferred uploa ders work. */ 54 /** See comments before GrDrawBatch::Target definition on how deferred uploa ders work. */
59 using DeferredUploadFn = std::function<void(WritePixelsFn&, TransferPixelsFn &)>; 55 using DeferredUploadFn = std::function<void(WritePixelsFn&)>;
60 56
61 class Target; 57 class Target;
62 58
63 GrDrawBatch(uint32_t classID); 59 GrDrawBatch(uint32_t classID);
64 ~GrDrawBatch() override; 60 ~GrDrawBatch() override;
65 61
66 /** 62 /**
67 * Fills in a structure informing the XP of overrides to its normal behavior . 63 * Fills in a structure informing the XP of overrides to its normal behavior .
68 */ 64 */
69 void getPipelineOptimizations(GrPipelineOptimizations* override) const; 65 void getPipelineOptimizations(GrPipelineOptimizations* override) const;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 }; 125 };
130 SkTArray<QueuedUpload> fInlineUploads; 126 SkTArray<QueuedUpload> fInlineUploads;
131 127
132 private: 128 private:
133 SkAlignedSTStorage<1, GrPipeline> fPipelineStorage; 129 SkAlignedSTStorage<1, GrPipeline> fPipelineStorage;
134 bool fPipelineInstalled; 130 bool fPipelineInstalled;
135 typedef GrBatch INHERITED; 131 typedef GrBatch INHERITED;
136 }; 132 };
137 133
138 #endif 134 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrResourceProvider.cpp ('k') | src/gpu/gl/GrGLBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698