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

Side by Side Diff: cc/resources/resource_provider.cc

Issue 267073003: Make --enable-delegated-renderer show stuff on Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move #include 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
« no previous file with comments | « no previous file | content/browser/browser_main_loop.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/resources/resource_provider.h" 5 #include "cc/resources/resource_provider.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 1588 matching lines...) Expand 10 before | Expand all | Expand 10 after
1599 } 1599 }
1600 1600
1601 void ResourceProvider::TransferResource(GLES2Interface* gl, 1601 void ResourceProvider::TransferResource(GLES2Interface* gl,
1602 ResourceId id, 1602 ResourceId id,
1603 TransferableResource* resource) { 1603 TransferableResource* resource) {
1604 Resource* source = GetResource(id); 1604 Resource* source = GetResource(id);
1605 DCHECK(!source->locked_for_write); 1605 DCHECK(!source->locked_for_write);
1606 DCHECK(!source->lock_for_read_count); 1606 DCHECK(!source->lock_for_read_count);
1607 DCHECK(source->origin != Resource::External || source->mailbox.IsValid()); 1607 DCHECK(source->origin != Resource::External || source->mailbox.IsValid());
1608 DCHECK(source->allocated); 1608 DCHECK(source->allocated);
1609 DCHECK_EQ(source->wrap_mode, GL_CLAMP_TO_EDGE);
1610 resource->id = id; 1609 resource->id = id;
1611 resource->format = source->format; 1610 resource->format = source->format;
1612 resource->mailbox_holder.texture_target = source->target; 1611 resource->mailbox_holder.texture_target = source->target;
1613 resource->filter = source->filter; 1612 resource->filter = source->filter;
1614 resource->size = source->size; 1613 resource->size = source->size;
1615 1614
1616 if (source->type == Bitmap) { 1615 if (source->type == Bitmap) {
1617 resource->mailbox_holder.mailbox = source->shared_bitmap_id; 1616 resource->mailbox_holder.mailbox = source->shared_bitmap_id;
1618 resource->is_software = true; 1617 resource->is_software = true;
1619 } else if (!source->mailbox.IsValid()) { 1618 } else if (!source->mailbox.IsValid()) {
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
2270 ContextProvider* context_provider = output_surface_->context_provider(); 2269 ContextProvider* context_provider = output_surface_->context_provider();
2271 return context_provider ? context_provider->ContextGL() : NULL; 2270 return context_provider ? context_provider->ContextGL() : NULL;
2272 } 2271 }
2273 2272
2274 class GrContext* ResourceProvider::GrContext() const { 2273 class GrContext* ResourceProvider::GrContext() const {
2275 ContextProvider* context_provider = output_surface_->context_provider(); 2274 ContextProvider* context_provider = output_surface_->context_provider();
2276 return context_provider ? context_provider->GrContext() : NULL; 2275 return context_provider ? context_provider->GrContext() : NULL;
2277 } 2276 }
2278 2277
2279 } // namespace cc 2278 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | content/browser/browser_main_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698