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

Unified Diff: cc/image.h

Issue 11453014: Implement the logic to kick off image decoding jobs for TileManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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/cc.gyp ('k') | cc/image.cc » ('j') | cc/image.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/image.h
diff --git a/cc/image.h b/cc/image.h
new file mode 100644
index 0000000000000000000000000000000000000000..3c9faaeed72c221e56c765af1a301563ef37228c
--- /dev/null
+++ b/cc/image.h
@@ -0,0 +1,36 @@
+// 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 CC_IMAGE_H_
+#define CC_IMAGE_H_
+
+#include "base/basictypes.h"
+#include "base/memory/ref_counted.h"
+#include "cc/cc_export.h"
+#include "skia/ext/refptr.h"
+#include "third_party/skia/include/core/SkPixelRef.h"
+
+namespace cc {
+
+class CC_EXPORT Image : public base::RefCountedThreadSafe<Image> {
reveman 2012/12/05 19:48:46 Does this need thread safe ref counting?
qinmin 2012/12/07 05:06:28 Not necessarily, just to ensure when passing it to
+public:
+ static scoped_refptr<Image> Create(SkPixelRef* pixel_ref);
reveman 2012/12/05 19:48:46 nit: maybe a blank line between static and normal
qinmin 2012/12/07 05:06:28 Done.
+ void Decode();
Alpha Left Google 2012/12/05 20:24:28 Need some comments here. Decode() is to populate
qinmin 2012/12/07 05:06:28 Done.
+ bool PrepareToDecode();
+
+ SkPixelRef* pixel_ref() { return pixel_ref_.get(); }
+
+private:
+ explicit Image(const skia::RefPtr<SkPixelRef>&);
+ ~Image();
+
+ skia::RefPtr<SkPixelRef> pixel_ref_;
+
+ friend class base::RefCountedThreadSafe<Image>;
+ DISALLOW_COPY_AND_ASSIGN(Image);
+};
+
+} // namespace cc
+
+#endif // CC_IMAGE_H_
« no previous file with comments | « cc/cc.gyp ('k') | cc/image.cc » ('j') | cc/image.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698