synchronous_compositor_client.h revision 868fa2fe829687343ffae624259930155e16dbd8
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_SYNCHRONOUS_COMPOSITOR_CLIENT_H_ 6#define CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_CLIENT_H_ 7 8#include "base/basictypes.h" 9 10namespace content { 11 12class SynchronousCompositor; 13 14class SynchronousCompositorClient { 15 public: 16 // Indication to the client that |compositor| is now initialized on the 17 // compositor thread, and open for business. 18 virtual void DidInitializeCompositor(SynchronousCompositor* compositor) = 0; 19 20 // Indication to the client that |compositor| is going out of scope, and 21 // must not be accessed within or after this call. 22 // NOTE if the client goes away before the compositor it must call 23 // SynchronousCompositor::SetClient(NULL) to release the back pointer. 24 virtual void DidDestroyCompositor(SynchronousCompositor* compositor) = 0; 25 26 // TODO(joth): Add scroll getters and setters. 27 28 // When true, should periodically call 29 // SynchronousCompositorOutputSurface::DemandDrawHw. Note that this value 30 // can change inside DemandDrawHw call. 31 virtual void SetContinuousInvalidate(bool invalidate) = 0; 32 33 protected: 34 SynchronousCompositorClient() {} 35 virtual ~SynchronousCompositorClient() {} 36 37 private: 38 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorClient); 39}; 40 41} // namespace content 42 43#endif // CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_CLIENT_H_ 44