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

Side by Side Diff: third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.h

Issue 2472543002: remove legacy Skia flags (Closed)
Patch Set: Created 4 years, 1 month 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BaseRenderingContext2D_h 5 #ifndef BaseRenderingContext2D_h
6 #define BaseRenderingContext2D_h 6 #define BaseRenderingContext2D_h
7 7
8 #include "bindings/modules/v8/CSSImageValueOrHTMLImageElementOrHTMLVideoElementO rHTMLCanvasElementOrImageBitmapOrOffscreenCanvas.h" 8 #include "bindings/modules/v8/CSSImageValueOrHTMLImageElementOrHTMLVideoElementO rHTMLCanvasElementOrImageBitmapOrOffscreenCanvas.h"
9 #include "bindings/modules/v8/StringOrCanvasGradientOrCanvasPattern.h" 9 #include "bindings/modules/v8/StringOrCanvasGradientOrCanvasPattern.h"
10 #include "core/html/ImageData.h" 10 #include "core/html/ImageData.h"
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 } else { 448 } else {
449 ASSERT(isFullCanvasCompositeMode(state().globalComposite())); 449 ASSERT(isFullCanvasCompositeMode(state().globalComposite()));
450 c->saveLayer(nullptr, &compositePaint); 450 c->saveLayer(nullptr, &compositePaint);
451 shadowPaint.setBlendMode(SkBlendMode::kSrcOver); 451 shadowPaint.setBlendMode(SkBlendMode::kSrcOver);
452 c->setMatrix(ctm); 452 c->setMatrix(ctm);
453 drawFunc(c, &shadowPaint); 453 drawFunc(c, &shadowPaint);
454 } 454 }
455 c->restoreToCount(saveCount); 455 c->restoreToCount(saveCount);
456 } 456 }
457 457
458 compositePaint.setImageFilter(filter); 458 compositePaint.setImageFilter(sk_ref_sp(filter));
Stephen White 2016/11/01 21:11:48 Rather than doing an explicit ref here, I think we
459 c->saveLayer(nullptr, &compositePaint); 459 c->saveLayer(nullptr, &compositePaint);
460 SkPaint foregroundPaint = 460 SkPaint foregroundPaint =
461 *state().getPaint(paintType, DrawForegroundOnly, imageType); 461 *state().getPaint(paintType, DrawForegroundOnly, imageType);
462 foregroundPaint.setBlendMode(SkBlendMode::kSrcOver); 462 foregroundPaint.setBlendMode(SkBlendMode::kSrcOver);
463 c->setMatrix(ctm); 463 c->setMatrix(ctm);
464 drawFunc(c, &foregroundPaint); 464 drawFunc(c, &foregroundPaint);
465 c->restore(); 465 c->restore();
466 c->setMatrix(ctm); 466 c->setMatrix(ctm);
467 } 467 }
468 468
469 } // namespace blink 469 } // namespace blink
470 470
471 #endif // BaseRenderingContext2D_h 471 #endif // BaseRenderingContext2D_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698