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

Side by Side Diff: skia/ext/lazy_pixel_ref.h

Issue 11299277: Add LazyPixelRef ctor/dtor to fix the link error of https://bugs.webkit.org/show_bug.cgi?id=103555 (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef SKIA_EXT_LAZY_PIXEL_REF_H_ 5 #ifndef SKIA_EXT_LAZY_PIXEL_REF_H_
6 #define SKIA_EXT_LAZY_PIXEL_REF_H_ 6 #define SKIA_EXT_LAZY_PIXEL_REF_H_
7 7
8 #include "third_party/skia/include/core/SkPixelRef.h" 8 #include "third_party/skia/include/core/SkPixelRef.h"
9 #include "third_party/skia/include/core/SkRect.h" 9 #include "third_party/skia/include/core/SkRect.h"
10 10
11 namespace skia { 11 namespace skia {
12 12
13 // This class extends SkPixelRef to facilitate lazy image decoding on the impl 13 // This class extends SkPixelRef to facilitate lazy image decoding on the impl
14 // thread. 14 // thread.
15 class SK_API LazyPixelRef : public SkPixelRef { 15 class SK_API LazyPixelRef : public SkPixelRef {
16 public: 16 public:
17 LazyPixelRef() : SkPixelRef(0) {}
18 virtual ~LazyPixelRef() {}
19
17 struct PrepareParams { 20 struct PrepareParams {
18 // Clipping rect for this pixel ref. 21 // Clipping rect for this pixel ref.
19 SkIRect clip_rect; 22 SkIRect clip_rect;
20 }; 23 };
21 24
22 // Request the ImageDecodingStore to prepare image decoding for the 25 // Request the ImageDecodingStore to prepare image decoding for the
23 // given clipping rect. Returns true is succeeded, or false otherwise. 26 // given clipping rect. Returns true is succeeded, or false otherwise.
24 virtual bool PrepareToDecode(const PrepareParams& params) = 0; 27 virtual bool PrepareToDecode(const PrepareParams& params) = 0;
25 28
26 // Start decoding the image. 29 // Start decoding the image.
27 virtual void Decode() = 0; 30 virtual void Decode() = 0;
28 }; 31 };
29 32
30 } // namespace skia 33 } // namespace skia
31 34
32 #endif // SKIA_EXT_LAZY_PIXEL_REF_H_ 35 #endif // SKIA_EXT_LAZY_PIXEL_REF_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698