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

Unified Diff: include/pipe/SkGPipe.h

Issue 14437012: Fixes for piping bitmaps with encoded data. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Do not use bitmap storage when adding bitmaps to SkGPipeState. Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/gmmain.cpp ('k') | samplecode/SampleApp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/pipe/SkGPipe.h
diff --git a/include/pipe/SkGPipe.h b/include/pipe/SkGPipe.h
index 27af16db8c134fdacd97fb03102eb33f5d868b1b..879ab043ff51845c3b9ff9e522567b934e77031b 100644
--- a/include/pipe/SkGPipe.h
+++ b/include/pipe/SkGPipe.h
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
@@ -11,8 +10,9 @@
#ifndef SkGPipe_DEFINED
#define SkGPipe_DEFINED
-#include "SkWriter32.h"
#include "SkFlattenable.h"
+#include "SkPicture.h"
+#include "SkWriter32.h"
class SkCanvas;
@@ -40,13 +40,20 @@ public:
};
void setCanvas(SkCanvas*);
+
+ /**
+ * Set a function for decoding bitmaps that have encoded data.
+ */
+ void setBitmapDecoder(SkPicture::InstallPixelRefProc proc) { fProc = proc; }
+
// data must be 4-byte aligned
// length must be a multiple of 4
Status playback(const void* data, size_t length, uint32_t playbackFlags = 0,
size_t* bytesRead = NULL);
private:
- SkCanvas* fCanvas;
- class SkGPipeState* fState;
+ SkCanvas* fCanvas;
+ class SkGPipeState* fState;
+ SkPicture::InstallPixelRefProc fProc;
};
///////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « gm/gmmain.cpp ('k') | samplecode/SampleApp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698