LCOV - code coverage report
Current view: top level - gfx/skia/skia/src/gpu - GrGpuFactory.cpp (source / functions) Hit Total Coverage
Test: output.info Lines: 0 8 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 2011 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             : 
       9             : #include "GrGpuFactory.h"
      10             : 
      11             : #include "GrGpu.h"
      12             : #include "gl/GrGLConfig.h"
      13             : #include "gl/GrGLGpu.h"
      14             : #ifdef SK_VULKAN
      15             : #include "vk/GrVkGpu.h"
      16             : #endif
      17             : 
      18             : static CreateGpuProc gGpuFactories[kBackendCount] = { GrGLGpu::Create, nullptr };
      19             : 
      20             : #ifdef SK_VULKAN
      21             : GrGpuFactoryRegistrar gVkGpuFactoryProc(kVulkan_GrBackend, GrVkGpu::Create);
      22             : #endif
      23             : 
      24           0 : GrGpuFactoryRegistrar::GrGpuFactoryRegistrar(int i, CreateGpuProc proc) {
      25           0 :     gGpuFactories[i] = proc;
      26           0 : }
      27             : 
      28           0 : GrGpu* GrGpu::Create(GrBackend backend,
      29             :                      GrBackendContext backendContext,
      30             :                      const GrContextOptions& options,
      31             :                      GrContext* context) {
      32           0 :     SkASSERT((int)backend < kBackendCount);
      33           0 :     if (!gGpuFactories[backend]) {
      34           0 :         return nullptr;
      35             :     }
      36           0 :     return (gGpuFactories[backend])(backendContext, options, context);
      37             : }

Generated by: LCOV version 1.13