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

Side by Side Diff: dm/DMSrcSink.cpp

Issue 1120023003: Refugee from Dead Machine 13: New version of the convex AA tessellator Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update Created 4 years, 7 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') | gm/convex_all_line_paths.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 "SamplePipeControllers.h" 9 #include "SamplePipeControllers.h"
10 #include "SkCommonFlags.h" 10 #include "SkCommonFlags.h"
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 , fUseDFText(dfText) 341 , fUseDFText(dfText)
342 , fThreaded(threaded) {} 342 , fThreaded(threaded) {}
343 343
344 int GPUSink::enclave() const { 344 int GPUSink::enclave() const {
345 return fThreaded ? kAnyThread_Enclave : kGPU_Enclave; 345 return fThreaded ? kAnyThread_Enclave : kGPU_Enclave;
346 } 346 }
347 347
348 void PreAbandonGpuContextErrorHandler(SkError, void*) {} 348 void PreAbandonGpuContextErrorHandler(SkError, void*) {}
349 349
350 Error GPUSink::draw(const Src& src, SkBitmap* dst, SkWStream*, SkString* log) co nst { 350 Error GPUSink::draw(const Src& src, SkBitmap* dst, SkWStream*, SkString* log) co nst {
351 const SkString foo = src.name();
352 const char* bar = foo.c_str();
353 SkDebugf("%s\n", bar);
351 GrContextFactory factory; 354 GrContextFactory factory;
352 const SkISize size = src.size(); 355 const SkISize size = src.size();
353 const SkImageInfo info = 356 const SkImageInfo info =
354 SkImageInfo::Make(size.width(), size.height(), kN32_SkColorType, kPremul _SkAlphaType); 357 SkImageInfo::Make(size.width(), size.height(), kN32_SkColorType, kPremul _SkAlphaType);
355 SkAutoTUnref<SkSurface> surface( 358 SkAutoTUnref<SkSurface> surface(
356 NewGpuSurface(&factory, fContextType, fGpuAPI, info, fSampleCount, f UseDFText)); 359 NewGpuSurface(&factory, fContextType, fGpuAPI, info, fSampleCount, f UseDFText));
357 if (!surface) { 360 if (!surface) {
358 return "Could not create a surface."; 361 return "Could not create a surface.";
359 } 362 }
360 if (FLAGS_preAbandonGpuContext) { 363 if (FLAGS_preAbandonGpuContext) {
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 canvas->drawPicture(pic); 723 canvas->drawPicture(pic);
721 return ""; 724 return "";
722 } 725 }
723 SkISize size() const override { return fSrc.size(); } 726 SkISize size() const override { return fSrc.size(); }
724 Name name() const override { sk_throw(); return ""; } // No one should be calling this. 727 Name name() const override { sk_throw(); return ""; } // No one should be calling this.
725 } proxy(src); 728 } proxy(src);
726 return fSink->draw(proxy, bitmap, stream, log); 729 return fSink->draw(proxy, bitmap, stream, log);
727 } 730 }
728 731
729 } // namespace DM 732 } // namespace DM
OLDNEW
« no previous file with comments | « dm/DM.cpp ('k') | gm/convex_all_line_paths.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698