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

Unified Diff: src/gpu/GrContext.cpp

Issue 12843026: Make GrDrawTarget::Caps ref counted and GrGLCaps derive from it. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: src/gpu/GrContext.cpp
===================================================================
--- src/gpu/GrContext.cpp (revision 8359)
+++ src/gpu/GrContext.cpp (working copy)
@@ -548,15 +548,15 @@
}
int GrContext::getMaxTextureSize() const {
- return fGpu->getCaps().maxTextureSize();
+ return fGpu->caps()->maxTextureSize();
}
int GrContext::getMaxRenderTargetSize() const {
- return fGpu->getCaps().maxRenderTargetSize();
+ return fGpu->caps()->maxRenderTargetSize();
}
int GrContext::getMaxSampleCount() const {
- return fGpu->getCaps().maxSampleCount();
+ return fGpu->caps()->maxSampleCount();
}
///////////////////////////////////////////////////////////////////////////////
@@ -573,8 +573,8 @@
bool GrContext::supportsIndex8PixelConfig(const GrTextureParams* params,
int width, int height) const {
- const GrDrawTarget::Caps& caps = fGpu->getCaps();
- if (!caps.eightBitPaletteSupport()) {
+ const GrDrawTarget::Caps* caps = fGpu->caps();
+ if (!caps->eightBitPaletteSupport()) {
return false;
}
@@ -582,7 +582,7 @@
if (!isPow2) {
bool tiled = NULL != params && params->isTiled();
- if (tiled && !caps.npotTextureTileSupport()) {
+ if (tiled && !caps->npotTextureTileSupport()) {
return false;
}
}

Powered by Google App Engine
This is Rietveld 408576698