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

Side by Side Diff: include/core/SkImage.h

Issue 2147493004: Add a function to convert a texture backed SkImage to raster. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: cleanup Created 4 years, 5 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 | « no previous file | src/image/SkImage.cpp » ('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 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 #ifndef SkImage_DEFINED 8 #ifndef SkImage_DEFINED
9 #define SkImage_DEFINED 9 #define SkImage_DEFINED
10 10
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 sk_sp<SkImage> makeSubset(const SkIRect& subset) const; 323 sk_sp<SkImage> makeSubset(const SkIRect& subset) const;
324 324
325 /** 325 /**
326 * Ensures that an image is backed by a texture (when GrContext is non-null ). If no 326 * Ensures that an image is backed by a texture (when GrContext is non-null ). If no
327 * transformation is required, the returned image may be the same as this i mage. If the this 327 * transformation is required, the returned image may be the same as this i mage. If the this
328 * image is from a different GrContext, this will fail. 328 * image is from a different GrContext, this will fail.
329 */ 329 */
330 sk_sp<SkImage> makeTextureImage(GrContext*) const; 330 sk_sp<SkImage> makeTextureImage(GrContext*) const;
331 331
332 /** 332 /**
333 * If the image is texture-backed this will make a raster copy of it (or nul lptr if reading back
334 * the pixels fails). Otherwise, it returns the original image.
335 */
336 sk_sp<SkImage> makeNonTextureImage() const;
337 /**
333 * Apply a given image filter to this image, and return the filtered result . 338 * Apply a given image filter to this image, and return the filtered result .
334 * 339 *
335 * The subset represents the active portion of this image. The return value is similarly an 340 * The subset represents the active portion of this image. The return value is similarly an
336 * SkImage, with an active subset (outSubset). This is usually used with te xture-backed 341 * SkImage, with an active subset (outSubset). This is usually used with te xture-backed
337 * images, where the texture may be approx-match and thus larger than the r equired size. 342 * images, where the texture may be approx-match and thus larger than the r equired size.
338 * 343 *
339 * clipBounds constrains the device-space extent of the image which may be produced to the 344 * clipBounds constrains the device-space extent of the image which may be produced to the
340 * given rect. 345 * given rect.
341 * 346 *
342 * offset is the amount to translate the resulting image relative to the sr c when it is drawn. 347 * offset is the amount to translate the resulting image relative to the sr c when it is drawn.
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 SkBudgeted); 467 SkBudgeted);
463 468
464 const int fWidth; 469 const int fWidth;
465 const int fHeight; 470 const int fHeight;
466 const uint32_t fUniqueID; 471 const uint32_t fUniqueID;
467 472
468 typedef SkRefCnt INHERITED; 473 typedef SkRefCnt INHERITED;
469 }; 474 };
470 475
471 #endif 476 #endif
OLDNEW
« no previous file with comments | « no previous file | src/image/SkImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698