Changeset View
Changeset View
Standalone View
Standalone View
scene.h
Show First 20 Lines • Show All 419 Lines • ▼ Show 20 Line(s) | 403 | public: | |||
---|---|---|---|---|---|
420 | * @return The native X11 pixmap handle | 420 | * @return The native X11 pixmap handle | ||
421 | */ | 421 | */ | ||
422 | xcb_pixmap_t pixmap() const; | 422 | xcb_pixmap_t pixmap() const; | ||
423 | /** | 423 | /** | ||
424 | * @return The Wayland BufferInterface for this WindowPixmap. | 424 | * @return The Wayland BufferInterface for this WindowPixmap. | ||
425 | */ | 425 | */ | ||
426 | QPointer<KWayland::Server::BufferInterface> buffer() const; | 426 | QPointer<KWayland::Server::BufferInterface> buffer() const; | ||
427 | const QSharedPointer<QOpenGLFramebufferObject> &fbo() const; | 427 | const QSharedPointer<QOpenGLFramebufferObject> &fbo() const; | ||
428 | QImage internalImage() const; | ||||
428 | /** | 429 | /** | ||
429 | * @brief Whether this WindowPixmap is considered as discarded. This means the window has changed in a way that a new | 430 | * @brief Whether this WindowPixmap is considered as discarded. This means the window has changed in a way that a new | ||
430 | * WindowPixmap should have been created already. | 431 | * WindowPixmap should have been created already. | ||
431 | * | 432 | * | ||
432 | * @return @c true if this WindowPixmap is considered as discarded, @c false otherwise. | 433 | * @return @c true if this WindowPixmap is considered as discarded, @c false otherwise. | ||
433 | * @see markAsDiscarded | 434 | * @see markAsDiscarded | ||
434 | */ | 435 | */ | ||
435 | bool isDiscarded() const; | 436 | bool isDiscarded() const; | ||
▲ Show 20 Lines • Show All 71 Lines • ▼ Show 20 Line(s) | |||||
507 | private: | 508 | private: | ||
508 | Scene::Window *m_window; | 509 | Scene::Window *m_window; | ||
509 | xcb_pixmap_t m_pixmap; | 510 | xcb_pixmap_t m_pixmap; | ||
510 | QSize m_pixmapSize; | 511 | QSize m_pixmapSize; | ||
511 | bool m_discarded; | 512 | bool m_discarded; | ||
512 | QRect m_contentsRect; | 513 | QRect m_contentsRect; | ||
513 | QPointer<KWayland::Server::BufferInterface> m_buffer; | 514 | QPointer<KWayland::Server::BufferInterface> m_buffer; | ||
514 | QSharedPointer<QOpenGLFramebufferObject> m_fbo; | 515 | QSharedPointer<QOpenGLFramebufferObject> m_fbo; | ||
516 | QImage m_internalImage; | ||||
515 | WindowPixmap *m_parent = nullptr; | 517 | WindowPixmap *m_parent = nullptr; | ||
516 | QVector<WindowPixmap*> m_children; | 518 | QVector<WindowPixmap*> m_children; | ||
517 | QPointer<KWayland::Server::SubSurfaceInterface> m_subSurface; | 519 | QPointer<KWayland::Server::SubSurfaceInterface> m_subSurface; | ||
518 | }; | 520 | }; | ||
519 | 521 | | |||
520 | class Scene::EffectFrame | 522 | class Scene::EffectFrame | ||
521 | { | 523 | { | ||
522 | public: | 524 | public: | ||
▲ Show 20 Lines • Show All 90 Lines • ▼ Show 20 Line(s) | |||||
613 | } | 615 | } | ||
614 | 616 | | |||
615 | inline | 617 | inline | ||
616 | const QSharedPointer<QOpenGLFramebufferObject> &WindowPixmap::fbo() const | 618 | const QSharedPointer<QOpenGLFramebufferObject> &WindowPixmap::fbo() const | ||
617 | { | 619 | { | ||
618 | return m_fbo; | 620 | return m_fbo; | ||
619 | } | 621 | } | ||
620 | 622 | | |||
623 | inline | ||||
624 | QImage WindowPixmap::internalImage() const | ||||
625 | { | ||||
626 | return m_internalImage; | ||||
627 | } | ||||
628 | | ||||
621 | template <typename T> | 629 | template <typename T> | ||
622 | inline | 630 | inline | ||
623 | T* Scene::Window::windowPixmap() | 631 | T* Scene::Window::windowPixmap() | ||
624 | { | 632 | { | ||
625 | if (m_currentPixmap.isNull()) { | 633 | if (m_currentPixmap.isNull()) { | ||
626 | m_currentPixmap.reset(createWindowPixmap()); | 634 | m_currentPixmap.reset(createWindowPixmap()); | ||
627 | } | 635 | } | ||
628 | if (m_currentPixmap->isValid()) { | 636 | if (m_currentPixmap->isValid()) { | ||
▲ Show 20 Lines • Show All 59 Lines • Show Last 20 Lines |