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

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

Issue 313613002: Remove legacy picture recording (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove dead files from core.gypi Created 6 years, 6 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
OLDNEW
(Empty)
1 /*
2 * Copyright 2012 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifdef SK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES
9
10 #include "SkTileGridPicture.h"
11
12 #include "SkPictureStateTree.h"
13 #include "SkTileGrid.h"
14
15 SkTileGridPicture::SkTileGridPicture(int width, int height,
16 const SkTileGridFactory::TileGridInfo& info ) {
17 SkASSERT(info.fMargin.width() >= 0);
18 SkASSERT(info.fMargin.height() >= 0);
19 fInfo = info;
20 // Note: SkIRects are non-inclusive of the right() column and bottom() row.
21 // For example, an SkIRect at 0,0 with a size of (1,1) will only have
22 // content at pixel (0,0) and will report left=0 and right=1, hence the
23 // "-1"s below.
24 fXTileCount = (width + info.fTileInterval.width() - 1) / info.fTileInterval. width();
25 fYTileCount = (height + info.fTileInterval.height() - 1) / info.fTileInterva l.height();
26 }
27
28 SkBBoxHierarchy* SkTileGridPicture::createBBoxHierarchy() const {
29 return SkNEW_ARGS(SkTileGrid, (fXTileCount, fYTileCount, fInfo,
30 SkTileGridNextDatum<SkPictureStateTree::Draw>));
31 }
32
33 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698