| OLD | NEW | 
|---|
| 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 "SkCanvas.h" | 8 #include "SkCanvas.h" | 
| 9 #include "SkSpecialImage.h" | 9 #include "SkSpecialImage.h" | 
| 10 #include "SkSpecialSurface.h" | 10 #include "SkSpecialSurface.h" | 
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 154 }; | 154 }; | 
| 155 | 155 | 
| 156 sk_sp<SkSpecialSurface> SkSpecialSurface::MakeRenderTarget(GrContext* context, | 156 sk_sp<SkSpecialSurface> SkSpecialSurface::MakeRenderTarget(GrContext* context, | 
| 157                                                            int width, int height
     , | 157                                                            int width, int height
     , | 
| 158                                                            GrPixelConfig config, | 158                                                            GrPixelConfig config, | 
| 159                                                            sk_sp<SkColorSpace> c
     olorSpace) { | 159                                                            sk_sp<SkColorSpace> c
     olorSpace) { | 
| 160     if (!context) { | 160     if (!context) { | 
| 161         return nullptr; | 161         return nullptr; | 
| 162     } | 162     } | 
| 163 | 163 | 
| 164     sk_sp<GrDrawContext> drawContext(context->newDrawContext(SkBackingFit::kAppr
     ox, | 164     sk_sp<GrDrawContext> drawContext(context->makeDrawContext(SkBackingFit::kApp
     rox, | 
| 165                                                              width, height, conf
     ig, | 165                                                               width, height, con
     fig, | 
| 166                                                              std::move(colorSpac
     e))); | 166                                                               std::move(colorSpa
     ce))); | 
| 167     if (!drawContext) { | 167     if (!drawContext) { | 
| 168         return nullptr; | 168         return nullptr; | 
| 169     } | 169     } | 
| 170 | 170 | 
| 171     const SkIRect subset = SkIRect::MakeWH(width, height); | 171     const SkIRect subset = SkIRect::MakeWH(width, height); | 
| 172 | 172 | 
| 173     return sk_make_sp<SkSpecialSurface_Gpu>(std::move(drawContext), width, heigh
     t, subset); | 173     return sk_make_sp<SkSpecialSurface_Gpu>(std::move(drawContext), width, heigh
     t, subset); | 
| 174 } | 174 } | 
| 175 | 175 | 
| 176 #endif | 176 #endif | 
| OLD | NEW | 
|---|