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

Side by Side Diff: src/effects/SkRRectsGaussianEdgeShader.cpp

Issue 2347853002: Add staging for removal of SkRRectsGaussianEdgeShader::Make (for Android) (Closed)
Patch Set: Created 4 years, 3 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 | « include/effects/SkRRectsGaussianEdgeShader.h ('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 "SkRRectsGaussianEdgeShader.h" 8 #include "SkRRectsGaussianEdgeShader.h"
9 #include "SkReadBuffer.h" 9 #include "SkReadBuffer.h"
10 #include "SkWriteBuffer.h" 10 #include "SkWriteBuffer.h"
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 402
403 SkShader::Context* SkRRectsGaussianEdgeShaderImpl::onCreateContext(const Context Rec& rec, 403 SkShader::Context* SkRRectsGaussianEdgeShaderImpl::onCreateContext(const Context Rec& rec,
404 void* storage ) const { 404 void* storage ) const {
405 return new (storage) GaussianEdgeShaderContext(*this, rec); 405 return new (storage) GaussianEdgeShaderContext(*this, rec);
406 } 406 }
407 407
408 /////////////////////////////////////////////////////////////////////////////// 408 ///////////////////////////////////////////////////////////////////////////////
409 409
410 sk_sp<SkShader> SkRRectsGaussianEdgeShader::Make(const SkRRect& first, 410 sk_sp<SkShader> SkRRectsGaussianEdgeShader::Make(const SkRRect& first,
411 const SkRRect& second, 411 const SkRRect& second,
412 SkScalar radius) { 412 SkScalar radius, SkScalar unuse d) {
413 if ((!first.isRect() && !first.isCircle() && !first.isSimpleCircular()) || 413 if ((!first.isRect() && !first.isCircle() && !first.isSimpleCircular()) ||
414 (!second.isRect() && !second.isCircle() && !second.isSimpleCircular())) { 414 (!second.isRect() && !second.isCircle() && !second.isSimpleCircular())) {
415 // we only deal with the shapes where the x & y radii are equal 415 // we only deal with the shapes where the x & y radii are equal
416 // and the same for all four corners 416 // and the same for all four corners
417 return nullptr; 417 return nullptr;
418 } 418 }
419 419
420 return sk_make_sp<SkRRectsGaussianEdgeShaderImpl>(first, second, radius); 420 return sk_make_sp<SkRRectsGaussianEdgeShaderImpl>(first, second, radius);
421 } 421 }
422 422
423 /////////////////////////////////////////////////////////////////////////////// 423 ///////////////////////////////////////////////////////////////////////////////
424 424
425 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkRRectsGaussianEdgeShader) 425 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkRRectsGaussianEdgeShader)
426 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkRRectsGaussianEdgeShaderImpl) 426 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkRRectsGaussianEdgeShaderImpl)
427 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 427 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
428 428
429 /////////////////////////////////////////////////////////////////////////////// 429 ///////////////////////////////////////////////////////////////////////////////
OLDNEW
« no previous file with comments | « include/effects/SkRRectsGaussianEdgeShader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698