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

Unified Diff: tools/skiaserve/Request.h

Issue 1741823002: Get SkiaServe Request started off with a little privacy (Closed) Base URL: https://skia.googlesource.com/skia@skiaserve-7-wireup
Patch Set: Created 4 years, 10 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 | « no previous file | tools/skiaserve/Request.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/skiaserve/Request.h
diff --git a/tools/skiaserve/Request.h b/tools/skiaserve/Request.h
index f6ee994ecdab6045c2de0b228847bcb1f64bd9d0..568518644c62711e5f4f0f59651c0e2930653960 100644
--- a/tools/skiaserve/Request.h
+++ b/tools/skiaserve/Request.h
@@ -27,18 +27,14 @@ struct UploadContext {
};
struct Request {
- Request(SkString rootUrl)
- : fUploadContext(nullptr)
- , fUrlDataManager(rootUrl)
- , fGPUEnabled(false) {}
+ Request(SkString rootUrl);
- SkSurface* createCPUSurface();
- SkSurface* createGPUSurface();
SkData* drawToPng(int n);
void drawToCanvas(int n);
SkCanvas* getCanvas();
SkData* writeCanvasToPng(SkCanvas* canvas);
SkBitmap* getBitmapFromCanvas(SkCanvas* canvas);
+ bool enableGPU(bool enable);
bool hasPicture() const { return SkToBool(fPicture.get()); }
int getLastOp() const { return fDebugCanvas->getSize() - 1; }
@@ -48,6 +44,9 @@ struct Request {
// Returns a json list of batches as an SkData
SkData* getJsonBatchList(int n);
+ // Returns json with the viewMatrix and clipRect
+ SkData* getJsonInfo(int n);
+
// TODO probably want to make this configurable
static const int kImageWidth;
static const int kImageHeight;
@@ -55,9 +54,14 @@ struct Request {
UploadContext* fUploadContext;
SkAutoTUnref<SkPicture> fPicture;
SkAutoTUnref<SkDebugCanvas> fDebugCanvas;
+ UrlDataManager fUrlDataManager;
+
+private:
+ SkSurface* createCPUSurface();
+ SkSurface* createGPUSurface();
+
SkAutoTDelete<GrContextFactory> fContextFactory;
SkAutoTUnref<SkSurface> fSurface;
- UrlDataManager fUrlDataManager;
bool fGPUEnabled;
};
« no previous file with comments | « no previous file | tools/skiaserve/Request.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698