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

Unified Diff: gm/image.cpp

Issue 233943002: remove picture-backed surfaces (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | gyp/core.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/image.cpp
diff --git a/gm/image.cpp b/gm/image.cpp
index f5f5228c61073ec1c17e824d3ba9eef948e94c3e..88c1db523edf9f11959c6f1f58be45660fd44fd8 100644
--- a/gm/image.cpp
+++ b/gm/image.cpp
@@ -153,11 +153,12 @@ protected:
static const char* kLabel8 = "Pre-Alloc Img";
static const char* kLabel9 = "New Alloc Img";
- static const char* kLabel10 = "SkPicture";
- static const char* kLabel11 = "Null Paint";
- static const char* kLabel12 = "GPU";
+ static const char* kLabel10 = "Null Paint";
+ static const char* kLabel11 = "GPU";
SkPaint textPaint;
+ textPaint.setAntiAlias(true);
+ textPaint.setTextSize(8);
canvas->drawText(kLabel1, strlen(kLabel1), 10, 60, textPaint);
canvas->drawText(kLabel2, strlen(kLabel2), 10, 140, textPaint);
@@ -171,7 +172,6 @@ protected:
canvas->drawText(kLabel9, strlen(kLabel9), 160, 10, textPaint);
canvas->drawText(kLabel10, strlen(kLabel10), 250, 10, textPaint);
canvas->drawText(kLabel11, strlen(kLabel11), 320, 10, textPaint);
- canvas->drawText(kLabel12, strlen(kLabel12), 410, 10, textPaint);
canvas->translate(80, 20);
@@ -181,8 +181,6 @@ protected:
SkImageInfo info = SkImageInfo::MakeN32Premul(W, H);
SkAutoTUnref<SkSurface> surf0(SkSurface::NewRasterDirect(info, fBuffer, RB));
SkAutoTUnref<SkSurface> surf1(SkSurface::NewRaster(info));
- SkAutoTUnref<SkSurface> surf2(SkSurface::NewPicture(info.fWidth, info.fHeight));
- SkAutoTUnref<SkSurface> surf3(SkSurface::NewPicture(info.fWidth, info.fHeight));
#if SK_SUPPORT_GPU
GrContext* ctx = canvas->getGrContext();
@@ -192,10 +190,6 @@ protected:
test_surface(canvas, surf0, true);
canvas->translate(80, 0);
test_surface(canvas, surf1, true);
- canvas->translate(80, 0);
- test_surface(canvas, surf2, true);
- canvas->translate(80, 0);
- test_surface(canvas, surf3, false);
#if SK_SUPPORT_GPU
if (NULL != ctx) {
canvas->translate(80, 0);
« no previous file with comments | « no previous file | gyp/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698