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

Side by Side Diff: src/effects/SkBitmapSource.cpp

Issue 303563002: remove SK_SUPPORT_LEGACY_BITMAPFLATTEN code (Closed) Base URL: https://skia.googlesource.com/skia.git@kill_buildmipmap
Patch Set: Created 6 years, 7 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/SkReadBuffer.cpp ('k') | no next file » | 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 2012 The Android Open Source Project 2 * Copyright 2012 The Android Open Source Project
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 "SkBitmapSource.h" 8 #include "SkBitmapSource.h"
9 #include "SkDevice.h" 9 #include "SkDevice.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 10 matching lines...) Expand all
21 } 21 }
22 22
23 SkBitmapSource::SkBitmapSource(const SkBitmap& bitmap, const SkRect& srcRect, co nst SkRect& dstRect) 23 SkBitmapSource::SkBitmapSource(const SkBitmap& bitmap, const SkRect& srcRect, co nst SkRect& dstRect)
24 : INHERITED(0, 0) 24 : INHERITED(0, 0)
25 , fBitmap(bitmap) 25 , fBitmap(bitmap)
26 , fSrcRect(srcRect) 26 , fSrcRect(srcRect)
27 , fDstRect(dstRect) {} 27 , fDstRect(dstRect) {}
28 28
29 SkBitmapSource::SkBitmapSource(SkReadBuffer& buffer) : INHERITED(0, buffer) { 29 SkBitmapSource::SkBitmapSource(SkReadBuffer& buffer) : INHERITED(0, buffer) {
30 if (buffer.isVersionLT(SkReadBuffer::kNoMoreBitmapFlatten_Version)) { 30 if (buffer.isVersionLT(SkReadBuffer::kNoMoreBitmapFlatten_Version)) {
31 fBitmap.unflatten(buffer); 31 fBitmap.legacyUnflatten(buffer);
32 } else { 32 } else {
33 buffer.readBitmap(&fBitmap); 33 buffer.readBitmap(&fBitmap);
34 } 34 }
35 buffer.readRect(&fSrcRect); 35 buffer.readRect(&fSrcRect);
36 buffer.readRect(&fDstRect); 36 buffer.readRect(&fDstRect);
37 buffer.validate(buffer.isValid() && SkIsValidRect(fSrcRect) && SkIsValidRect (fDstRect)); 37 buffer.validate(buffer.isValid() && SkIsValidRect(fSrcRect) && SkIsValidRect (fDstRect));
38 } 38 }
39 39
40 void SkBitmapSource::flatten(SkWriteBuffer& buffer) const { 40 void SkBitmapSource::flatten(SkWriteBuffer& buffer) const {
41 this->INHERITED::flatten(buffer); 41 this->INHERITED::flatten(buffer);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 84
85 void SkBitmapSource::computeFastBounds(const SkRect&, SkRect* dst) const { 85 void SkBitmapSource::computeFastBounds(const SkRect&, SkRect* dst) const {
86 *dst = fDstRect; 86 *dst = fDstRect;
87 } 87 }
88 88
89 bool SkBitmapSource::onFilterBounds(const SkIRect& src, const SkMatrix& ctm, 89 bool SkBitmapSource::onFilterBounds(const SkIRect& src, const SkMatrix& ctm,
90 SkIRect* dst) const { 90 SkIRect* dst) const {
91 *dst = src; 91 *dst = src;
92 return true; 92 return true;
93 } 93 }
OLDNEW
« no previous file with comments | « src/core/SkReadBuffer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698