~oxide-developers/oxide/oxide.trunk

« back to all changes in this revision

Viewing changes to qt/core/glue/oxide_qt_web_view_adapter.h

  • Committer: Chris Coulson
  • Date: 2015-03-25 01:40:08 UTC
  • mfrom: (1007.2.15 support-eglimage)
  • Revision ID: chris.coulson@canonical.com-20150325014008-rklnpn9pc0e0rxu8
Add an EGLImage compositing path for when share groups aren't reliable, and improve synchronization between the WebView compositor and UI compositor

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
// vim:expandtab:shiftwidth=2:tabstop=2:
2
 
// Copyright (C) 2013 Canonical Ltd.
 
2
// Copyright (C) 2013-2015 Canonical Ltd.
3
3
 
4
4
// This library is free software; you can redistribute it and/or
5
5
// modify it under the terms of the GNU Lesser General Public
36
36
#include "qt/core/glue/oxide_qt_adapter_base.h"
37
37
#include "qt/core/glue/oxide_qt_javascript_dialog_delegate.h"
38
38
 
 
39
typedef void* EGLImageKHR;
 
40
 
39
41
QT_BEGIN_NAMESPACE
40
42
class QCursor;
41
43
class QFocusEvent;
95
97
  LOCATION_BAR_MODE_HIDDEN
96
98
};
97
99
 
98
 
class Q_DECL_EXPORT AcceleratedFrameData final {
99
 
 public:
100
 
  AcceleratedFrameData(unsigned int id)
101
 
      : texture_id_(id) {}
102
 
  ~AcceleratedFrameData() {}
103
 
 
104
 
  unsigned int texture_id() const { return texture_id_; }
105
 
 
106
 
 private:
107
 
  unsigned int texture_id_;
108
 
};
109
 
 
110
100
class Q_DECL_EXPORT CompositorFrameHandle {
111
101
 public:
112
102
  virtual ~CompositorFrameHandle() {}
114
104
  enum Type {
115
105
    TYPE_INVALID,
116
106
    TYPE_SOFTWARE,
117
 
    TYPE_ACCELERATED
 
107
    TYPE_ACCELERATED,
 
108
    TYPE_IMAGE
118
109
  };
119
110
 
120
111
  virtual Type GetType() = 0;
121
112
  virtual const QRect& GetRect() const = 0;
122
113
 
123
114
  virtual QImage GetSoftwareFrame() = 0;
124
 
  virtual AcceleratedFrameData GetAcceleratedFrame() = 0;
 
115
  virtual unsigned int GetAcceleratedFrameTexture() = 0;
 
116
  virtual EGLImageKHR GetImageFrame() = 0;
125
117
};
126
118
 
127
119
class Q_DECL_EXPORT WebViewAdapter : public AdapterBase {