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

Side by Side Diff: dm/DMSrcSink.cpp

Issue 1809733002: detach -> release (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: (C) 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 | « dm/DM.cpp ('k') | example/HelloWorld.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 2015 Google Inc. 2 * Copyright 2015 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 #include "DMSrcSink.h" 8 #include "DMSrcSink.h"
9 #include "SkAndroidCodec.h" 9 #include "SkAndroidCodec.h"
10 #include "SkCodec.h" 10 #include "SkCodec.h"
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 SkASSERT(false); 811 SkASSERT(false);
812 return "Invalid image generator mode"; 812 return "Invalid image generator mode";
813 } 813 }
814 814
815 // Test deferred decoding path on GPU 815 // Test deferred decoding path on GPU
816 if (fIsGpu) { 816 if (fIsGpu) {
817 // FIXME: The gpu backend does not draw kGray sources correctly. (skbug. com/4822) 817 // FIXME: The gpu backend does not draw kGray sources correctly. (skbug. com/4822)
818 // We have disabled these tests in DM.cpp. 818 // We have disabled these tests in DM.cpp.
819 SkASSERT(kGray_8_SkColorType != gen->getInfo().colorType()); 819 SkASSERT(kGray_8_SkColorType != gen->getInfo().colorType());
820 820
821 SkAutoTDelete<SkImage> image(SkImage::NewFromGenerator(gen.detach(), nul lptr)); 821 SkAutoTDelete<SkImage> image(SkImage::NewFromGenerator(gen.release(), nu llptr));
822 if (!image) { 822 if (!image) {
823 return "Could not create image from codec image generator."; 823 return "Could not create image from codec image generator.";
824 } 824 }
825 canvas->drawImage(image, 0, 0); 825 canvas->drawImage(image, 0, 0);
826 return ""; 826 return "";
827 } 827 }
828 828
829 // Test various color and alpha types on CPU 829 // Test various color and alpha types on CPU
830 SkImageInfo decodeInfo = gen->getInfo().makeAlphaType(fDstAlphaType); 830 SkImageInfo decodeInfo = gen->getInfo().makeAlphaType(fDstAlphaType);
831 831
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
1495 skr.visit<void>(i, drawsAsSingletonPictures); 1495 skr.visit<void>(i, drawsAsSingletonPictures);
1496 } 1496 }
1497 SkAutoTUnref<SkPicture> macroPic(macroRec.endRecordingAsPicture()); 1497 SkAutoTUnref<SkPicture> macroPic(macroRec.endRecordingAsPicture());
1498 1498
1499 canvas->drawPicture(macroPic); 1499 canvas->drawPicture(macroPic);
1500 return check_against_reference(bitmap, src, fSink); 1500 return check_against_reference(bitmap, src, fSink);
1501 }); 1501 });
1502 } 1502 }
1503 1503
1504 } // namespace DM 1504 } // namespace DM
OLDNEW
« no previous file with comments | « dm/DM.cpp ('k') | example/HelloWorld.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698