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

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

Issue 2625873005: Add an heuristic for promoting canvases to GPU acceleration (Closed)
Patch Set: webgl test fix Created 3 years, 11 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/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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 virtual void snapshotStateForFilter() = 0; 235 virtual void snapshotStateForFilter() = 0;
236 236
237 virtual void validateStateStack() const = 0; 237 virtual void validateStateStack() const = 0;
238 238
239 virtual bool hasAlpha() const = 0; 239 virtual bool hasAlpha() const = 0;
240 240
241 virtual bool isContextLost() const = 0; 241 virtual bool isContextLost() const = 0;
242 242
243 virtual ColorBehavior drawImageColorBehavior() const = 0; 243 virtual ColorBehavior drawImageColorBehavior() const = 0;
244 244
245 virtual void willDrawImage(CanvasImageSource*) const {}
246
245 void restoreMatrixClipStack(SkCanvas*) const; 247 void restoreMatrixClipStack(SkCanvas*) const;
246 248
247 DECLARE_VIRTUAL_TRACE(); 249 DECLARE_VIRTUAL_TRACE();
248 250
249 enum DrawCallType { 251 enum DrawCallType {
250 StrokePath = 0, 252 StrokePath = 0,
251 FillPath, 253 FillPath,
252 DrawVectorImage, 254 DrawVectorImage,
253 DrawBitmapImage, 255 DrawBitmapImage,
254 FillText, 256 FillText,
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 foregroundPaint.setBlendMode(SkBlendMode::kSrcOver); 471 foregroundPaint.setBlendMode(SkBlendMode::kSrcOver);
470 c->setMatrix(ctm); 472 c->setMatrix(ctm);
471 drawFunc(c, &foregroundPaint); 473 drawFunc(c, &foregroundPaint);
472 c->restore(); 474 c->restore();
473 c->setMatrix(ctm); 475 c->setMatrix(ctm);
474 } 476 }
475 477
476 } // namespace blink 478 } // namespace blink
477 479
478 #endif // BaseRenderingContext2D_h 480 #endif // BaseRenderingContext2D_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698