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

Side by Side Diff: src/core/SkCanvas.cpp

Issue 855473002: initial preroll api (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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 | « src/core/SkBitmapProcShader.cpp ('k') | src/core/SkPicturePreroll.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 2008 The Android Open Source Project 2 * Copyright 2008 The Android Open Source Project
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 #include "SkCanvas.h" 8 #include "SkCanvas.h"
9 #include "SkCanvasDrawable.h" 9 #include "SkCanvasDrawable.h"
10 #include "SkCanvasPriv.h" 10 #include "SkCanvasPriv.h"
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 : INHERITED(make_nopixels(bounds.width(), bounds.height())) 475 : INHERITED(make_nopixels(bounds.width(), bounds.height()))
476 { 476 {
477 this->setOrigin(bounds.x(), bounds.y()); 477 this->setOrigin(bounds.x(), bounds.y());
478 } 478 }
479 479
480 private: 480 private:
481 481
482 typedef SkBitmapDevice INHERITED; 482 typedef SkBitmapDevice INHERITED;
483 }; 483 };
484 484
485 SkCanvas::SkCanvas(int width, int height) 485 SkCanvas::SkCanvas(int width, int height, const SkSurfaceProps* props)
486 : fMCStack(sizeof(MCRec), fMCRecStorage, sizeof(fMCRecStorage)) 486 : fMCStack(sizeof(MCRec), fMCRecStorage, sizeof(fMCRecStorage))
487 , fProps(SkSurfaceProps::kLegacyFontHost_InitType) 487 , fProps(SkSurfacePropsCopyOrDefault(props))
488 { 488 {
489 inc_canvas(); 489 inc_canvas();
490 490
491 this->init(SkNEW_ARGS(SkNoPixelsBitmapDevice, 491 this->init(SkNEW_ARGS(SkNoPixelsBitmapDevice,
492 (SkIRect::MakeWH(width, height))), kDefault_InitFlags) ->unref(); 492 (SkIRect::MakeWH(width, height))), kDefault_InitFlags) ->unref();
493 } 493 }
494 494
495 SkCanvas::SkCanvas(const SkIRect& bounds, InitFlags flags) 495 SkCanvas::SkCanvas(const SkIRect& bounds, InitFlags flags)
496 : fMCStack(sizeof(MCRec), fMCRecStorage, sizeof(fMCRecStorage)) 496 : fMCStack(sizeof(MCRec), fMCRecStorage, sizeof(fMCRecStorage))
497 , fProps(SkSurfaceProps::kLegacyFontHost_InitType) 497 , fProps(SkSurfaceProps::kLegacyFontHost_InitType)
(...skipping 2078 matching lines...) Expand 10 before | Expand all | Expand 10 after
2576 } 2576 }
2577 2577
2578 if (matrix) { 2578 if (matrix) {
2579 canvas->concat(*matrix); 2579 canvas->concat(*matrix);
2580 } 2580 }
2581 } 2581 }
2582 2582
2583 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { 2583 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() {
2584 fCanvas->restoreToCount(fSaveCount); 2584 fCanvas->restoreToCount(fSaveCount);
2585 } 2585 }
OLDNEW
« no previous file with comments | « src/core/SkBitmapProcShader.cpp ('k') | src/core/SkPicturePreroll.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698