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: src/gpu/gl/GrGpuGL.cpp

Issue 275903002: Factor GrTexture into public GrTexture and private GrTextureImpl. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Move functions called by Chrome back to GrTexture Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/gl/GrGLTexture.h ('k') | no next file » | 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 2011 Google Inc. 2 * Copyright 2011 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 "GrGpuGL.h" 9 #include "GrGpuGL.h"
10 #include "GrGLStencilBuffer.h" 10 #include "GrGLStencilBuffer.h"
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 desc.fWidth = glTex->width(); 472 desc.fWidth = glTex->width();
473 desc.fHeight = glTex->height(); 473 desc.fHeight = glTex->height();
474 desc.fConfig = glTex->config(); 474 desc.fConfig = glTex->config();
475 desc.fSampleCnt = glTex->desc().fSampleCnt; 475 desc.fSampleCnt = glTex->desc().fSampleCnt;
476 desc.fTextureID = glTex->textureID(); 476 desc.fTextureID = glTex->textureID();
477 desc.fOrigin = glTex->origin(); 477 desc.fOrigin = glTex->origin();
478 478
479 if (this->uploadTexData(desc, false, 479 if (this->uploadTexData(desc, false,
480 left, top, width, height, 480 left, top, width, height,
481 config, buffer, rowBytes)) { 481 config, buffer, rowBytes)) {
482 texture->dirtyMipMaps(true); 482 texture->impl()->dirtyMipMaps(true);
483 return true; 483 return true;
484 } else { 484 } else {
485 return false; 485 return false;
486 } 486 }
487 } 487 }
488 488
489 namespace { 489 namespace {
490 bool adjust_pixel_ops_params(int surfaceWidth, 490 bool adjust_pixel_ops_params(int surfaceWidth,
491 int surfaceHeight, 491 int surfaceHeight,
492 size_t bpp, 492 size_t bpp,
(...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after
1576 if (fHWViewport != vp) { 1576 if (fHWViewport != vp) {
1577 vp.pushToGLViewport(this->glInterface()); 1577 vp.pushToGLViewport(this->glInterface());
1578 fHWViewport = vp; 1578 fHWViewport = vp;
1579 } 1579 }
1580 } 1580 }
1581 if (NULL == bound || !bound->isEmpty()) { 1581 if (NULL == bound || !bound->isEmpty()) {
1582 rt->flagAsNeedingResolve(bound); 1582 rt->flagAsNeedingResolve(bound);
1583 } 1583 }
1584 1584
1585 GrTexture *texture = rt->asTexture(); 1585 GrTexture *texture = rt->asTexture();
1586 if (texture) { 1586 if (NULL != texture) {
1587 texture->dirtyMipMaps(true); 1587 texture->impl()->dirtyMipMaps(true);
1588 } 1588 }
1589 } 1589 }
1590 1590
1591 GrGLenum gPrimitiveType2GLMode[] = { 1591 GrGLenum gPrimitiveType2GLMode[] = {
1592 GR_GL_TRIANGLES, 1592 GR_GL_TRIANGLES,
1593 GR_GL_TRIANGLE_STRIP, 1593 GR_GL_TRIANGLE_STRIP,
1594 GR_GL_TRIANGLE_FAN, 1594 GR_GL_TRIANGLE_FAN,
1595 GR_GL_POINTS, 1595 GR_GL_POINTS,
1596 GR_GL_LINES, 1596 GR_GL_LINES,
1597 GR_GL_LINE_STRIP 1597 GR_GL_LINE_STRIP
(...skipping 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after
2803 this->setVertexArrayID(gpu, 0); 2803 this->setVertexArrayID(gpu, 0);
2804 } 2804 }
2805 int attrCount = gpu->glCaps().maxVertexAttributes(); 2805 int attrCount = gpu->glCaps().maxVertexAttributes();
2806 if (fDefaultVertexArrayAttribState.count() != attrCount) { 2806 if (fDefaultVertexArrayAttribState.count() != attrCount) {
2807 fDefaultVertexArrayAttribState.resize(attrCount); 2807 fDefaultVertexArrayAttribState.resize(attrCount);
2808 } 2808 }
2809 attribState = &fDefaultVertexArrayAttribState; 2809 attribState = &fDefaultVertexArrayAttribState;
2810 } 2810 }
2811 return attribState; 2811 return attribState;
2812 } 2812 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLTexture.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698