cef/libcef/browser/backing_store_osr.h
Marshall Greenblatt 7d3bac19a9 Windows: Improvements to off-screen rendering support (issue #518).
- Implement support for transparency. Change the backing store to use Skia instead of GDI and to keep alpha values.
- Implement support for select popups. Requires a patch to Chromium (content_popups.patch).
- Implicitly disable accelerated compositing when using off-screen rendering.
- Introduce a new CefMouseEvent structure for representing mouse event information passed to CefBrowser methods.
- Merge cef_key_event_modifiers_t into cef_event_flags_t.
- Add a new argument to CefBrowser::Invalidate telling the browser whether to invalidate the select popup or the main view.
- Add a new cefclient "transparent-painting-enabled" command-line flag to test transparent off-screen rendering.
- Add a new cefclient "Transparency" test.
- Fix the cefclient off-screen rendering rotation effect to work even when the underlying web content is not updating.
- Add unit tests for transparent painting and select popups.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@979 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2013-01-11 23:00:39 +00:00

53 lines
1.7 KiB
C++

// Copyright (c) 2012 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 CEF_LIBCEF_BROWSER_BACKING_STORE_OSR_H_
#define CEF_LIBCEF_BROWSER_BACKING_STORE_OSR_H_
#include <vector>
#include "content/browser/renderer_host/backing_store.h"
#include "ui/gfx/canvas.h"
class CefRenderWidgetHostViewOSR;
class BackingStoreOSR : public content::BackingStore {
public:
static BackingStoreOSR* From(content::BackingStore* backing_store) {
return static_cast<BackingStoreOSR*>(backing_store);
}
// BackingStore implementation.
virtual void PaintToBackingStore(
content::RenderProcessHost* process,
TransportDIB::Id bitmap,
const gfx::Rect& bitmap_rect,
const std::vector<gfx::Rect>& copy_rects,
float scale_factor,
const base::Closure& completion_callback,
bool* scheduled_completion_callback) OVERRIDE;
virtual bool CopyFromBackingStore(const gfx::Rect& rect,
skia::PlatformBitmap* output) OVERRIDE;
virtual void ScrollBackingStore(const gfx::Vector2d& delta,
const gfx::Rect& clip_rect,
const gfx::Size& view_size) OVERRIDE;
const void* getPixels() const;
private:
// Can be instantiated only within CefRenderWidgetHostViewOSR.
friend class CefRenderWidgetHostViewOSR;
explicit BackingStoreOSR(content::RenderWidgetHost* widget,
const gfx::Size& size);
virtual ~BackingStoreOSR() {}
SkDevice device_;
SkCanvas canvas_;
DISALLOW_COPY_AND_ASSIGN(BackingStoreOSR);
};
#endif // CEF_LIBCEF_BROWSER_BACKING_STORE_OSR_H_