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

Unified Diff: src/pipe/SkGPipeRead.cpp

Issue 134163010: Refactor read and write buffers. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: whoops, read buffers have .size() Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/opts/SkXfermode_opts_arm_neon.cpp ('k') | src/pipe/SkGPipeWrite.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pipe/SkGPipeRead.cpp
diff --git a/src/pipe/SkGPipeRead.cpp b/src/pipe/SkGPipeRead.cpp
index fc5ab5a2aad0c15a5328c5b4e45621facd6e001a..513a34d6394c6c1eded70d64b999a4b4f5a7c294 100644
--- a/src/pipe/SkGPipeRead.cpp
+++ b/src/pipe/SkGPipeRead.cpp
@@ -20,7 +20,7 @@
#include "SkDrawLooper.h"
#include "SkImageFilter.h"
#include "SkMaskFilter.h"
-#include "SkOrderedReadBuffer.h"
+#include "SkReadBuffer.h"
#include "SkPathEffect.h"
#include "SkRasterizer.h"
#include "SkRRect.h"
@@ -105,7 +105,7 @@ public:
return fFlags;
}
- void setReader(SkOrderedReadBuffer* reader) {
+ void setReader(SkReadBuffer* reader) {
fReader = reader;
this->updateReader();
}
@@ -156,7 +156,7 @@ public:
}
/**
- * Override of SkBitmapHeapReader, so that SkOrderedReadBuffer can use
+ * Override of SkBitmapHeapReader, so that SkReadBuffer can use
* these SkBitmaps for bitmap shaders. Used only in cross process mode
* without a shared heap.
*/
@@ -203,7 +203,7 @@ private:
}
bool crossProcess = SkToBool(fFlags & SkGPipeWriter::kCrossProcess_Flag);
fReader->setFlags(SkSetClearMask(fReader->getFlags(), crossProcess,
- SkFlattenableReadBuffer::kCrossProcess_Flag));
+ SkReadBuffer::kCrossProcess_Flag));
if (crossProcess) {
fReader->setFactoryArray(&fFactoryArray);
} else {
@@ -216,7 +216,7 @@ private:
fReader->setBitmapStorage(fSharedHeap);
}
}
- SkOrderedReadBuffer* fReader;
+ SkReadBuffer* fReader;
SkPaint fPaint;
SkTDArray<SkFlattenable*> fFlatArray;
SkTDArray<SkTypeface*> fTypefaces;
@@ -696,7 +696,7 @@ static void annotation_rp(SkCanvas*, SkReader32* reader, uint32_t op32,
const size_t size = DrawOp_unpackData(op32);
if (size > 0) {
- SkOrderedReadBuffer buffer(reader->skip(size), size);
+ SkReadBuffer buffer(reader->skip(size), size);
p->setAnnotation(SkNEW_ARGS(SkAnnotation, (buffer)))->unref();
SkASSERT(buffer.offset() == size);
} else {
@@ -857,7 +857,7 @@ SkGPipeReader::Status SkGPipeReader::playback(const void* data, size_t length,
SkASSERT(SK_ARRAY_COUNT(gReadTable) == (kDone_DrawOp + 1));
const ReadProc* table = gReadTable;
- SkOrderedReadBuffer reader(data, length);
+ SkReadBuffer reader(data, length);
reader.setBitmapDecoder(fProc);
SkCanvas* canvas = fCanvas;
Status status = kEOF_Status;
« no previous file with comments | « src/opts/SkXfermode_opts_arm_neon.cpp ('k') | src/pipe/SkGPipeWrite.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698