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

Side by Side Diff: src/core/SkDraw.cpp

Issue 197763008: Allow toString capability to be toggled independent of developer mode (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: remove gyp changes Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/core/SkComposeShader.cpp ('k') | src/core/SkFilterShader.h » ('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 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 "SkDraw.h" 8 #include "SkDraw.h"
9 #include "SkBlitter.h" 9 #include "SkBlitter.h"
10 #include "SkBounder.h" 10 #include "SkBounder.h"
(...skipping 2345 matching lines...) Expand 10 before | Expand all | Expand 10 after
2356 } 2356 }
2357 2357
2358 class SkTriColorShader : public SkShader { 2358 class SkTriColorShader : public SkShader {
2359 public: 2359 public:
2360 SkTriColorShader() {} 2360 SkTriColorShader() {}
2361 2361
2362 bool setup(const SkPoint pts[], const SkColor colors[], int, int, int); 2362 bool setup(const SkPoint pts[], const SkColor colors[], int, int, int);
2363 2363
2364 virtual void shadeSpan(int x, int y, SkPMColor dstC[], int count) SK_OVERRID E; 2364 virtual void shadeSpan(int x, int y, SkPMColor dstC[], int count) SK_OVERRID E;
2365 2365
2366 SK_DEVELOPER_TO_STRING() 2366 SK_TO_STRING_OVERRIDE()
2367 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkTriColorShader) 2367 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkTriColorShader)
2368 2368
2369 protected: 2369 protected:
2370 SkTriColorShader(SkReadBuffer& buffer) : SkShader(buffer) {} 2370 SkTriColorShader(SkReadBuffer& buffer) : SkShader(buffer) {}
2371 2371
2372 private: 2372 private:
2373 SkMatrix fDstToUnit; 2373 SkMatrix fDstToUnit;
2374 SkPMColor fColors[3]; 2374 SkPMColor fColors[3];
2375 2375
2376 typedef SkShader INHERITED; 2376 typedef SkShader INHERITED;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
2429 } 2429 }
2430 scale0 = 0; 2430 scale0 = 0;
2431 } 2431 }
2432 2432
2433 dstC[i] = SkAlphaMulQ(fColors[0], scale0) + 2433 dstC[i] = SkAlphaMulQ(fColors[0], scale0) +
2434 SkAlphaMulQ(fColors[1], scale1) + 2434 SkAlphaMulQ(fColors[1], scale1) +
2435 SkAlphaMulQ(fColors[2], scale2); 2435 SkAlphaMulQ(fColors[2], scale2);
2436 } 2436 }
2437 } 2437 }
2438 2438
2439 #ifdef SK_DEVELOPER 2439 #ifndef SK_IGNORE_TO_STRING
2440 void SkTriColorShader::toString(SkString* str) const { 2440 void SkTriColorShader::toString(SkString* str) const {
2441 str->append("SkTriColorShader: ("); 2441 str->append("SkTriColorShader: (");
2442 2442
2443 this->INHERITED::toString(str); 2443 this->INHERITED::toString(str);
2444 2444
2445 str->append(")"); 2445 str->append(")");
2446 } 2446 }
2447 #endif 2447 #endif
2448 2448
2449 void SkDraw::drawVertices(SkCanvas::VertexMode vmode, int count, 2449 void SkDraw::drawVertices(SkCanvas::VertexMode vmode, int count,
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
2805 mask->fImage = SkMask::AllocImage(size); 2805 mask->fImage = SkMask::AllocImage(size);
2806 memset(mask->fImage, 0, mask->computeImageSize()); 2806 memset(mask->fImage, 0, mask->computeImageSize());
2807 } 2807 }
2808 2808
2809 if (SkMask::kJustComputeBounds_CreateMode != mode) { 2809 if (SkMask::kJustComputeBounds_CreateMode != mode) {
2810 draw_into_mask(*mask, devPath, style); 2810 draw_into_mask(*mask, devPath, style);
2811 } 2811 }
2812 2812
2813 return true; 2813 return true;
2814 } 2814 }
OLDNEW
« no previous file with comments | « src/core/SkComposeShader.cpp ('k') | src/core/SkFilterShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698