Chromium Code Reviews| Index: gm/copyTo4444.cpp |
| diff --git a/gm/copyTo4444.cpp b/gm/copyTo4444.cpp |
| deleted file mode 100644 |
| index 635cc7b8344a6d789a0e5d85985cec72dd2e130d..0000000000000000000000000000000000000000 |
| --- a/gm/copyTo4444.cpp |
| +++ /dev/null |
| @@ -1,56 +0,0 @@ |
| -/* |
| - * Copyright 2013 Google Inc. |
|
msarett
2016/03/11 20:53:09
Pretty sure we don't support drawing into 4444?
scroggo
2016/03/17 13:05:48
We don't support *drawing* into 4444, but we do su
msarett
2016/03/17 13:53:38
Gotcha adding this back in.
|
| - * |
| - * Use of this source code is governed by a BSD-style license that can be |
| - * found in the LICENSE file. |
| - */ |
| - |
| -#include "gm.h" |
| - |
| -#include "Resources.h" |
| -#include "SkCanvas.h" |
| -#include "SkImageDecoder.h" |
| -#include "SkOSFile.h" |
| - |
| -namespace skiagm { |
| - |
| -/** |
| - * Test copying an image from 8888 to 4444. |
| - */ |
| -class CopyTo4444GM : public GM { |
| -public: |
| - CopyTo4444GM() {} |
| - |
| -protected: |
| - virtual SkString onShortName() { |
| - return SkString("copyTo4444"); |
| - } |
| - |
| - virtual SkISize onISize() { |
| - return SkISize::Make(1024, 512); |
| - } |
| - |
| - virtual void onDraw(SkCanvas* canvas) { |
| - SkBitmap bm, bm4444; |
| - SkString pngFilename = GetResourcePath("mandrill_512.png"); |
| - if (!SkImageDecoder::DecodeFile(pngFilename.c_str(), &bm, kN32_SkColorType, |
| - SkImageDecoder::kDecodePixels_Mode)) { |
| - SkDebugf("Could not decode the file. Did you forget to set the " |
| - "resourcePath?\n"); |
| - return; |
| - } |
| - canvas->drawBitmap(bm, 0, 0); |
| - SkAssertResult(bm.copyTo(&bm4444, kARGB_4444_SkColorType)); |
| - canvas->drawBitmap(bm4444, SkIntToScalar(bm.width()), 0); |
| - } |
| - |
| -private: |
| - typedef GM INHERITED; |
| -}; |
| - |
| -////////////////////////////////////////////////////////////////////////////// |
| - |
| -static GM* MyFactory(void*) { return new CopyTo4444GM; } |
| -static GMRegistry reg(MyFactory); |
| - |
| -} |