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

Side by Side Diff: src/pdf/SkPDFBitmap.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, 9 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/pdf/SkPDFBitmap.h ('k') | src/pdf/SkPDFDevice.h » ('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 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkColorPriv.h" 8 #include "SkColorPriv.h"
9 #include "SkFlate.h" 9 #include "SkFlate.h"
10 #include "SkPDFBitmap.h" 10 #include "SkPDFBitmap.h"
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 } 237 }
238 238
239 //////////////////////////////////////////////////////////////////////////////// 239 ////////////////////////////////////////////////////////////////////////////////
240 240
241 namespace { 241 namespace {
242 // This SkPDFObject only outputs the alpha layer of the given bitmap. 242 // This SkPDFObject only outputs the alpha layer of the given bitmap.
243 class PDFAlphaBitmap : public SkPDFObject { 243 class PDFAlphaBitmap : public SkPDFObject {
244 public: 244 public:
245 PDFAlphaBitmap(const SkBitmap& bm) : fBitmap(bm) {} 245 PDFAlphaBitmap(const SkBitmap& bm) : fBitmap(bm) {}
246 ~PDFAlphaBitmap() {} 246 ~PDFAlphaBitmap() {}
247 void emitObject(SkWStream*, SkPDFCatalog*) SK_OVERRIDE; 247 void emitObject(SkWStream*, SkPDFCatalog*) override;
248 248
249 private: 249 private:
250 const SkBitmap fBitmap; 250 const SkBitmap fBitmap;
251 void emitDict(SkWStream*, SkPDFCatalog*, size_t) const; 251 void emitDict(SkWStream*, SkPDFCatalog*, size_t) const;
252 }; 252 };
253 253
254 void PDFAlphaBitmap::emitObject(SkWStream* stream, SkPDFCatalog* catalog) { 254 void PDFAlphaBitmap::emitObject(SkWStream* stream, SkPDFCatalog* catalog) {
255 SkAutoLockPixels autoLockPixels(fBitmap); 255 SkAutoLockPixels autoLockPixels(fBitmap);
256 SkASSERT(fBitmap.colorType() != kIndex_8_SkColorType || 256 SkASSERT(fBitmap.colorType() != kIndex_8_SkColorType ||
257 fBitmap.getColorTable()); 257 fBitmap.getColorTable());
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 return SkRef(canonBitmap); 399 return SkRef(canonBitmap);
400 } 400 }
401 SkPDFObject* smask = NULL; 401 SkPDFObject* smask = NULL;
402 if (!bm.isOpaque() && !SkBitmap::ComputeIsOpaque(bm)) { 402 if (!bm.isOpaque() && !SkBitmap::ComputeIsOpaque(bm)) {
403 smask = SkNEW_ARGS(PDFAlphaBitmap, (bm)); 403 smask = SkNEW_ARGS(PDFAlphaBitmap, (bm));
404 } 404 }
405 SkPDFBitmap* pdfBitmap = SkNEW_ARGS(SkPDFBitmap, (bm, smask)); 405 SkPDFBitmap* pdfBitmap = SkNEW_ARGS(SkPDFBitmap, (bm, smask));
406 canon->addBitmap(pdfBitmap); 406 canon->addBitmap(pdfBitmap);
407 return pdfBitmap; 407 return pdfBitmap;
408 } 408 }
OLDNEW
« no previous file with comments | « src/pdf/SkPDFBitmap.h ('k') | src/pdf/SkPDFDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698