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

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

Issue 2241353002: pin as texture api (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 4 years, 4 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/core/SkCanvas.cpp » ('j') | src/image/SkImage_Gpu.h » ('J')
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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 * transformation is required, the returned image may be the same as this i mage. If the this 334 * transformation is required, the returned image may be the same as this i mage. If the this
335 * image is from a different GrContext, this will fail. 335 * image is from a different GrContext, this will fail.
336 */ 336 */
337 sk_sp<SkImage> makeTextureImage(GrContext*) const; 337 sk_sp<SkImage> makeTextureImage(GrContext*) const;
338 338
339 /** 339 /**
340 * If the image is texture-backed this will make a raster copy of it (or nul lptr if reading back 340 * If the image is texture-backed this will make a raster copy of it (or nul lptr if reading back
341 * the pixels fails). Otherwise, it returns the original image. 341 * the pixels fails). Otherwise, it returns the original image.
342 */ 342 */
343 sk_sp<SkImage> makeNonTextureImage() const; 343 sk_sp<SkImage> makeNonTextureImage() const;
344
345 void pinAsTexture(GrContext*) const;
346 void unpinAsTexture(GrContext*) const;
347
344 /** 348 /**
345 * Apply a given image filter to this image, and return the filtered result . 349 * Apply a given image filter to this image, and return the filtered result .
346 * 350 *
347 * The subset represents the active portion of this image. The return value is similarly an 351 * The subset represents the active portion of this image. The return value is similarly an
348 * SkImage, with an active subset (outSubset). This is usually used with te xture-backed 352 * SkImage, with an active subset (outSubset). This is usually used with te xture-backed
349 * images, where the texture may be approx-match and thus larger than the r equired size. 353 * images, where the texture may be approx-match and thus larger than the r equired size.
350 * 354 *
351 * clipBounds constrains the device-space extent of the image which may be produced to the 355 * clipBounds constrains the device-space extent of the image which may be produced to the
352 * given rect. 356 * given rect.
353 * 357 *
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 SkBudgeted); 476 SkBudgeted);
473 477
474 const int fWidth; 478 const int fWidth;
475 const int fHeight; 479 const int fHeight;
476 const uint32_t fUniqueID; 480 const uint32_t fUniqueID;
477 481
478 typedef SkRefCnt INHERITED; 482 typedef SkRefCnt INHERITED;
479 }; 483 };
480 484
481 #endif 485 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkCanvas.cpp » ('j') | src/image/SkImage_Gpu.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698