Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Side by Side Diff: cc/SkPictureCanvasLayerTextureUpdater.h

Issue 10915065: Add PlatformPictureSkia and RecordingPlatformDeviceSkia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add IsPlatformPaintSupported(), update comment in WebPluginDelegateProxy::Paint and require direct … Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 5
6 #ifndef SkPictureCanvasLayerTextureUpdater_h 6 #ifndef SkPictureCanvasLayerTextureUpdater_h
7 #define SkPictureCanvasLayerTextureUpdater_h 7 #define SkPictureCanvasLayerTextureUpdater_h
8 8
9 #if USE(ACCELERATED_COMPOSITING) 9 #if USE(ACCELERATED_COMPOSITING)
10 10
11 #include "CanvasLayerTextureUpdater.h" 11 #include "CanvasLayerTextureUpdater.h"
12 #include "SkPicture.h"
13 12
14 class SkCanvas; 13 class SkCanvas;
15 14
15 namespace skia {
16 class PlatformPictureSkia;
17 }
18
16 namespace cc { 19 namespace cc {
17 20
18 class LayerPainterChromium; 21 class LayerPainterChromium;
19 22
20 // This class records the contentRect into an SkPicture. Subclasses, provide 23 // This class records the contentRect into an SkPicture. Subclasses, provide
21 // different implementations of tile updating based on this recorded picture. 24 // different implementations of tile updating based on this recorded picture.
22 // The BitmapSkPictureCanvasLayerTextureUpdater and 25 // The BitmapSkPictureCanvasLayerTextureUpdater and
23 // FrameBufferSkPictureCanvasLayerTextureUpdater are two examples of such 26 // FrameBufferSkPictureCanvasLayerTextureUpdater are two examples of such
24 // implementations. 27 // implementations.
25 class SkPictureCanvasLayerTextureUpdater : public CanvasLayerTextureUpdater { 28 class SkPictureCanvasLayerTextureUpdater : public CanvasLayerTextureUpdater {
26 public: 29 public:
27 virtual ~SkPictureCanvasLayerTextureUpdater(); 30 virtual ~SkPictureCanvasLayerTextureUpdater();
28 31
29 virtual void setOpaque(bool) OVERRIDE; 32 virtual void setOpaque(bool) OVERRIDE;
30 33
31 protected: 34 protected:
32 explicit SkPictureCanvasLayerTextureUpdater(PassOwnPtr<LayerPainterChromium> ); 35 explicit SkPictureCanvasLayerTextureUpdater(PassOwnPtr<LayerPainterChromium> );
33 36
34 virtual void prepareToUpdate(const IntRect& contentRect, const IntSize& tile Size, float contentsWidthScale, float contentsHeightScale, IntRect& resultingOpa queRect, CCRenderingStats&) OVERRIDE; 37 virtual void prepareToUpdate(const IntRect& contentRect, const IntSize& tile Size, float contentsWidthScale, float contentsHeightScale, IntRect& resultingOpa queRect, CCRenderingStats&) OVERRIDE;
35 void drawPicture(SkCanvas*); 38 void drawPictureInto(SkCanvas*);
36 39
37 bool layerIsOpaque() const { return m_layerIsOpaque; } 40 bool layerIsOpaque() const { return m_layerIsOpaque; }
38 41
39 private: 42 private:
40 // Recording canvas. 43 // Recording canvas.
41 SkPicture m_picture; 44 OwnPtr<skia::PlatformPictureSkia> m_picture;
42 // True when it is known that all output pixels will be opaque. 45 // True when it is known that all output pixels will be opaque.
43 bool m_layerIsOpaque; 46 bool m_layerIsOpaque;
44 }; 47 };
45 48
46 } // namespace cc 49 } // namespace cc
47 #endif // USE(ACCELERATED_COMPOSITING) 50 #endif // USE(ACCELERATED_COMPOSITING)
48 #endif // SkPictureCanvasLayerTextureUpdater_h 51 #endif // SkPictureCanvasLayerTextureUpdater_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698