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

Side by Side Diff: gm/dcshader.cpp

Issue 1911963008: DNC - JSON of flattenables, with field names. Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add names to call sites Created 4 years, 8 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 2014 Google Inc. 2 * Copyright 2014 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 "gm.h" 8 #include "gm.h"
9 #if SK_SUPPORT_GPU 9 #if SK_SUPPORT_GPU
10 #include "GrFragmentProcessor.h" 10 #include "GrFragmentProcessor.h"
(...skipping 14 matching lines...) Expand all
25 25
26 /////////////////////////////////////////////////////////////////////////////// 26 ///////////////////////////////////////////////////////////////////////////////
27 27
28 class DCShader : public SkShader { 28 class DCShader : public SkShader {
29 public: 29 public:
30 DCShader(const SkMatrix& matrix) : fDeviceMatrix(matrix) {} 30 DCShader(const SkMatrix& matrix) : fDeviceMatrix(matrix) {}
31 31
32 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(DCShader); 32 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(DCShader);
33 33
34 void flatten(SkWriteBuffer& buf) const override { 34 void flatten(SkWriteBuffer& buf) const override {
35 buf.writeMatrix(fDeviceMatrix); 35 buf.writeMatrix("fDeviceMatrix", fDeviceMatrix);
36 } 36 }
37 37
38 const GrFragmentProcessor* asFragmentProcessor(GrContext*, 38 const GrFragmentProcessor* asFragmentProcessor(GrContext*,
39 const SkMatrix& viewM, 39 const SkMatrix& viewM,
40 const SkMatrix* localMatrix, 40 const SkMatrix* localMatrix,
41 SkFilterQuality) const overri de; 41 SkFilterQuality) const overri de;
42 42
43 #ifndef SK_IGNORE_TO_STRING 43 #ifndef SK_IGNORE_TO_STRING
44 void toString(SkString* str) const override { 44 void toString(SkString* str) const override {
45 str->appendf("DCShader: ()"); 45 str->appendf("DCShader: ()");
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 }; 290 };
291 291
292 SkTArray<Prim*> fPrims; 292 SkTArray<Prim*> fPrims;
293 293
294 typedef GM INHERITED; 294 typedef GM INHERITED;
295 }; 295 };
296 296
297 DEF_GM(return new DCShaderGM;) 297 DEF_GM(return new DCShaderGM;)
298 } 298 }
299 #endif 299 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698