Commit dd0820b5 authored by Michael Spang's avatar Michael Spang Committed by Commit Bot

gfx: Clean up ClientNativePixmapFactory interface

This is a pure interface so it can inline the dtor and doesn't need to
hide the ctor.

Bug: none
Test: compile
Change-Id: Idbf3cd3ca8397b3c0883f5e7759151ff9d29ab55
Reviewed-on: https://chromium-review.googlesource.com/c/1283476
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: default avatarRobert Kroeger <rjkroege@chromium.org>
Cr-Commit-Position: refs/heads/master@{#600970}
parent 0971bd8b
......@@ -492,7 +492,6 @@ jumbo_source_set("memory_buffer_sources") {
"ca_layer_params.cc",
"ca_layer_params.h",
"client_native_pixmap.h",
"client_native_pixmap_factory.cc",
"client_native_pixmap_factory.h",
"generic_shared_memory_id.cc",
"generic_shared_memory_id.h",
......
// Copyright 2015 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.
#include "ui/gfx/client_native_pixmap_factory.h"
namespace gfx {
ClientNativePixmapFactory::ClientNativePixmapFactory() {}
ClientNativePixmapFactory::~ClientNativePixmapFactory() {}
} // namespace gfx
......@@ -23,25 +23,18 @@ class Size;
// provide a client pixmap for non-GPU processes.
class GFX_EXPORT ClientNativePixmapFactory {
public:
virtual ~ClientNativePixmapFactory();
virtual ~ClientNativePixmapFactory() {}
// Returns true if format/usage configuration is supported.
virtual bool IsConfigurationSupported(gfx::BufferFormat format,
gfx::BufferUsage usage) const = 0;
// TODO(dshwang): implement it. crbug.com/475633
// Import the native pixmap from |handle| to be used in non-GPU processes.
// This function takes ownership of any file descriptors in |handle|.
virtual std::unique_ptr<ClientNativePixmap> ImportFromHandle(
const gfx::NativePixmapHandle& handle,
const gfx::Size& size,
gfx::BufferUsage usage) = 0;
protected:
ClientNativePixmapFactory();
private:
DISALLOW_COPY_AND_ASSIGN(ClientNativePixmapFactory);
};
} // namespace gfx
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment