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

Unified Diff: cc/skpicture_canvas_layer_texture_updater.h

Issue 11122003: [cc] Rename all cc/ filenames to Chromium style (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/single_thread_proxy.cc ('k') | cc/skpicture_canvas_layer_texture_updater.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/skpicture_canvas_layer_texture_updater.h
diff --git a/cc/skpicture_canvas_layer_texture_updater.h b/cc/skpicture_canvas_layer_texture_updater.h
index 638cbb270ce9b24689d5095baf174ade4f4d1a13..fd9bb5fccd170383de814df2c0b61b11d2777a55 100644
--- a/cc/skpicture_canvas_layer_texture_updater.h
+++ b/cc/skpicture_canvas_layer_texture_updater.h
@@ -1,3 +1,48 @@
-// Copyright 2012 The Chromium Authors. All rights reserved.
+// Copyright 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+
+
+#ifndef SkPictureCanvasLayerTextureUpdater_h
+#define SkPictureCanvasLayerTextureUpdater_h
+
+#if USE(ACCELERATED_COMPOSITING)
+
+#include "CanvasLayerTextureUpdater.h"
+#include "SkPicture.h"
+
+class SkCanvas;
+
+namespace cc {
+
+class LayerPainterChromium;
+
+// This class records the contentRect into an SkPicture. Subclasses, provide
+// different implementations of tile updating based on this recorded picture.
+// The BitmapSkPictureCanvasLayerTextureUpdater and
+// FrameBufferSkPictureCanvasLayerTextureUpdater are two examples of such
+// implementations.
+class SkPictureCanvasLayerTextureUpdater : public CanvasLayerTextureUpdater {
+public:
+ virtual ~SkPictureCanvasLayerTextureUpdater();
+
+ virtual void setOpaque(bool) OVERRIDE;
+
+protected:
+ explicit SkPictureCanvasLayerTextureUpdater(PassOwnPtr<LayerPainterChromium>);
+
+ virtual void prepareToUpdate(const IntRect& contentRect, const IntSize& tileSize, float contentsWidthScale, float contentsHeightScale, IntRect& resultingOpaqueRect, CCRenderingStats&) OVERRIDE;
+ void drawPicture(SkCanvas*);
+
+ bool layerIsOpaque() const { return m_layerIsOpaque; }
+
+private:
+ // Recording canvas.
+ SkPicture m_picture;
+ // True when it is known that all output pixels will be opaque.
+ bool m_layerIsOpaque;
+};
+
+} // namespace cc
+#endif // USE(ACCELERATED_COMPOSITING)
+#endif // SkPictureCanvasLayerTextureUpdater_h
« no previous file with comments | « cc/single_thread_proxy.cc ('k') | cc/skpicture_canvas_layer_texture_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698