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

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

Issue 395603002: Simplify flattening to just write enough to call the factory (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 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 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 "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 1996 matching lines...) Expand 10 before | Expand all | Expand 10 after
2007 SkMatrix fDstToUnit; 2007 SkMatrix fDstToUnit;
2008 SkPMColor fColors[3]; 2008 SkPMColor fColors[3];
2009 2009
2010 typedef SkShader::Context INHERITED; 2010 typedef SkShader::Context INHERITED;
2011 }; 2011 };
2012 2012
2013 SK_TO_STRING_OVERRIDE() 2013 SK_TO_STRING_OVERRIDE()
2014 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkTriColorShader) 2014 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkTriColorShader)
2015 2015
2016 protected: 2016 protected:
2017 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
2017 SkTriColorShader(SkReadBuffer& buffer) : SkShader(buffer) {} 2018 SkTriColorShader(SkReadBuffer& buffer) : SkShader(buffer) {}
2019 #endif
2018 2020
2019 virtual Context* onCreateContext(const ContextRec& rec, void* storage) const SK_OVERRIDE { 2021 virtual Context* onCreateContext(const ContextRec& rec, void* storage) const SK_OVERRIDE {
2020 return SkNEW_PLACEMENT_ARGS(storage, TriColorShaderContext, (*this, rec) ); 2022 return SkNEW_PLACEMENT_ARGS(storage, TriColorShaderContext, (*this, rec) );
2021 } 2023 }
2022 2024
2023 private: 2025 private:
2024 typedef SkShader INHERITED; 2026 typedef SkShader INHERITED;
2025 }; 2027 };
2026 2028
2027 bool SkTriColorShader::TriColorShaderContext::setup(const SkPoint pts[], const S kColor colors[], 2029 bool SkTriColorShader::TriColorShaderContext::setup(const SkPoint pts[], const S kColor colors[],
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
2367 mask->fImage = SkMask::AllocImage(size); 2369 mask->fImage = SkMask::AllocImage(size);
2368 memset(mask->fImage, 0, mask->computeImageSize()); 2370 memset(mask->fImage, 0, mask->computeImageSize());
2369 } 2371 }
2370 2372
2371 if (SkMask::kJustComputeBounds_CreateMode != mode) { 2373 if (SkMask::kJustComputeBounds_CreateMode != mode) {
2372 draw_into_mask(*mask, devPath, style); 2374 draw_into_mask(*mask, devPath, style);
2373 } 2375 }
2374 2376
2375 return true; 2377 return true;
2376 } 2378 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698