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

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

Issue 1660393003: Make SkImage::readYUV8Planes const (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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
« no previous file with comments | « include/core/SkImage.h ('k') | no next file » | 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 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 "SkBitmapCache.h" 9 #include "SkBitmapCache.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 return this->readPixels(pmap.info(), pmap.writable_addr(), pmap.rowBytes(), srcX, srcY, chint); 258 return this->readPixels(pmap.info(), pmap.writable_addr(), pmap.rowBytes(), srcX, srcY, chint);
259 } 259 }
260 260
261 #if SK_SUPPORT_GPU 261 #if SK_SUPPORT_GPU
262 #include "GrTextureToYUVPlanes.h" 262 #include "GrTextureToYUVPlanes.h"
263 #endif 263 #endif
264 264
265 #include "SkRGBAToYUV.h" 265 #include "SkRGBAToYUV.h"
266 266
267 bool SkImage::readYUV8Planes(const SkISize sizes[3], void* const planes[3], 267 bool SkImage::readYUV8Planes(const SkISize sizes[3], void* const planes[3],
268 const size_t rowBytes[3], SkYUVColorSpace colorSpac e) { 268 const size_t rowBytes[3], SkYUVColorSpace colorSpac e) const {
269 #if SK_SUPPORT_GPU 269 #if SK_SUPPORT_GPU
270 if (GrTexture* texture = as_IB(this)->peekTexture()) { 270 if (GrTexture* texture = as_IB(this)->peekTexture()) {
271 if (GrTextureToYUVPlanes(texture, sizes, planes, rowBytes, colorSpace)) { 271 if (GrTextureToYUVPlanes(texture, sizes, planes, rowBytes, colorSpace)) {
272 return true; 272 return true;
273 } 273 }
274 } 274 }
275 #endif 275 #endif
276 return SkRGBAToYUV(this, sizes, planes, rowBytes, colorSpace); 276 return SkRGBAToYUV(this, sizes, planes, rowBytes, colorSpace);
277 } 277 }
278 278
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 355
356 SkImage* SkImage::NewFromTextureCopy(GrContext*, const GrBackendTextureDesc&, Sk AlphaType) { 356 SkImage* SkImage::NewFromTextureCopy(GrContext*, const GrBackendTextureDesc&, Sk AlphaType) {
357 return nullptr; 357 return nullptr;
358 } 358 }
359 359
360 SkImage* SkImage::newTextureImage(GrContext*) const { 360 SkImage* SkImage::newTextureImage(GrContext*) const {
361 return nullptr; 361 return nullptr;
362 } 362 }
363 363
364 #endif 364 #endif
OLDNEW
« no previous file with comments | « include/core/SkImage.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698