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

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

Issue 1705113002: Update SkSpecialImage API (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add missing files Created 4 years, 10 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
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 "SkCanvas.h" 8 #include "SkCanvas.h"
9 #include "SkSpecialImage.h" 9 #include "SkSpecialImage.h"
10 #include "SkSpecialSurface.h" 10 #include "SkSpecialSurface.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 if (!device) { 119 if (!device) {
120 return; 120 return;
121 } 121 }
122 122
123 fCanvas.reset(new SkCanvas(device)); 123 fCanvas.reset(new SkCanvas(device));
124 } 124 }
125 125
126 ~SkSpecialSurface_Gpu() override { } 126 ~SkSpecialSurface_Gpu() override { }
127 127
128 SkSpecialImage* onNewImageSnapshot() override { 128 SkSpecialImage* onNewImageSnapshot() override {
129 return SkSpecialImage::NewFromGpu(this->subset(), fTexture); 129 return SkSpecialImage::NewFromGpu(this->subset(),
130 kNeedNewImageUniqueID_SpecialImage,
131 fTexture);
130 } 132 }
131 133
132 private: 134 private:
133 SkAutoTUnref<GrTexture> fTexture; 135 SkAutoTUnref<GrTexture> fTexture;
134 136
135 typedef SkSpecialSurface_Base INHERITED; 137 typedef SkSpecialSurface_Base INHERITED;
136 }; 138 };
137 139
138 SkSpecialSurface* SkSpecialSurface::NewFromTexture(const SkIRect& subset, GrText ure* texture, 140 SkSpecialSurface* SkSpecialSurface::NewFromTexture(const SkIRect& subset, GrText ure* texture,
139 const SkSurfaceProps* props) { 141 const SkSurfaceProps* props) {
(...skipping 28 matching lines...) Expand all
168 return nullptr; 170 return nullptr;
169 } 171 }
170 172
171 SkSpecialSurface* SkSpecialSurface::NewRenderTarget(GrContext* context, 173 SkSpecialSurface* SkSpecialSurface::NewRenderTarget(GrContext* context,
172 const GrSurfaceDesc& desc, 174 const GrSurfaceDesc& desc,
173 const SkSurfaceProps* props) { 175 const SkSurfaceProps* props) {
174 return nullptr; 176 return nullptr;
175 } 177 }
176 178
177 #endif 179 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698