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

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

Issue 1776913003: Add SkImage::NewTextureFromPixmap (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: try again Created 4 years, 9 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/gpu/SkGr.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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 * deleted after the function returns. The image will have the dimensions o f the y texture. 138 * deleted after the function returns. The image will have the dimensions o f the y texture.
139 */ 139 */
140 static SkImage* NewFromYUVTexturesCopy(GrContext*, SkYUVColorSpace, 140 static SkImage* NewFromYUVTexturesCopy(GrContext*, SkYUVColorSpace,
141 const GrBackendObject yuvTextureHandl es[3], 141 const GrBackendObject yuvTextureHandl es[3],
142 const SkISize yuvSizes[3], 142 const SkISize yuvSizes[3],
143 GrSurfaceOrigin); 143 GrSurfaceOrigin);
144 144
145 static SkImage* NewFromPicture(const SkPicture*, const SkISize& dimensions, 145 static SkImage* NewFromPicture(const SkPicture*, const SkISize& dimensions,
146 const SkMatrix*, const SkPaint*); 146 const SkMatrix*, const SkPaint*);
147 147
148 static SkImage* NewTextureFromPixmap(GrContext*, const SkPixmap&, SkBudgeted budgeted);
149
148 //////////////////////////////////////////////////////////////////////////// /////////////////// 150 //////////////////////////////////////////////////////////////////////////// ///////////////////
149 151
150 int width() const { return fWidth; } 152 int width() const { return fWidth; }
151 int height() const { return fHeight; } 153 int height() const { return fHeight; }
152 SkISize dimensions() const { return SkISize::Make(fWidth, fHeight); } 154 SkISize dimensions() const { return SkISize::Make(fWidth, fHeight); }
153 SkIRect bounds() const { return SkIRect::MakeWH(fWidth, fHeight); } 155 SkIRect bounds() const { return SkIRect::MakeWH(fWidth, fHeight); }
154 uint32_t uniqueID() const { return fUniqueID; } 156 uint32_t uniqueID() const { return fUniqueID; }
155 virtual bool isOpaque() const { return false; } 157 virtual bool isOpaque() const { return false; }
156 158
157 /** 159 /**
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 345
344 private: 346 private:
345 const int fWidth; 347 const int fWidth;
346 const int fHeight; 348 const int fHeight;
347 const uint32_t fUniqueID; 349 const uint32_t fUniqueID;
348 350
349 typedef SkRefCnt INHERITED; 351 typedef SkRefCnt INHERITED;
350 }; 352 };
351 353
352 #endif 354 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/SkGr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698