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

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

Issue 238923010: Remove unused endContext(). (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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/SkBitmapProcState.h ('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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
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 #include "SkBitmapProcState.h" 8 #include "SkBitmapProcState.h"
9 #include "SkColorPriv.h" 9 #include "SkColorPriv.h"
10 #include "SkFilterProc.h" 10 #include "SkFilterProc.h"
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 fScaledBitmap.reset(); 352 fScaledBitmap.reset();
353 return false; 353 return false;
354 } 354 }
355 } 355 }
356 } 356 }
357 fBitmap = &fScaledBitmap; 357 fBitmap = &fScaledBitmap;
358 unlocker.release(); 358 unlocker.release();
359 return true; 359 return true;
360 } 360 }
361 361
362 void SkBitmapProcState::endContext() {
363 SkDELETE(fBitmapFilter);
364 fBitmapFilter = NULL;
365 fScaledBitmap.reset();
366
367 if (fScaledCacheID) {
368 SkScaledImageCache::Unlock(fScaledCacheID);
369 fScaledCacheID = NULL;
370 }
371 }
372
373 SkBitmapProcState::~SkBitmapProcState() { 362 SkBitmapProcState::~SkBitmapProcState() {
374 if (fScaledCacheID) { 363 if (fScaledCacheID) {
375 SkScaledImageCache::Unlock(fScaledCacheID); 364 SkScaledImageCache::Unlock(fScaledCacheID);
376 } 365 }
377 SkDELETE(fBitmapFilter); 366 SkDELETE(fBitmapFilter);
378 } 367 }
379 368
380 bool SkBitmapProcState::chooseProcs(const SkMatrix& inv, const SkPaint& paint) { 369 bool SkBitmapProcState::chooseProcs(const SkMatrix& inv, const SkPaint& paint) {
381 SkASSERT(fOrigBitmap.width() && fOrigBitmap.height()); 370 SkASSERT(fOrigBitmap.width() && fOrigBitmap.height());
382 371
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 } else { 1025 } else {
1037 size >>= 2; 1026 size >>= 2;
1038 } 1027 }
1039 1028
1040 if (fFilterLevel != SkPaint::kNone_FilterLevel) { 1029 if (fFilterLevel != SkPaint::kNone_FilterLevel) {
1041 size >>= 1; 1030 size >>= 1;
1042 } 1031 }
1043 1032
1044 return size; 1033 return size;
1045 } 1034 }
OLDNEW
« no previous file with comments | « src/core/SkBitmapProcState.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698