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

Side by Side Diff: dm/DMSrcSink.cpp

Issue 2448593002: Remove SkAutoTUnref and SkAutoTDelete from public includes. (Closed)
Patch Set: And Vulcan. Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | gm/deferredtextureimage.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 "Resources.h" 9 #include "Resources.h"
10 #include "SkAndroidCodec.h" 10 #include "SkAndroidCodec.h"
(...skipping 1753 matching lines...) Expand 10 before | Expand all | Expand 10 after
1764 Error err = src.draw(&recorder); 1764 Error err = src.draw(&recorder);
1765 if (!err.isEmpty()) { 1765 if (!err.isEmpty()) {
1766 return err; 1766 return err;
1767 } 1767 }
1768 1768
1769 // Record our macro-picture, with each draw op as its own sub-picture. 1769 // Record our macro-picture, with each draw op as its own sub-picture.
1770 SkPictureRecorder macroRec; 1770 SkPictureRecorder macroRec;
1771 SkCanvas* macroCanvas = macroRec.beginRecording(SkIntToScalar(size.width ()), 1771 SkCanvas* macroCanvas = macroRec.beginRecording(SkIntToScalar(size.width ()),
1772 SkIntToScalar(size.heigh t())); 1772 SkIntToScalar(size.heigh t()));
1773 1773
1774 SkAutoTDelete<SkDrawableList> drawables(recorder.detachDrawableList()); 1774 std::unique_ptr<SkDrawableList> drawables(recorder.detachDrawableList()) ;
1775 const SkDrawableList empty; 1775 const SkDrawableList empty;
1776 1776
1777 DrawsAsSingletonPictures drawsAsSingletonPictures = { 1777 DrawsAsSingletonPictures drawsAsSingletonPictures = {
1778 macroCanvas, 1778 macroCanvas,
1779 drawables ? *drawables : empty, 1779 drawables ? *drawables : empty,
1780 SkRect::MakeWH((SkScalar)size.width(), (SkScalar)size.height()), 1780 SkRect::MakeWH((SkScalar)size.width(), (SkScalar)size.height()),
1781 }; 1781 };
1782 for (int i = 0; i < skr.count(); i++) { 1782 for (int i = 0; i < skr.count(); i++) {
1783 skr.visit(i, drawsAsSingletonPictures); 1783 skr.visit(i, drawsAsSingletonPictures);
1784 } 1784 }
(...skipping 18 matching lines...) Expand all
1803 Error err = src.draw(&rec); 1803 Error err = src.draw(&rec);
1804 if (!err.isEmpty()) { 1804 if (!err.isEmpty()) {
1805 return err; 1805 return err;
1806 } 1806 }
1807 dl->draw(canvas); 1807 dl->draw(canvas);
1808 return check_against_reference(bitmap, src, fSink); 1808 return check_against_reference(bitmap, src, fSink);
1809 }); 1809 });
1810 } 1810 }
1811 1811
1812 } // namespace DM 1812 } // namespace DM
OLDNEW
« no previous file with comments | « no previous file | gm/deferredtextureimage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698