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

Side by Side Diff: src/core/SkScan_AntiPath.cpp

Issue 1037793002: C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla} (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: git cl web Created 5 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
« no previous file with comments | « src/core/SkScalerContext.cpp ('k') | src/core/SkScan_Antihair.cpp » ('j') | 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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkScanPriv.h" 10 #include "SkScanPriv.h"
(...skipping 26 matching lines...) Expand all
37 /////////////////////////////////////////////////////////////////////////////// 37 ///////////////////////////////////////////////////////////////////////////////
38 38
39 /// Base class for a single-pass supersampled blitter. 39 /// Base class for a single-pass supersampled blitter.
40 class BaseSuperBlitter : public SkBlitter { 40 class BaseSuperBlitter : public SkBlitter {
41 public: 41 public:
42 BaseSuperBlitter(SkBlitter* realBlitter, const SkIRect& ir, 42 BaseSuperBlitter(SkBlitter* realBlitter, const SkIRect& ir,
43 const SkRegion& clip, bool isInverse); 43 const SkRegion& clip, bool isInverse);
44 44
45 /// Must be explicitly defined on subclasses. 45 /// Must be explicitly defined on subclasses.
46 virtual void blitAntiH(int x, int y, const SkAlpha antialias[], 46 virtual void blitAntiH(int x, int y, const SkAlpha antialias[],
47 const int16_t runs[]) SK_OVERRIDE { 47 const int16_t runs[]) override {
48 SkDEBUGFAIL("How did I get here?"); 48 SkDEBUGFAIL("How did I get here?");
49 } 49 }
50 /// May not be called on BaseSuperBlitter because it blits out of order. 50 /// May not be called on BaseSuperBlitter because it blits out of order.
51 void blitV(int x, int y, int height, SkAlpha alpha) SK_OVERRIDE { 51 void blitV(int x, int y, int height, SkAlpha alpha) override {
52 SkDEBUGFAIL("How did I get here?"); 52 SkDEBUGFAIL("How did I get here?");
53 } 53 }
54 54
55 protected: 55 protected:
56 SkBlitter* fRealBlitter; 56 SkBlitter* fRealBlitter;
57 /// Current y coordinate, in destination coordinates. 57 /// Current y coordinate, in destination coordinates.
58 int fCurrIY; 58 int fCurrIY;
59 /// Widest row of region to be blitted, in destination coordinates. 59 /// Widest row of region to be blitted, in destination coordinates.
60 int fWidth; 60 int fWidth;
61 /// Leftmost x coordinate in any row, in destination coordinates. 61 /// Leftmost x coordinate in any row, in destination coordinates.
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 virtual ~SuperBlitter() { 108 virtual ~SuperBlitter() {
109 this->flush(); 109 this->flush();
110 } 110 }
111 111
112 /// Once fRuns contains a complete supersampled row, flush() blits 112 /// Once fRuns contains a complete supersampled row, flush() blits
113 /// it out through the wrapped blitter. 113 /// it out through the wrapped blitter.
114 void flush(); 114 void flush();
115 115
116 /// Blits a row of pixels, with location and width specified 116 /// Blits a row of pixels, with location and width specified
117 /// in supersampled coordinates. 117 /// in supersampled coordinates.
118 void blitH(int x, int y, int width) SK_OVERRIDE; 118 void blitH(int x, int y, int width) override;
119 /// Blits a rectangle of pixels, with location and size specified 119 /// Blits a rectangle of pixels, with location and size specified
120 /// in supersampled coordinates. 120 /// in supersampled coordinates.
121 void blitRect(int x, int y, int width, int height) SK_OVERRIDE; 121 void blitRect(int x, int y, int width, int height) override;
122 122
123 private: 123 private:
124 // The next three variables are used to track a circular buffer that 124 // The next three variables are used to track a circular buffer that
125 // contains the values used in SkAlphaRuns. These variables should only 125 // contains the values used in SkAlphaRuns. These variables should only
126 // ever be updated in advanceRuns(), and fRuns should always point to 126 // ever be updated in advanceRuns(), and fRuns should always point to
127 // a valid SkAlphaRuns... 127 // a valid SkAlphaRuns...
128 int fRunsToBuffer; 128 int fRunsToBuffer;
129 void* fRunsBuffer; 129 void* fRunsBuffer;
130 int fCurrentRun; 130 int fCurrentRun;
131 SkAlphaRuns fRuns; 131 SkAlphaRuns fRuns;
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 /////////////////////////////////////////////////////////////////////////////// 393 ///////////////////////////////////////////////////////////////////////////////
394 394
395 /// Masked supersampling antialiased blitter. 395 /// Masked supersampling antialiased blitter.
396 class MaskSuperBlitter : public BaseSuperBlitter { 396 class MaskSuperBlitter : public BaseSuperBlitter {
397 public: 397 public:
398 MaskSuperBlitter(SkBlitter* realBlitter, const SkIRect& ir, const SkRegion&, bool isInverse); 398 MaskSuperBlitter(SkBlitter* realBlitter, const SkIRect& ir, const SkRegion&, bool isInverse);
399 virtual ~MaskSuperBlitter() { 399 virtual ~MaskSuperBlitter() {
400 fRealBlitter->blitMask(fMask, fClipRect); 400 fRealBlitter->blitMask(fMask, fClipRect);
401 } 401 }
402 402
403 void blitH(int x, int y, int width) SK_OVERRIDE; 403 void blitH(int x, int y, int width) override;
404 404
405 static bool CanHandleRect(const SkIRect& bounds) { 405 static bool CanHandleRect(const SkIRect& bounds) {
406 #ifdef FORCE_RLE 406 #ifdef FORCE_RLE
407 return false; 407 return false;
408 #endif 408 #endif
409 int width = bounds.width(); 409 int width = bounds.width();
410 int64_t rb = SkAlign4(width); 410 int64_t rb = SkAlign4(width);
411 // use 64bits to detect overflow 411 // use 64bits to detect overflow
412 int64_t storage = rb * bounds.height(); 412 int64_t storage = rb * bounds.height();
413 413
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 AntiFillPath(path, clip.bwRgn(), blitter); 758 AntiFillPath(path, clip.bwRgn(), blitter);
759 } else { 759 } else {
760 SkRegion tmp; 760 SkRegion tmp;
761 SkAAClipBlitter aaBlitter; 761 SkAAClipBlitter aaBlitter;
762 762
763 tmp.setRect(clip.getBounds()); 763 tmp.setRect(clip.getBounds());
764 aaBlitter.init(blitter, &clip.aaRgn()); 764 aaBlitter.init(blitter, &clip.aaRgn());
765 SkScan::AntiFillPath(path, tmp, &aaBlitter, true); 765 SkScan::AntiFillPath(path, tmp, &aaBlitter, true);
766 } 766 }
767 } 767 }
OLDNEW
« no previous file with comments | « src/core/SkScalerContext.cpp ('k') | src/core/SkScan_Antihair.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698