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

Side by Side Diff: include/core/SkSurface.h

Issue 128933004: use SkImageInfo directly, instead of converting to SkBitmap::Config (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 11 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
« no previous file with comments | « no previous file | src/image/SkSurface.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkSurface_DEFINED 8 #ifndef SkSurface_DEFINED
9 #define SkSurface_DEFINED 9 #define SkSurface_DEFINED
10 10
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 * Thought the caller could get a snapshot image explicitly, and draw that, 146 * Thought the caller could get a snapshot image explicitly, and draw that,
147 * it seems that directly drawing a surface into another canvas might be 147 * it seems that directly drawing a surface into another canvas might be
148 * a common pattern, and that we could possibly be more efficient, since 148 * a common pattern, and that we could possibly be more efficient, since
149 * we'd know that the "snapshot" need only live until we've handed it off 149 * we'd know that the "snapshot" need only live until we've handed it off
150 * to the canvas. 150 * to the canvas.
151 */ 151 */
152 void draw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*); 152 void draw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*);
153 153
154 protected: 154 protected:
155 SkSurface(int width, int height); 155 SkSurface(int width, int height);
156 SkSurface(const SkImageInfo&);
156 157
157 // called by subclass if their contents have changed 158 // called by subclass if their contents have changed
158 void dirtyGenerationID() { 159 void dirtyGenerationID() {
159 fGenerationID = 0; 160 fGenerationID = 0;
160 } 161 }
161 162
162 private: 163 private:
163 const int fWidth; 164 const int fWidth;
164 const int fHeight; 165 const int fHeight;
165 uint32_t fGenerationID; 166 uint32_t fGenerationID;
166 167
167 typedef SkRefCnt INHERITED; 168 typedef SkRefCnt INHERITED;
168 }; 169 };
169 170
170 #endif 171 #endif
OLDNEW
« no previous file with comments | « no previous file | src/image/SkSurface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698