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

Unified Diff: cc/image_layer_updater.h

Issue 11304020: cc: Nine patch layer. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix DCHECK failures and rebase to 166129 Created 8 years, 1 month 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/image_layer.cc ('k') | cc/image_layer_updater.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/image_layer_updater.h
diff --git a/cc/image_layer_updater.h b/cc/image_layer_updater.h
new file mode 100644
index 0000000000000000000000000000000000000000..89c26b26d94a13c4eb7787fee662b6f89a107392
--- /dev/null
+++ b/cc/image_layer_updater.h
@@ -0,0 +1,50 @@
+// Copyright 2012 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 ImageLayerUpdater_h
+#define ImageLayerUpdater_h
+
+#include "config.h"
+
+#include "cc/layer_updater.h"
+
+namespace cc {
+
+class ResourceUpdateQueue;
+
+class ImageLayerUpdater : public LayerUpdater {
+public:
+ class Resource : public LayerUpdater::Resource {
+ public:
+ Resource(ImageLayerUpdater* updater, scoped_ptr<PrioritizedTexture> texture)
+ : LayerUpdater::Resource(texture.Pass())
+ , m_updater(updater)
+ {
+ }
+
+ virtual void update(ResourceUpdateQueue&, const gfx::Rect& sourceRect, const gfx::Vector2d& destOffset, bool partialUpdate, RenderingStats&) OVERRIDE;
+
+ private:
+ ImageLayerUpdater* m_updater;
+ };
+
+ static scoped_refptr<ImageLayerUpdater> create();
+
+ virtual scoped_ptr<LayerUpdater::Resource> createResource(
+ PrioritizedTextureManager*) OVERRIDE;
+
+ void updateTexture(ResourceUpdateQueue&, PrioritizedTexture*, const gfx::Rect& sourceRect, const gfx::Vector2d& destOffset, bool partialUpdate);
+
+ void setBitmap(const SkBitmap&);
+
+private:
+ ImageLayerUpdater() { }
+ virtual ~ImageLayerUpdater() { }
+
+ SkBitmap m_bitmap;
+};
+
+}
+
+#endif
« no previous file with comments | « cc/image_layer.cc ('k') | cc/image_layer_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698