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

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

Issue 2141793002: Improving canvas 2D performance by switching graphics rendering pipeline. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing comments Created 4 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 // 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/HTMLImageElementOrHTMLVideoElementOrHTMLCanvasElem entOrImageBitmap.h" 8 #include "bindings/modules/v8/HTMLImageElementOrHTMLVideoElementOrHTMLCanvasElem entOrImageBitmap.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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 enum DrawCallType { 181 enum DrawCallType {
182 StrokePath = 0, 182 StrokePath = 0,
183 FillPath, 183 FillPath,
184 DrawImage, 184 DrawImage,
185 FillText, 185 FillText,
186 StrokeText, 186 StrokeText,
187 FillRect, 187 FillRect,
188 StrokeRect 188 StrokeRect
189 }; 189 };
190 190
191 const UsageCounters& getUsage(); 191 virtual const UsageCounters& getUsage();
Justin Novosad 2016/07/14 18:07:10 Why was this made virtual?
sebastienlc 2016/07/14 22:26:53 Done.
192 192
193 protected: 193 protected:
194 BaseRenderingContext2D(); 194 BaseRenderingContext2D();
195 195
196 CanvasRenderingContext2DState& modifiableState(); 196 CanvasRenderingContext2DState& modifiableState();
197 const CanvasRenderingContext2DState& state() const { return *m_stateStack.la st(); } 197 const CanvasRenderingContext2DState& state() const { return *m_stateStack.la st(); }
198 198
199 bool computeDirtyRect(const FloatRect& localBounds, SkIRect*); 199 bool computeDirtyRect(const FloatRect& localBounds, SkIRect*);
200 bool computeDirtyRect(const FloatRect& localBounds, const SkIRect& transform edClipBounds, SkIRect*); 200 bool computeDirtyRect(const FloatRect& localBounds, const SkIRect& transform edClipBounds, SkIRect*);
201 201
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 foregroundPaint.setXfermodeMode(SkXfermode::kSrcOver_Mode); 319 foregroundPaint.setXfermodeMode(SkXfermode::kSrcOver_Mode);
320 c->setMatrix(ctm); 320 c->setMatrix(ctm);
321 drawFunc(c, &foregroundPaint); 321 drawFunc(c, &foregroundPaint);
322 c->restore(); 322 c->restore();
323 c->setMatrix(ctm); 323 c->setMatrix(ctm);
324 } 324 }
325 325
326 } // namespace blink 326 } // namespace blink
327 327
328 #endif // BaseRenderingContext2D_h 328 #endif // BaseRenderingContext2D_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698