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/gpu/GrRectanizer_skyline.h

Issue 1413483004: Revert of Update Layer Hoisting to store its atlas texture in the resource cache (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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/gpu/GrLayerHoister.cpp ('k') | src/gpu/GrResourceCache.h » ('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 2014 Google Inc. 2 * Copyright 2014 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 GrRectanizer_skyline_DEFINED 8 #ifndef GrRectanizer_skyline_DEFINED
9 #define GrRectanizer_skyline_DEFINED 9 #define GrRectanizer_skyline_DEFINED
10 10
11 #include "GrRectanizer.h" 11 #include "GrRectanizer.h"
12 #include "SkTDArray.h" 12 #include "SkTDArray.h"
13 13
14 // Pack rectangles and track the current silhouette 14 // Pack rectangles and track the current silhouette
15 // Based, in part, on Jukka Jylanki's work at http://clb.demon.fi 15 // Based, in part, on Jukka Jylanki's work at http://clb.demon.fi
16 class GrRectanizerSkyline : public GrRectanizer { 16 class GrRectanizerSkyline : public GrRectanizer {
17 public: 17 public:
18 GrRectanizerSkyline(int w, int h) : INHERITED(w, h) { 18 GrRectanizerSkyline(int w, int h) : INHERITED(w, h) {
19 this->reset(); 19 this->reset();
20 } 20 }
21 21
22 ~GrRectanizerSkyline() override { } 22 virtual ~GrRectanizerSkyline() { }
23 23
24 void reset() override { 24 void reset() override{
25 fAreaSoFar = 0; 25 fAreaSoFar = 0;
26 fSkyline.reset(); 26 fSkyline.reset();
27 SkylineSegment* seg = fSkyline.append(1); 27 SkylineSegment* seg = fSkyline.append(1);
28 seg->fX = 0; 28 seg->fX = 0;
29 seg->fY = 0; 29 seg->fY = 0;
30 seg->fWidth = this->width(); 30 seg->fWidth = this->width();
31 } 31 }
32 32
33 bool addRect(int w, int h, SkIPoint16* loc) override; 33 bool addRect(int w, int h, SkIPoint16* loc) override;
34 34
(...skipping 18 matching lines...) Expand all
53 // 'skylineIndex's segment. 53 // 'skylineIndex's segment.
54 bool rectangleFits(int skylineIndex, int width, int height, int* y) const; 54 bool rectangleFits(int skylineIndex, int width, int height, int* y) const;
55 // Update the skyline structure to include a width x height rect located 55 // Update the skyline structure to include a width x height rect located
56 // at x,y. 56 // at x,y.
57 void addSkylineLevel(int skylineIndex, int x, int y, int width, int height); 57 void addSkylineLevel(int skylineIndex, int x, int y, int width, int height);
58 58
59 typedef GrRectanizer INHERITED; 59 typedef GrRectanizer INHERITED;
60 }; 60 };
61 61
62 #endif 62 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrLayerHoister.cpp ('k') | src/gpu/GrResourceCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698