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

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

Issue 2485853005: Revert of Make SkSmallAllocator obey the RAII invariants and be expandable (Closed)
Patch Set: Created 4 years, 1 month 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/SkDrawLooper.cpp ('k') | src/core/SkSmallAllocator.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 2016 Google Inc. 2 * Copyright 2016 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 "SkBlitter.h" 8 #include "SkBlitter.h"
9 #include "SkBlendModePriv.h" 9 #include "SkBlendModePriv.h"
10 #include "SkColor.h" 10 #include "SkColor.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 return color.premul(); 92 return color.premul();
93 } 93 }
94 94
95 SkBlitter* SkRasterPipelineBlitter::Create(const SkPixmap& dst, 95 SkBlitter* SkRasterPipelineBlitter::Create(const SkPixmap& dst,
96 const SkPaint& paint, 96 const SkPaint& paint,
97 SkTBlitterAllocator* alloc) { 97 SkTBlitterAllocator* alloc) {
98 auto blitter = alloc->createT<SkRasterPipelineBlitter>(dst, 98 auto blitter = alloc->createT<SkRasterPipelineBlitter>(dst,
99 paint.getBlendMode(), 99 paint.getBlendMode(),
100 paint_color(dst, pain t)); 100 paint_color(dst, pain t));
101 auto earlyOut = [&] { 101 auto earlyOut = [&] {
102 alloc->deleteLast(); 102 blitter->~SkRasterPipelineBlitter();
103 alloc->freeLast();
103 return nullptr; 104 return nullptr;
104 }; 105 };
105 106
106 SkBlendMode* blend = &blitter->fBlend; 107 SkBlendMode* blend = &blitter->fBlend;
107 SkPM4f* paintColor = &blitter->fPaintColor; 108 SkPM4f* paintColor = &blitter->fPaintColor;
108 SkRasterPipeline* pipeline = &blitter->fShader; 109 SkRasterPipeline* pipeline = &blitter->fShader;
109 110
110 SkShader* shader = paint.getShader(); 111 SkShader* shader = paint.getShader();
111 SkColorFilter* colorFilter = paint.getColorFilter(); 112 SkColorFilter* colorFilter = paint.getColorFilter();
112 113
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 case SkMask::kLCD16_Format: 293 case SkMask::kLCD16_Format:
293 fMaskPtr = mask.getAddrLCD16(x,y)-x; 294 fMaskPtr = mask.getAddrLCD16(x,y)-x;
294 fBlitMaskLCD16(x, clip.width()); 295 fBlitMaskLCD16(x, clip.width());
295 break; 296 break;
296 default: 297 default:
297 // TODO 298 // TODO
298 break; 299 break;
299 } 300 }
300 } 301 }
301 } 302 }
OLDNEW
« no previous file with comments | « src/core/SkDrawLooper.cpp ('k') | src/core/SkSmallAllocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698