LCOV - code coverage report
Current view: top level - gfx/skia/skia/include/core - SkExecutor.h (source / functions) Hit Total Coverage
Test: output.info Lines: 0 2 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 2 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :  * Copyright 2017 Google Inc.
       3             :  *
       4             :  * Use of this source code is governed by a BSD-style license that can be
       5             :  * found in the LICENSE file.
       6             :  */
       7             : 
       8             : #ifndef SkExecutor_DEFINED
       9             : #define SkExecutor_DEFINED
      10             : 
      11             : #include <functional>
      12             : #include <memory>
      13             : 
      14           0 : class SkExecutor {
      15             : public:
      16             :     virtual ~SkExecutor();
      17             : 
      18             :     // Create a thread pool SkExecutor with a fixed thread count, by default the number of cores.
      19             :     static std::unique_ptr<SkExecutor> MakeThreadPool(int threads = 0);
      20             : 
      21             :     // There is always a default SkExecutor available by calling SkExecutor::GetDefault().
      22             :     static SkExecutor& GetDefault();
      23             :     static void SetDefault(SkExecutor*);  // Does not take ownership.  Not thread safe.
      24             : 
      25             :     // Add work to execute.
      26             :     virtual void add(std::function<void(void)>) = 0;
      27             : 
      28             :     // If it makes sense for this executor, use this thread to execute work for a little while.
      29           0 :     virtual void borrow() {}
      30             : };
      31             : 
      32             : #endif//SkExecutor_DEFINED

Generated by: LCOV version 1.13