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

Side by Side Diff: tools/debugger/SkDrawCommand.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 | « no previous file | tools/json/SkJSONCanvas.cpp » ('j') | 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 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkDrawCommand.h" 10 #include "SkDrawCommand.h"
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 case SkCanvas::kLines_PointMode: 560 case SkCanvas::kLines_PointMode:
561 return Json::Value(SKDEBUGCANVAS_POINTMODE_LINES); 561 return Json::Value(SKDEBUGCANVAS_POINTMODE_LINES);
562 case SkCanvas::kPolygon_PointMode: 562 case SkCanvas::kPolygon_PointMode:
563 return Json::Value(SKDEBUGCANVAS_POINTMODE_POLYGON); 563 return Json::Value(SKDEBUGCANVAS_POINTMODE_POLYGON);
564 default: 564 default:
565 SkASSERT(false); 565 SkASSERT(false);
566 return Json::Value("<invalid point mode>"); 566 return Json::Value("<invalid point mode>");
567 }; 567 };
568 } 568 }
569 569
570 void store_scalar(Json::Value* target, const char* key, SkScalar value, SkScalar defaultValue) { 570 static void store_scalar(Json::Value* target, const char* key, SkScalar value,
571 SkScalar defaultValue) {
571 if (value != defaultValue) { 572 if (value != defaultValue) {
572 (*target)[key] = Json::Value(value); 573 (*target)[key] = Json::Value(value);
573 } 574 }
574 } 575 }
575 576
576 void store_bool(Json::Value* target, const char* key, bool value, bool defaultVa lue) { 577 static void store_bool(Json::Value* target, const char* key, bool value, bool de faultValue) {
577 if (value != defaultValue) { 578 if (value != defaultValue) {
578 (*target)[key] = Json::Value(value); 579 (*target)[key] = Json::Value(value);
579 } 580 }
580 } 581 }
581 582
582 static void encode_data(const void* data, size_t count, Json::Value* target) { 583 static void encode_data(const void* data, size_t count, Json::Value* target) {
583 // just use a brain-dead JSON array for now, switch to base64 or something e lse smarter down the 584 // just use a brain-dead JSON array for now, switch to base64 or something e lse smarter down the
584 // road 585 // road
585 for (size_t i = 0; i < count; i++) { 586 for (size_t i = 0; i < count; i++) {
586 target->append(((const uint8_t*)data)[i]); 587 target->append(((const uint8_t*)data)[i]);
(...skipping 2232 matching lines...) Expand 10 before | Expand all | Expand 10 after
2819 Json::Value result = INHERITED::toJSON(); 2820 Json::Value result = INHERITED::toJSON();
2820 result[SKDEBUGCANVAS_ATTRIBUTE_MATRIX] = make_json_matrix(fMatrix); 2821 result[SKDEBUGCANVAS_ATTRIBUTE_MATRIX] = make_json_matrix(fMatrix);
2821 return result; 2822 return result;
2822 } 2823 }
2823 2824
2824 SkSetMatrixCommand* SkSetMatrixCommand::fromJSON(Json::Value& command) { 2825 SkSetMatrixCommand* SkSetMatrixCommand::fromJSON(Json::Value& command) {
2825 SkMatrix matrix; 2826 SkMatrix matrix;
2826 extract_json_matrix(command[SKDEBUGCANVAS_ATTRIBUTE_MATRIX], &matrix); 2827 extract_json_matrix(command[SKDEBUGCANVAS_ATTRIBUTE_MATRIX], &matrix);
2827 return new SkSetMatrixCommand(matrix); 2828 return new SkSetMatrixCommand(matrix);
2828 } 2829 }
OLDNEW
« no previous file with comments | « no previous file | tools/json/SkJSONCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698