summaryrefslogtreecommitdiffstats
path: root/ppapi/shared_impl/image_data_impl.h
blob: 1d2f76f5bed271eb8d560c1d69371c174bf30ad0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright (c) 2011 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.

#ifndef PPAPI_SHARED_IMPL_IMAGE_DATA_IMPL_H_
#define PPAPI_SHARED_IMPL_IMAGE_DATA_IMPL_H_

#include "ppapi/c/pp_bool.h"
#include "ppapi/c/ppb_image_data.h"

namespace ppapi {

// Contains the implementation of some simple image data functions that are
// shared between the proxy and Chrome's implementation. Since these functions
// are just lists of what we support, it's much easier to just have the same
// code run in the plugin process than to proxy it.
//
// It's possible the implementation will get more complex. In this case, it's
// probably best to have some kind of "configuration" message that the renderer
// sends to the plugin process on startup that contains all of these kind of
// settings.
class ImageDataImpl {
 public:
  static PP_ImageDataFormat GetNativeImageDataFormat();
  static bool IsImageDataFormatSupported(PP_ImageDataFormat format);
};

}  // namespace ppapi

#endif  // PPAPI_SHARED_IMPL_IMAGE_DATA_IMPL_H_