15d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// Copyright 2014 The Chromium Authors. All rights reserved. 21e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 31e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)// found in the LICENSE file. 41e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) 55d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#ifndef CONTENT_BROWSER_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_OZONE_H_ 65d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#define CONTENT_BROWSER_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_OZONE_H_ 71e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) 81e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)#include "cc/output/software_output_device.h" 9f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#include "content/common/content_export.h" 10f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#include "ui/gfx/native_widget_types.h" 111e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) 121e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)namespace ui { 131e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)class Compositor; 14c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdochclass SurfaceOzoneCanvas; 15e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdoch} 16e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdoch 171e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)namespace content { 181e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) 191e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)// Ozone implementation which relies on software rendering. Ozone will present 201e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)// an accelerated widget as a SkCanvas. SoftwareOutputDevice will then use the 211e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)// Ozone provided canvas to draw. 22f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)class CONTENT_EXPORT SoftwareOutputDeviceOzone 23f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) : public cc::SoftwareOutputDevice { 241e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) public: 251e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) explicit SoftwareOutputDeviceOzone(ui::Compositor* compositor); 261e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) virtual ~SoftwareOutputDeviceOzone(); 271e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) 28cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) virtual void Resize(const gfx::Size& viewport_pixel_size, 29cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) float scale_factor) OVERRIDE; 305d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) virtual SkCanvas* BeginPaint(const gfx::Rect& damage_rect) OVERRIDE; 311e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) virtual void EndPaint(cc::SoftwareFrameData* frame_data) OVERRIDE; 321e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) 331e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) private: 341e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) ui::Compositor* compositor_; 351e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) 366d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles) scoped_ptr<ui::SurfaceOzoneCanvas> surface_ozone_; 37f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 381e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) DISALLOW_COPY_AND_ASSIGN(SoftwareOutputDeviceOzone); 391e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)}; 401e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) 411e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)} // namespace content 421e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) 435d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#endif // CONTENT_BROWSER_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_OZONE_H_ 44