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

Side by Side Diff: src/image/SkImage.cpp

Issue 1121813002: new image from backend desc (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 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 2012 Google Inc. 2 * Copyright 2012 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 "SkBitmap.h" 8 #include "SkBitmap.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkImageGenerator.h" 10 #include "SkImageGenerator.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 surface->getCanvas()->scale(newWidth / src.width(), newHeight / src.height() ); 162 surface->getCanvas()->scale(newWidth / src.width(), newHeight / src.height() );
163 surface->getCanvas()->translate(-src.x(), -src.y()); 163 surface->getCanvas()->translate(-src.x(), -src.y());
164 164
165 SkPaint paint; 165 SkPaint paint;
166 paint.setXfermodeMode(SkXfermode::kSrc_Mode); 166 paint.setXfermodeMode(SkXfermode::kSrc_Mode);
167 paint.setFilterQuality(quality); 167 paint.setFilterQuality(quality);
168 surface->getCanvas()->drawImage(this, 0, 0, &paint); 168 surface->getCanvas()->drawImage(this, 0, 0, &paint);
169 return surface->newImageSnapshot(); 169 return surface->newImageSnapshot();
170 } 170 }
171 171
172 //////////////////////////////////////////////////////////////////////////////// //////
172 173
174 #if !SK_SUPPORT_GPU
175
176 SkImage* SkImage::NewFromTexture(GrContext*, const GrBackendTextureDesc&) { retu rn NULL; }
177 SkImage* SkImage::NewFromTextureCopy(GrContext*, const GrBackendTextureDesc&) { return NULL; }
178
179 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698