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

Side by Side Diff: tools/skiaserve/urlhandlers/UrlHandler.h

Issue 1781653002: Fix up picture clip bounds in SkiaServe (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 4 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 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 #include "SkColor.h" 8 #include "SkColor.h"
9 9
10 struct MHD_Connection; 10 struct MHD_Connection;
(...skipping 23 matching lines...) Expand all
34 const char* url, const char* method, 34 const char* url, const char* method,
35 const char* upload_data, size_t* upload_data_size) override; 35 const char* upload_data, size_t* upload_data_size) override;
36 }; 36 };
37 37
38 class BreakHandler : public UrlHandler { 38 class BreakHandler : public UrlHandler {
39 public: 39 public:
40 bool canHandle(const char* method, const char* url) override; 40 bool canHandle(const char* method, const char* url) override;
41 int handle(Request* request, MHD_Connection* connection, 41 int handle(Request* request, MHD_Connection* connection,
42 const char* url, const char* method, 42 const char* url, const char* method,
43 const char* upload_data, size_t* upload_data_size) override; 43 const char* upload_data, size_t* upload_data_size) override;
44 private:
45 static SkColor GetPixel(Request* request, int x, int y);
46 }; 44 };
47 45
48 /** 46 /**
49 Updates the clip visualization alpha. On all subsequent /img requests, the cl ip will be drawn in 47 Updates the clip visualization alpha. On all subsequent /img requests, the cl ip will be drawn in
50 black with the specified alpha. 0 = no visible clip, 255 = fully opaque clip. 48 black with the specified alpha. 0 = no visible clip, 255 = fully opaque clip.
51 */ 49 */
52 class ClipAlphaHandler : public UrlHandler { 50 class ClipAlphaHandler : public UrlHandler {
53 public: 51 public:
54 bool canHandle(const char* method, const char* url) override; 52 bool canHandle(const char* method, const char* url) override;
55 int handle(Request* request, MHD_Connection* connection, 53 int handle(Request* request, MHD_Connection* connection,
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 }; 122 };
125 123
126 class RootHandler : public UrlHandler { 124 class RootHandler : public UrlHandler {
127 public: 125 public:
128 bool canHandle(const char* method, const char* url) override; 126 bool canHandle(const char* method, const char* url) override;
129 int handle(Request* request, MHD_Connection* connection, 127 int handle(Request* request, MHD_Connection* connection,
130 const char* url, const char* method, 128 const char* url, const char* method,
131 const char* upload_data, size_t* upload_data_size) override; 129 const char* upload_data, size_t* upload_data_size) override;
132 }; 130 };
133 131
OLDNEW
« tools/skiaserve/Request.cpp ('K') | « tools/skiaserve/urlhandlers/DownloadHandler.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698