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

Side by Side Diff: tools/LazyDecodeBitmap.cpp

Issue 536003002: Hide fields in SkImageInfo (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix qt Created 6 years, 3 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 | « tests/SurfaceTest.cpp ('k') | tools/sk_tool_utils.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 2013 Google Inc. 2 * Copyright 2013 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 #include "LazyDecodeBitmap.h" 8 #include "LazyDecodeBitmap.h"
9 9
10 #include "SkData.h" 10 #include "SkData.h"
(...skipping 21 matching lines...) Expand all
32 } 32 }
33 33
34 SkAutoTDelete<SkImageGenerator> gen( 34 SkAutoTDelete<SkImageGenerator> gen(
35 SkDecodingImageGenerator::Create( 35 SkDecodingImageGenerator::Create(
36 data, SkDecodingImageGenerator::Options())); 36 data, SkDecodingImageGenerator::Options()));
37 SkImageInfo info; 37 SkImageInfo info;
38 if ((NULL == gen.get()) || !gen->getInfo(&info)) { 38 if ((NULL == gen.get()) || !gen->getInfo(&info)) {
39 return false; 39 return false;
40 } 40 }
41 SkDiscardableMemory::Factory* pool = NULL; 41 SkDiscardableMemory::Factory* pool = NULL;
42 if ((!FLAGS_useVolatileCache) || (info.fWidth * info.fHeight < 32 * 1024)) { 42 if ((!FLAGS_useVolatileCache) || (info.width() * info.height() < 32 * 1024)) {
43 // how to do switching with SkDiscardableMemory. 43 // how to do switching with SkDiscardableMemory.
44 pool = SkGetGlobalDiscardableMemoryPool(); 44 pool = SkGetGlobalDiscardableMemoryPool();
45 // Only meaningful if platform has a default discardable 45 // Only meaningful if platform has a default discardable
46 // memory implementation that differs from the global DM pool. 46 // memory implementation that differs from the global DM pool.
47 } 47 }
48 return SkInstallDiscardablePixelRef(gen.detach(), dst, pool); 48 return SkInstallDiscardablePixelRef(gen.detach(), dst, pool);
49 } 49 }
OLDNEW
« no previous file with comments | « tests/SurfaceTest.cpp ('k') | tools/sk_tool_utils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698