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

Unified Diff: samplecode/SampleApp.cpp

Issue 255133004: fix cycle_colortypes so we can test 565 (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleApp.cpp
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
index b7cc021d2b31dc6d4b436d0b05b17d6959c8379a..71fb8d3bfd6d9b1e74868ecd58a5414333b5152b 100644
--- a/samplecode/SampleApp.cpp
+++ b/samplecode/SampleApp.cpp
@@ -78,7 +78,7 @@ public:
SkTCPServer gServer;
#endif
-#define USE_ARROWS_FOR_ZOOM true
+#define USE_ARROWS_FOR_ZOOM false
#if SK_ANGLE
//#define DEFAULT_TO_ANGLE 1
@@ -297,7 +297,8 @@ public:
fCurContext->setRenderTarget(fCurRenderTarget);
const SkBitmap& bm = win->getBitmap();
fCurRenderTarget->writePixels(0, 0, bm.width(), bm.height(),
- kSkia8888_GrPixelConfig,
+ SkImageInfo2GrPixelConfig(bm.colorType(),
+ bm.alphaType()),
bm.getPixels(),
bm.rowBytes());
}
@@ -1546,7 +1547,7 @@ void SampleWindow::afterChild(SkView* child, SkCanvas* canvas) {
static SkColorType gColorTypeCycle[] = {
kUnknown_SkColorType, // none -> none
kUnknown_SkColorType, // a8 -> none
- kARGB_4444_SkColorType, // 565 -> 4444
+ kN32_SkColorType, // 565 -> 8888
kN32_SkColorType, // 4444 -> 8888
kRGB_565_SkColorType, // 8888 -> 565
kRGB_565_SkColorType, // 8888 -> 565
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698