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

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

Issue 2771813003: Prepare ImageData for color managed BaseRenderingContext2D::create/put/get-ImageData (Closed)
Patch Set: Unit test added Created 3 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 // 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/CSSImageValueOrHTMLImageElementOrSVGImageElementOr HTMLVideoElementOrHTMLCanvasElementOrImageBitmapOrOffscreenCanvas.h" 8 #include "bindings/modules/v8/CSSImageValueOrHTMLImageElementOrSVGImageElementOr HTMLVideoElementOrHTMLCanvasElementOrImageBitmapOrOffscreenCanvas.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"
11 #include "core/html/canvas/CanvasRenderingContext.h"
11 #include "modules/ModulesExport.h" 12 #include "modules/ModulesExport.h"
12 #include "modules/canvas2d/CanvasGradient.h" 13 #include "modules/canvas2d/CanvasGradient.h"
13 #include "modules/canvas2d/CanvasPathMethods.h" 14 #include "modules/canvas2d/CanvasPathMethods.h"
14 #include "modules/canvas2d/CanvasRenderingContext2DState.h" 15 #include "modules/canvas2d/CanvasRenderingContext2DState.h"
15 #include "modules/canvas2d/CanvasStyle.h" 16 #include "modules/canvas2d/CanvasStyle.h"
16 #include "platform/graphics/ColorBehavior.h" 17 #include "platform/graphics/ColorBehavior.h"
17 #include "platform/graphics/ExpensiveCanvasHeuristicParameters.h" 18 #include "platform/graphics/ExpensiveCanvasHeuristicParameters.h"
18 #include "platform/graphics/paint/PaintCanvas.h" 19 #include "platform/graphics/paint/PaintCanvas.h"
19 #include "third_party/skia/include/effects/SkComposeImageFilter.h" 20 #include "third_party/skia/include/effects/SkComposeImageFilter.h"
20 21
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 virtual void validateStateStack() const = 0; 238 virtual void validateStateStack() const = 0;
238 239
239 virtual bool hasAlpha() const = 0; 240 virtual bool hasAlpha() const = 0;
240 241
241 virtual bool isContextLost() const = 0; 242 virtual bool isContextLost() const = 0;
242 243
243 virtual ColorBehavior drawImageColorBehavior() const = 0; 244 virtual ColorBehavior drawImageColorBehavior() const = 0;
244 245
245 virtual void willDrawImage(CanvasImageSource*) const {} 246 virtual void willDrawImage(CanvasImageSource*) const {}
246 247
248 virtual CanvasRenderingContext* renderingContext() const { return nullptr; }
Justin Novosad 2017/03/27 19:43:48 this should be private
zakerinasab 2017/03/30 17:56:11 Done.
249
247 void restoreMatrixClipStack(PaintCanvas*) const; 250 void restoreMatrixClipStack(PaintCanvas*) const;
248 251
249 DECLARE_VIRTUAL_TRACE(); 252 DECLARE_VIRTUAL_TRACE();
250 253
251 enum DrawCallType { 254 enum DrawCallType {
252 StrokePath = 0, 255 StrokePath = 0,
253 FillPath, 256 FillPath,
254 DrawVectorImage, 257 DrawVectorImage,
255 DrawBitmapImage, 258 DrawBitmapImage,
256 FillText, 259 FillText,
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 foregroundFlags.setBlendMode(SkBlendMode::kSrcOver); 471 foregroundFlags.setBlendMode(SkBlendMode::kSrcOver);
469 c->setMatrix(ctm); 472 c->setMatrix(ctm);
470 drawFunc(c, &foregroundFlags); 473 drawFunc(c, &foregroundFlags);
471 c->restore(); 474 c->restore();
472 c->setMatrix(ctm); 475 c->setMatrix(ctm);
473 } 476 }
474 477
475 } // namespace blink 478 } // namespace blink
476 479
477 #endif // BaseRenderingContext2D_h 480 #endif // BaseRenderingContext2D_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698