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

Side by Side Diff: src/gpu/GrGpu.cpp

Issue 1852733002: Add GrContext::releaseAndAbandonContext() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix no-gpu build, add null check, add unit test" Created 4 years, 8 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 | « src/gpu/GrGpu.h ('k') | src/gpu/gl/GrGLGpu.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 2010 Google Inc. 2 * Copyright 2010 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 8
9 #include "GrGpu.h" 9 #include "GrGpu.h"
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 GrGpu::GrGpu(GrContext* context) 45 GrGpu::GrGpu(GrContext* context)
46 : fResetTimestamp(kExpiredTimestamp+1) 46 : fResetTimestamp(kExpiredTimestamp+1)
47 , fResetBits(kAll_GrBackendState) 47 , fResetBits(kAll_GrBackendState)
48 , fMultisampleSpecsAllocator(1) 48 , fMultisampleSpecsAllocator(1)
49 , fContext(context) { 49 , fContext(context) {
50 } 50 }
51 51
52 GrGpu::~GrGpu() {} 52 GrGpu::~GrGpu() {}
53 53
54 void GrGpu::contextAbandoned() {} 54 void GrGpu::disconnect(DisconnectType) {}
55 55
56 //////////////////////////////////////////////////////////////////////////////// 56 ////////////////////////////////////////////////////////////////////////////////
57 57
58 bool GrGpu::makeCopyForTextureParams(int width, int height, const GrTextureParam s& textureParams, 58 bool GrGpu::makeCopyForTextureParams(int width, int height, const GrTextureParam s& textureParams,
59 GrTextureProducer::CopyParams* copyParams) const { 59 GrTextureProducer::CopyParams* copyParams) const {
60 const GrCaps& caps = *this->caps(); 60 const GrCaps& caps = *this->caps();
61 if (textureParams.isTiled() && !caps.npotTextureTileSupport() && 61 if (textureParams.isTiled() && !caps.npotTextureTileSupport() &&
62 (!SkIsPow2(width) || !SkIsPow2(height))) { 62 (!SkIsPow2(width) || !SkIsPow2(height))) {
63 copyParams->fWidth = GrNextPow2(width); 63 copyParams->fWidth = GrNextPow2(width);
64 copyParams->fHeight = GrNextPow2(height); 64 copyParams->fHeight = GrNextPow2(height);
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 int meshCount) { 480 int meshCount) {
481 if (primProc.numAttribs() > this->caps()->maxVertexAttributes()) { 481 if (primProc.numAttribs() > this->caps()->maxVertexAttributes()) {
482 fStats.incNumFailedDraws(); 482 fStats.incNumFailedDraws();
483 return false; 483 return false;
484 } 484 }
485 this->handleDirtyContext(); 485 this->handleDirtyContext();
486 486
487 this->onDraw(pipeline, primProc, meshes, meshCount); 487 this->onDraw(pipeline, primProc, meshes, meshCount);
488 return true; 488 return true;
489 } 489 }
OLDNEW
« no previous file with comments | « src/gpu/GrGpu.h ('k') | src/gpu/gl/GrGLGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698