<commit_before>﻿/**
Copyright 2014-2017 <NAME> and Associates

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
**/
using System.Drawing;
using Rhino;
using Rhino.Render;
using RhinoCyclesCore.RenderEngines;

namespace RhinoCycles
{
	/// <summary>
	/// For asynchronous renderer this is just the entry point.
	/// 
	/// Inherits Rhino.Render.RenderPipeline
	/// <seealso cref="Rhino.Render.RenderPipeline"/>
	/// </summary>
	public class RenderPipeline : Rhino.Render.RenderPipeline
	{
		private bool m_bStopFlag;
		/// <summary>
		/// Context that contains the actual renderer instance
		/// </summary>
		readonly private ModalRenderEngine cyclesEngine;

		public RenderPipeline(RhinoDoc doc, Rhino.Commands.RunMode mode, Rhino.PlugIns.RenderPlugIn plugin, ModalRenderEngine aRC)
			: base(doc, mode, plugin, RenderSize(doc, true),
					"Cycles for Rhino", Rhino.Render.RenderWindow.StandardChannels.RGBA, false, false)
		{
			cyclesEngine = (ModalRenderEngine)aRC;
		}

		public bool Cancel()
		{
			return m_bStopFlag;
		}

		protected override bool OnRenderBegin()
		{
			m_bStopFlag = false;
			return cyclesEngine.StartRenderThread(cyclesEngine.Renderer, "A cool Cycles modal rendering thread");
		}

		protected override bool OnRenderBeginQuiet(Size imageSize)<commit_msg>Actually call the new Rhino Render Rhino Render.<commit_after>﻿/**
Copyright 2014-2017 <NAME> and Associates

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
**/
using System.Drawing;
using Rhino;
using Rhino.Render;
using RhinoCyclesCore.RenderEngines;

namespace RhinoCycles
{
	/// <summary>
	/// For asynchronous renderer this is just the entry point.
	/// 
	/// Inherits Rhino.Render.RenderPipeline
	/// <seealso cref="Rhino.Render.RenderPipeline"/>
	/// </summary>
	public class RenderPipeline : Rhino.Render.RenderPipeline
	{
		private bool m_bStopFlag;
		/// <summary>
		/// Context that contains the actual renderer instance
		/// </summary>
		readonly private ModalRenderEngine cyclesEngine;

		public RenderPipeline(RhinoDoc doc, Rhino.Commands.RunMode mode, Rhino.PlugIns.RenderPlugIn plugin, ModalRenderEngine aRC)
			: base(doc, mode, plugin, RenderSize(doc, true),
					"Rhino Render", Rhino.Render.RenderWindow.StandardChannels.RGBA, false, false)
		{
			cyclesEngine = (ModalRenderEngine)aRC;
		}

		public bool Cancel()
		{
			return m_bStopFlag;
		}

		protected override bool OnRenderBegin()
		{
			m_bStopFlag = false;
			return cyclesEngine.StartRenderThread(cyclesEngine.Renderer, "A cool Cycles modal rendering thread");
		}

		protected override bool OnRenderBeginQuiet(Size imageSize)
{'fraction_non_alphanumeric': 0.0875106202209006, 'fraction_numerical': 0.006796941376380629, 'mean_word_length': 4.319277108433735, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1408712', 'n_tokens_mistral': 1107, 'n_tokens_neox': 999, 'n_words': 355}