Don't consider a Bluetooth adapter present until it has an address.
[chromium-blink-merge.git] / cc / SkPictureCanvasLayerTextureUpdater.h
blob2635ff7dc7d4532cc1389f35f06b53f10677e92c
1 // Copyright 2011 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.
6 #ifndef SkPictureCanvasLayerTextureUpdater_h
7 #define SkPictureCanvasLayerTextureUpdater_h
9 #if USE(ACCELERATED_COMPOSITING)
11 #include "CanvasLayerTextureUpdater.h"
12 #include "SkPicture.h"
14 class SkCanvas;
16 namespace WebCore {
18 class LayerPainterChromium;
20 // This class records the contentRect into an SkPicture. Subclasses, provide
21 // different implementations of tile updating based on this recorded picture.
22 // The BitmapSkPictureCanvasLayerTextureUpdater and
23 // FrameBufferSkPictureCanvasLayerTextureUpdater are two examples of such
24 // implementations.
25 class SkPictureCanvasLayerTextureUpdater : public CanvasLayerTextureUpdater {
26 public:
27 virtual ~SkPictureCanvasLayerTextureUpdater();
29 virtual void setOpaque(bool) OVERRIDE;
31 protected:
32 explicit SkPictureCanvasLayerTextureUpdater(PassOwnPtr<LayerPainterChromium>);
34 virtual void prepareToUpdate(const IntRect& contentRect, const IntSize& tileSize, float contentsWidthScale, float contentsHeightScale, IntRect& resultingOpaqueRect, CCRenderingStats&) OVERRIDE;
35 void drawPicture(SkCanvas*);
37 bool layerIsOpaque() const { return m_layerIsOpaque; }
39 private:
40 // Recording canvas.
41 SkPicture m_picture;
42 // True when it is known that all output pixels will be opaque.
43 bool m_layerIsOpaque;
46 } // namespace WebCore
47 #endif // USE(ACCELERATED_COMPOSITING)
48 #endif // SkPictureCanvasLayerTextureUpdater_h