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

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

Issue 2176383002: start on apply gamma cleanup (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | src/image/SkImage_Gpu.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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 /** 332 /**
333 * Though the caller could get a snapshot image explicitly, and draw that, 333 * Though the caller could get a snapshot image explicitly, and draw that,
334 * it seems that directly drawing a surface into another canvas might be 334 * it seems that directly drawing a surface into another canvas might be
335 * a common pattern, and that we could possibly be more efficient, since 335 * a common pattern, and that we could possibly be more efficient, since
336 * we'd know that the "snapshot" need only live until we've handed it off 336 * we'd know that the "snapshot" need only live until we've handed it off
337 * to the canvas. 337 * to the canvas.
338 */ 338 */
339 void draw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*); 339 void draw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*);
340 340
341 /** 341 /**
342 * Copies contents of image to this surface, while applying a gamma curve. F ails if the image
343 * and surface are not ideniticaly sized. Fails if the surface is not gpu ba cked. This ignores
344 * all SkCanvas state including the SkCanvas layer stack.
345 */
346 bool blitWithGamma(SkImage* image, SkScalar gamma);
347
348 /**
342 * If the surface has direct access to its pixels (i.e. they are in local 349 * If the surface has direct access to its pixels (i.e. they are in local
343 * RAM) return true, and if not null, set the pixmap parameter to point to the information 350 * RAM) return true, and if not null, set the pixmap parameter to point to the information
344 * about the surface's pixels. The pixel address in the pixmap is only vali d while 351 * about the surface's pixels. The pixel address in the pixmap is only vali d while
345 * the surface object is in scope, and no API call is made on the surface 352 * the surface object is in scope, and no API call is made on the surface
346 * or its canvas. 353 * or its canvas.
347 * 354 *
348 * On failure, returns false and the pixmap parameter is ignored. 355 * On failure, returns false and the pixmap parameter is ignored.
349 */ 356 */
350 bool peekPixels(SkPixmap*); 357 bool peekPixels(SkPixmap*);
351 358
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 private: 400 private:
394 const SkSurfaceProps fProps; 401 const SkSurfaceProps fProps;
395 const int fWidth; 402 const int fWidth;
396 const int fHeight; 403 const int fHeight;
397 uint32_t fGenerationID; 404 uint32_t fGenerationID;
398 405
399 typedef SkRefCnt INHERITED; 406 typedef SkRefCnt INHERITED;
400 }; 407 };
401 408
402 #endif 409 #endif
OLDNEW
« no previous file with comments | « no previous file | src/image/SkImage_Gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698