compositor_client.h revision d0247b1b59f9c528cb6df88b4f2b9afaf80d181e
1// Copyright 2013 The Chromium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5#ifndef CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_CLIENT_H_ 6#define CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_CLIENT_H_ 7 8#include "content/common/content_export.h" 9 10namespace content { 11 12class CONTENT_EXPORT CompositorClient { 13 public: 14 // Tells the client that it should schedule a composite. 15 virtual void ScheduleComposite() = 0; 16 17 // The compositor has completed swapping a frame. 18 virtual void OnSwapBuffersCompleted() {} 19 20 // The compositor will eventually swap a frame. 21 virtual void OnSwapBuffersPosted() {} 22 23 // Tells the client that GL resources were lost and need to be reinitialized. 24 virtual void DidLoseResources() {} 25 26 protected: 27 CompositorClient() {} 28 virtual ~CompositorClient() {} 29 30 private: 31 DISALLOW_COPY_AND_ASSIGN(CompositorClient); 32}; 33 34} // namespace content 35 36#endif // CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_CLIENT_H_ 37