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

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

Issue 22978012: Split SkDevice into SkBaseDevice and SkBitmapDevice (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Updating to ToT (10994) Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « src/effects/SkDropShadowImageFilter.cpp ('k') | src/effects/SkRectShaderImageFilter.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 * 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 "SkMergeImageFilter.h" 8 #include "SkMergeImageFilter.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkDevice.h" 10 #include "SkDevice.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 const SkIRect srcBounds = SkIRect::MakeXYWH(loc->x(), loc->y(), 102 const SkIRect srcBounds = SkIRect::MakeXYWH(loc->x(), loc->y(),
103 src.width(), src.height()); 103 src.width(), src.height());
104 SkIRect bounds; 104 SkIRect bounds;
105 if (!this->filterBounds(srcBounds, ctm, &bounds)) { 105 if (!this->filterBounds(srcBounds, ctm, &bounds)) {
106 return false; 106 return false;
107 } 107 }
108 108
109 const int x0 = bounds.left(); 109 const int x0 = bounds.left();
110 const int y0 = bounds.top(); 110 const int y0 = bounds.top();
111 111
112 SkAutoTUnref<SkDevice> dst(proxy->createDevice(bounds.width(), bounds.height ())); 112 SkAutoTUnref<SkBaseDevice> dst(proxy->createDevice(bounds.width(), bounds.he ight()));
113 if (NULL == dst) { 113 if (NULL == dst) {
114 return false; 114 return false;
115 } 115 }
116 SkCanvas canvas(dst); 116 SkCanvas canvas(dst);
117 SkPaint paint; 117 SkPaint paint;
118 118
119 int inputCount = countInputs(); 119 int inputCount = countInputs();
120 for (int i = 0; i < inputCount; ++i) { 120 for (int i = 0; i < inputCount; ++i) {
121 SkBitmap tmp; 121 SkBitmap tmp;
122 const SkBitmap* srcPtr; 122 const SkBitmap* srcPtr;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 SkMergeImageFilter::SkMergeImageFilter(SkFlattenableReadBuffer& buffer) : INHERI TED(buffer) { 156 SkMergeImageFilter::SkMergeImageFilter(SkFlattenableReadBuffer& buffer) : INHERI TED(buffer) {
157 bool hasModes = buffer.readBool(); 157 bool hasModes = buffer.readBool();
158 if (hasModes) { 158 if (hasModes) {
159 this->initAllocModes(); 159 this->initAllocModes();
160 SkASSERT(buffer.getArrayCount() == countInputs() * sizeof(fModes[0])); 160 SkASSERT(buffer.getArrayCount() == countInputs() * sizeof(fModes[0]));
161 buffer.readByteArray(fModes); 161 buffer.readByteArray(fModes);
162 } else { 162 } else {
163 fModes = 0; 163 fModes = 0;
164 } 164 }
165 } 165 }
OLDNEW
« no previous file with comments | « src/effects/SkDropShadowImageFilter.cpp ('k') | src/effects/SkRectShaderImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698