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

Side by Side Diff: src/gpu/GrBatchAtlas.h

Issue 1713693002: Use unorm shorts for texture coordinates when rendering text. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix tabbing Created 4 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 | « include/gpu/GrTypesPriv.h ('k') | src/gpu/GrTest.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 2015 Google Inc. 2 * Copyright 2015 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 GrBatchAtlas_DEFINED 8 #ifndef GrBatchAtlas_DEFINED
9 #define GrBatchAtlas_DEFINED 9 #define GrBatchAtlas_DEFINED
10 10
11 #include "GrTexture.h" 11 #include "GrTexture.h"
12 #include "SkPoint.h" 12 #include "SkPoint.h"
13 #include "SkTDArray.h" 13 #include "SkTDArray.h"
14 #include "SkTInternalLList.h" 14 #include "SkTInternalLList.h"
15 15
16 #include "batches/GrDrawBatch.h" 16 #include "batches/GrDrawBatch.h"
17 17
18 class GrRectanizer; 18 class GrRectanizer;
19 19
20 struct GrBatchAtlasConfig { 20 struct GrBatchAtlasConfig {
21 int numPlotsX() const { return fWidth / fPlotWidth; } 21 int numPlotsX() const { return fWidth / fPlotWidth; }
22 int numPlotsY() const { return fHeight / fPlotWidth; } 22 int numPlotsY() const { return fHeight / fPlotWidth; }
23 int fWidth; 23 int fWidth;
24 int fHeight; 24 int fHeight;
25 int fLog2Width;
26 int fLog2Height;
25 int fPlotWidth; 27 int fPlotWidth;
26 int fPlotHeight; 28 int fPlotHeight;
27 }; 29 };
28 30
29 class GrBatchAtlas { 31 class GrBatchAtlas {
30 public: 32 public:
31 // An AtlasID is an opaque handle which callers can use to determine if the atlas contains 33 // An AtlasID is an opaque handle which callers can use to determine if the atlas contains
32 // a specific piece of data 34 // a specific piece of data
33 typedef uint64_t AtlasID; 35 typedef uint64_t AtlasID;
34 static const uint32_t kInvalidAtlasID = 0; 36 static const uint32_t kInvalidAtlasID = 0;
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 }; 259 };
258 260
259 SkTDArray<EvictionData> fEvictionCallbacks; 261 SkTDArray<EvictionData> fEvictionCallbacks;
260 // allocated array of GrBatchPlots 262 // allocated array of GrBatchPlots
261 SkAutoTUnref<BatchPlot>* fPlotArray; 263 SkAutoTUnref<BatchPlot>* fPlotArray;
262 // LRU list of GrPlots (MRU at head - LRU at tail) 264 // LRU list of GrPlots (MRU at head - LRU at tail)
263 GrBatchPlotList fPlotList; 265 GrBatchPlotList fPlotList;
264 }; 266 };
265 267
266 #endif 268 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrTypesPriv.h ('k') | src/gpu/GrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698