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

Unified Diff: src/pipe/utils/SamplePipeControllers.h

Issue 267863002: 4x allocation in PipeController is probably overkill. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: keep test Created 6 years, 7 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/pipe/SkGPipeWrite.cpp ('k') | src/pipe/utils/SamplePipeControllers.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pipe/utils/SamplePipeControllers.h
diff --git a/src/pipe/utils/SamplePipeControllers.h b/src/pipe/utils/SamplePipeControllers.h
index 35cfba73b65ebcb89ea20be24cf0b536e177df5d..e8cc23bb3adeef86b7a3befab2a781f717222a8a 100644
--- a/src/pipe/utils/SamplePipeControllers.h
+++ b/src/pipe/utils/SamplePipeControllers.h
@@ -17,14 +17,14 @@ class SkMatrix;
class PipeController : public SkGPipeController {
public:
PipeController(SkCanvas* target, SkPicture::InstallPixelRefProc proc = NULL);
- virtual ~PipeController();
+
virtual void* requestBlock(size_t minRequest, size_t* actual) SK_OVERRIDE;
virtual void notifyWritten(size_t bytes) SK_OVERRIDE;
protected:
- const void* getData() { return (const char*) fBlock + fBytesWritten; }
+ const void* getData() { return (const char*) fBlock.get() + fBytesWritten; }
SkGPipeReader fReader;
private:
- void* fBlock;
+ SkAutoMalloc fBlock;
size_t fBlockSize;
size_t fBytesWritten;
SkGPipeReader::Status fStatus;
« no previous file with comments | « src/pipe/SkGPipeWrite.cpp ('k') | src/pipe/utils/SamplePipeControllers.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698