gpu_canvas.cc 657 字节
Newer Older
1 2 3 4
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

5
#include "gpu_canvas.h"
6 7
#include "gpu_canvas_gl.h"
#include "gpu_canvas_vulkan.h"
8 9 10

namespace shell {

11 12 13 14 15 16 17 18 19 20 21 22 23
GPUCanvas::~GPUCanvas() = default;

std::unique_ptr<GPUCanvas> GPUCanvas::CreatePlatformCanvas(
    const PlatformView& platform_view) {
  std::unique_ptr<GPUCanvas> canvas;

  // TODO: Vulkan capability detection will be added here to return a differnt
  // canvas instance.

  canvas.reset(new GPUCanvasGL(platform_view.DefaultFramebuffer()));

  return canvas;
}
24 25

}  // namespace shell