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

Unified Diff: src/image/SkImage_Gpu.cpp

Issue 750023002: clarify samplecount field in imagegpu (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/image/SkImagePriv.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkImage_Gpu.cpp
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp
index 7a8da36d28338b9447649ad61feab8dbc1b3e94a..61fa142efdadf8b1e927884263c6cd286d3173d2 100644
--- a/src/image/SkImage_Gpu.cpp
+++ b/src/image/SkImage_Gpu.cpp
@@ -17,7 +17,7 @@ class SkImage_Gpu : public SkImage_Base {
public:
SK_DECLARE_INST_COUNT(SkImage_Gpu)
- SkImage_Gpu(const SkBitmap&, int sampleCount);
+ SkImage_Gpu(const SkBitmap&, int sampleCountForNewSurfaces);
void onDraw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*) const SK_OVERRIDE;
void onDrawRect(SkCanvas*, const SkRect* src, const SkRect& dst,
@@ -36,17 +36,17 @@ public:
private:
SkBitmap fBitmap;
- const int fSampleCount; // 0 if we weren't built from a surface
+ const int fSampleCountForNewSurfaces; // 0 if we don't know
typedef SkImage_Base INHERITED;
};
///////////////////////////////////////////////////////////////////////////////
-SkImage_Gpu::SkImage_Gpu(const SkBitmap& bitmap, int sampleCount)
+SkImage_Gpu::SkImage_Gpu(const SkBitmap& bitmap, int sampleCountForNewSurfaces)
: INHERITED(bitmap.width(), bitmap.height(), NULL)
, fBitmap(bitmap)
- , fSampleCount(sampleCount)
+ , fSampleCountForNewSurfaces(sampleCountForNewSurfaces)
{
SkASSERT(fBitmap.getTexture());
}
@@ -69,7 +69,7 @@ void SkImage_Gpu::onDrawRect(SkCanvas* canvas, const SkRect* src, const SkRect&
SkSurface* SkImage_Gpu::onNewSurface(const SkImageInfo& info, const SkSurfaceProps& props) const {
GrContext* ctx = this->getTexture()->getContext();
- return SkSurface::NewRenderTarget(ctx, info, fSampleCount, &props);
+ return SkSurface::NewRenderTarget(ctx, info, fSampleCountForNewSurfaces, &props);
}
GrTexture* SkImage_Gpu::onGetTexture() const {
@@ -86,11 +86,11 @@ bool SkImage_Gpu::isOpaque() const {
///////////////////////////////////////////////////////////////////////////////
-SkImage* SkNewImageFromBitmapTexture(const SkBitmap& bitmap, int sampleCount) {
+SkImage* SkNewImageFromBitmapTexture(const SkBitmap& bitmap, int sampleCountForNewSurfaces) {
if (NULL == bitmap.getTexture()) {
return NULL;
}
- return SkNEW_ARGS(SkImage_Gpu, (bitmap, sampleCount));
+ return SkNEW_ARGS(SkImage_Gpu, (bitmap, sampleCountForNewSurfaces));
}
SkImage* SkImage::NewTexture(const SkBitmap& bitmap) {
« no previous file with comments | « src/image/SkImagePriv.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698