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

Side by Side Diff: tools/json/SkJSONCanvas.cpp

Issue 1690683002: added some missing static modifiers (Closed) Base URL: https://skia.googlesource.com/skia.git@master
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 unified diff | Download patch
« no previous file with comments | « tools/debugger/SkDrawCommand.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "SkJSONCanvas.h" 8 #include "SkJSONCanvas.h"
9 #include "SkColorFilter.h" 9 #include "SkColorFilter.h"
10 #include "SkImageFilter.h" 10 #include "SkImageFilter.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 } 136 }
137 } 137 }
138 result[SKJSONCANVAS_ATTRIBUTE_VERBS] = verbs; 138 result[SKJSONCANVAS_ATTRIBUTE_VERBS] = verbs;
139 return result; 139 return result;
140 } 140 }
141 141
142 Json::Value SkJSONCanvas::makeRegion(const SkRegion& region) { 142 Json::Value SkJSONCanvas::makeRegion(const SkRegion& region) {
143 return Json::Value("<unimplemented>"); 143 return Json::Value("<unimplemented>");
144 } 144 }
145 145
146 void store_scalar(Json::Value* target, const char* key, SkScalar value, SkScalar defaultValue) { 146 static void store_scalar(Json::Value* target, const char* key, SkScalar value,
147 SkScalar defaultValue) {
147 if (value != defaultValue) { 148 if (value != defaultValue) {
148 (*target)[key] = Json::Value(value); 149 (*target)[key] = Json::Value(value);
149 } 150 }
150 } 151 }
151 152
152 void store_bool(Json::Value* target, const char* key, bool value, bool defaultVa lue) { 153 static void store_bool(Json::Value* target, const char* key, bool value, bool de faultValue) {
153 if (value != defaultValue) { 154 if (value != defaultValue) {
154 (*target)[key] = Json::Value(value); 155 (*target)[key] = Json::Value(value);
155 } 156 }
156 } 157 }
157 158
158 static void encode_data(const void* data, size_t count, Json::Value* target) { 159 static void encode_data(const void* data, size_t count, Json::Value* target) {
159 // just use a brain-dead JSON array for now, switch to base64 or something e lse smarter down the 160 // just use a brain-dead JSON array for now, switch to base64 or something e lse smarter down the
160 // road 161 // road
161 for (size_t i = 0; i < count; i++) { 162 for (size_t i = 0; i < count; i++) {
162 target->append(((const uint8_t*)data)[i]); 163 target->append(((const uint8_t*)data)[i]);
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 Json::Value backdrop; 909 Json::Value backdrop;
909 flatten(rec.fBackdrop, &backdrop, fSendBinaries); 910 flatten(rec.fBackdrop, &backdrop, fSendBinaries);
910 command[SKJSONCANVAS_ATTRIBUTE_BACKDROP] = backdrop; 911 command[SKJSONCANVAS_ATTRIBUTE_BACKDROP] = backdrop;
911 } 912 }
912 if (rec.fSaveLayerFlags != 0) { 913 if (rec.fSaveLayerFlags != 0) {
913 SkDebugf("unsupported: saveLayer flags\n"); 914 SkDebugf("unsupported: saveLayer flags\n");
914 } 915 }
915 fCommands.append(command); 916 fCommands.append(command);
916 return this->INHERITED::getSaveLayerStrategy(rec); 917 return this->INHERITED::getSaveLayerStrategy(rec);
917 } 918 }
OLDNEW
« no previous file with comments | « tools/debugger/SkDrawCommand.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698